September 2007 Entries

.Net Framework 3.5 breaks ASP.NET 2.0 web sites!

I'm one of those that have already installed and use Visual Studio 2008 beta side by side with Visual Studio 2005 on a machine and without any serious problems so far I might add. As you may already know .NET Framework 3.5 gets installed together with the new studio, so my machine contains that too (which is cool by the way, linq, Expressions, lamdas etc are probably the next big leap on programming languages).

Yesterday though, while trying to compile a .Net 2.0 web site I've stumbled across the following exception:

The base class includes the field 'InformationTBody', but its type (System.Web.UI.HtmlControls.HtmlGenericControl) is not compatible with the type of control (System.Web.UI.HtmlControls.HtmlTableBodySection)

After investigating the problem for a while, I found the following knowledge base article which explains the problem. It seems that when you install the .NET Framework 3.5, the .NET Framework files in the V2.0.50727 folder are updated. Therefore, when you install the .NET Framework 3.5, Visual Studio 2005 is affected. What's more important is that in the .NET Framework 3.5, the following HTML tags no longer map to the HtmlGenericControl class:

  • tbody
  • thead
  • tfoot

In the .NET Framework 3.5, these tags map to the following classes:

tbody HtmlTableBodySection
thead HtmlTableHeaderSection
tfoot HtmlTableFooterSection

So if, like me, you want to build your web site with .Net 2.0 framework and deploy it to a web server that .Net Framework 3.5 is not installed you'll need to change your Html server tags to something else... :-(

Building Facebook applications

My friend Panos wrote today about Nikhil Kothari's Facebook.Net framework (hosted at Codeplex) as well as Steve Trefethen's starter kit as various tools you could use to develop Facebook applications using .Net.

I'd like to add to those The Facebook developer toolkit that evolved from the Microsoft - Facebook partnership. Although this download comes from the Microsoft Visual Studio Express Editions product line (as you may notice) nothing stops you from using it with Visual Studio.

Furthermore (if you're willing to play with cutting edge technology ;-) you could give Popfly's Facebook blocks (which are products of the same partnership) a try and develop rich Silverlight web applications...

Building table web layouts without tables

If you've ever developed a web application or site you've surely have stumbled on the layout problem and I bet you've finally decided to use tables in order to avoid the pain of coding your layout with CSS.

For a large variety of reasons though CSS based layouts are the way to go as they use less code, they are more customizable, they support various effects that aren't possible with tables, they run faster in modern web browsers and most importantly they comply with the semantic web principles (markup should not be confused with content). The problem? They are darn hard to code!

Don't worry, there is a way around this, you can develop CSS based web layouts without having to write the code your self. There are a lot of tools out there that can help you design your web pages without using tables. I had seen quite a few, the simplest one though comes from yahoo. Check it out here I think you'll be impressed (at least I was ;-))

builder

TechEd Developers 2007, I'll be there...

Woohoo this year I'll be helping at TechEd 2007. I volunteered to help at an "Ask The Expert" booth earlier last month and yesterday I received an email confirming my participation.

So if you're planning on attending this TechEd come chat with me ;-). See you all there...

P.S. If you still haven't seen it, check this TechEd flyer ;-)

techEd

Greek elections 2007 gadget

Once the Greek elections 2007 Silverlight graph was ready, it was really simple putting it to a sidebar gadget. So I've built one and upload it to live gallery (in http://gallery.live.com). The approval process though will take some time and my guess is that it won't be approved in time for the elections this afternoon, so I might as well post it here...

Gadget Thus if you're looking for a way to have one or more election result graphs right in your Vista desktop you can download the Greek elections 2007 from here, just rename it to Election2007.gadget and install it on your sidebar.

Greek elections 2007 popfly Silverlight application

If you were following my latest blog posts (those of you that didn't you really should ;-)) you'll already know that I've been working with popfly lately. Well let me tell you all about it.

Just a week back the early technology adopting Lambrakis press development team decided to give Silverlight a go at the 2007 Greek national elections. I was assigned with the task of creating a Silverlight graphical representation of the election results.

After investigating my options for a while (I'm always looking for what's available before diving into code) I came to a dreadful conclusion, there wasn't anything ready I could use ("yet" -Silverlight was just released after all) and I didn't have time to implement everything from scratch. I had to re-use something if I wanted to make it (d@mn.. this pre-election period was short). Thankfully I remembered Popfly, and as I discovered there were a lot of components (blocks) ready to be used or customized (ripped) to anyone's needs. Popfly it was then.

After a full 2 days development ;-) my Greek Elections 2007 Silverlight Bar graph was ready to be used. MashupView As you can see from the mashup diagram, all I really had to implement was a block (GreekElections) that would consume an XML feed containing the election results and then pass those to the Bar Graph block I had found at popfly... Well I had to tweak the bar graph a little to accept the data I was providing as well as display a custom title but other than that it was really pretty straight forward. I finally used a timer block to update my graph on a given time interval and two user input blocks to specify the prefecture and municipality for which the results were for and that was it (pretty much).

SilverlightSite The resulting Popfly Silverlight Bar Graph will be available at the night of the elections at http://national07.ekloges.dolnet.gr/. Once there you'll have to select a prefecture, municipality or see the nationwide results then scroll down to the end of the page and click the link.

You'll be able and have as many windows opened as you like on your desktop and watch them refresh automatically (using Ajax technologies) every 10 minutes.

diagramSnip

P.S. Kudos must also be given to Thodoris (The Hipstairs one ;-)) for providing the necessary feed, Fotis for embedding the Popfly mashup to the DOL election results site but above all Stelios, my boss, for encouraging me to complete this.

Arggghhh... It's Popfly mashup protection

I recently developed a couple of custom popfly blocks in order to create a popfly mashup (you'll learn more about it this weekend ;-)).

During development I spent quite some time figuring out why although I was making changes to my blocks, these changes weren't instantly reflected on my mashup. Then it stroke me, popfly mashups use the latest opened block version. Any changes made to a block after mashup was closed won't be reflected on it.

This can be troublesome for someone that has developed his own blocks as you'll have to open and save all mashups that use these blocks anytime you make a change. But imagine being a third party block consumer, you wouldn't like having your mashup broken just because someone else decided to change his block now would you?

It's all about tradeoffs I guess...

Developing Silverlight applications the easy way

It's been four months since I received my Popfly invite but haven't really been able to do anything on it due to lack of time. Looking for Silverlight applications yesterday though I happened to bump into it and remembered that I already had an account so I decided to check it out. Well it seems that a lot have changed since the last time I've used it although the project is still in its Alpha phase.

popflyFirst of all the user interface is completely revamped. It now loads up much faster and resembles more an office application than a web one.

Aside the obvious look and feel changes a lot of cool new features were added like:

A new web page designer that not only enables to choose between a large number of different styles and themes but also enables you to add your shared mashups to the page with the press of a button.

The Tweaking feature. Easier than ripping someone else's project, tweaking enables you to change basic properties of that project and save it. For example, if see a great mashup that uses photos of cats, but you want to see dogs, you can now do it without needing to rip the entire project.

PopflyHomeFacebook integration. Before, Popfly would publish a link to your profile  page. Now you can embed an entire application. (Soon you'll see my applications on my facebook profile ;-) )

JavaScript intellisence on the code editor when creating blocks.

The platform is far from complete, events are missing for example. I'd like to be able to call a block's method when an event (e.g. user presses a button) is triggered on another block. This though does not mean that Popfly isn't developing into a great platform for effortless and with no need of special skills development of Silverlight applications, mashups and web pages.

Can't wait for the next version...

Silverlight Nuggets

I rarely have the time to read a 10 page article or watch a full length Webcast, I usually prefer nuggets when I want to discover new technologies and explore hot developer topics since they only last 10-15 minutes.

So if you're into Silverlight here's a list of nuggets so that you can catch up:

Silverlight Streaming : Silverlight Streaming is a hosted service at http://streaming.live.com/ which provides developers and content creators the ability to host Silverlight content on ...

Silverlight - Linking Silverlight and ASP.NET Projects : With Silverlight Tools for Visual Studio 2008 it is possible to develop Silverlight applications as a separate project and embed that project within an ASP.NET site. This gives clean separation between ...

Silverlight - Debugging between Mac and Windows : An unusual nugget in that it was recorded on a MacBook Pro. It demonstrates the concept of debugging a Silverlight application running on Safari from a Visual Studio (on Windows) developer machine. This ...

Silverlight - Using Ink : A brief introduction to using an InkPresenter element to receive ink based input from users. First, we introduce the InkPresenter element in XAML and follow-up with the code (C#) to capture and process ...

Silverlight - Accessing HTML from managed code : Silverlight enables developers to access the host HTML from managed code. This is an extremely powerful feature which can be used to create seamless experiences between the HTML and Silverlight UI. ...

Silverlight 1.1 Programming - Full Screen : In this nugget we show you how to make a Silverlight application break outside the 'chrome' of the browser and take up the complete screen. This is very useful for applications which require more desktop ...

MSDN Roadshow 2007 Silverlight Demo : This nugget is a screen cast of the Silverlight demo delivered during the rich client session on the MSDN Roadshow 2007.

Linq tools coming up

It's only been a couple of weeks since Linq's final release with Visual Studio 2008 beta 2 and great tools have already started coming to life.

A great one I discovered from SoCalDevGal is the LinqPad - a Linq query expression tool which allows you to run queries against databases using Linq.

If you're exploring Linq this is a great tool.

DLinq vs ADO.NET Entity Framework

I've been following ADO.NET Entity Framework for over a year now and the truth is I was bit surprised when DLinq was released. From the initial look at things - it seemed as though the ADO.NET EF folks and the LINQ to SQL folks were operating in completely isolated environments - each producing their own copy of a wheel but with very different attributes, benefits, and even target audiences.

From what I've been reading lately though I came to understand that that isn't the case. The ADO.NET Entity Framework has a different scope than LINQ to SQL. The ADOEF is responsible for three things:

  • mapping a database schema to a model,
  • creating a model
  • allowing eSQL queries against that model.

Combined with Linq, which allows you to run LINQ queries against in-memory structures, you are free to issue LINQ queries against the generated ADOEF classes.

Furthermore with ADOEF you also have features like

  • Entity inheritance - DLinq derived classes have a 1:1 table mapping structure. You get one class per table. EF on the other hand lets you create entities like Customer and EliteCustomer and SuperEliteCustomer that allow you to maintain progressively more information in the object model while still using the same normalized back-end relational store.
  • Entity composition - You can have a single EF entity that is composed of data retrieved from multiple locations within the relational store. For example, you can have a single object that has properties that originated in 3 different tables.
  • Composed Entity Updates Using EF, you can actually insert or update a single entity that originated from 3 different tables. If you modify three properties that originated from 3 different tables, then when the EF does an update for that data, it will issue 3 different queries. This is impossible to do in DLinq alone. The best you can do is manually create a transaction, manually add rows to 3 tables, and then call update. In short, EF preserves the object-oriented view of the data whereas the DLinq object-oriented view does half of that.
  • Change schema - if you make a change to the schema in the underlying database in simple DLinq, you need to re-generate the classes, potentially screwing up any customizations you made to those classes. With EF, all you need to do is change the mapping specification and you can leave the Entity Data Model (EDM) completely untouched.

From the looks of it ADOEF combined with Linq promises to be the foundation of an extremely powerful persistence and business object framework.

Socializing

I hadn't given too much attention to all those social networks that have developed over time as I thought that they were mainly for people looking for dating and this sort of things. A recent friend invitation for FaceBook though, proved me wrong and opened a new world full of potential for communication, collaboration, play and so on.

So from know on you can catch up with me through my Facebook account...
Konstantinos Pantos's Facebook profile