Tuesday, December 23, 2008

Some objective comparison of Adobe Flex and Microsoft Silverlight

In the past I've read a number of posts comparing Silverlight to Flex. Often the authors remain very vague on why Flex is better than Silverlight. We all know by now that the Silverlight plug-in isn't near the installed base of the Flash player but there's more than that. Therefore I think it's about time to give an overview of my recent experience.

I've been developing a proof of concept application in Silverlight after having developed the exact same proof of concept application in Flex. Just to be clear: I have much more experience with Flex than Silverlight but I'm pretty sure that the information below is based on facts, not fud.

1. Binding - Both technologies support binding but binding in Silverlight is way more cumbersome. First of all you need a special hack (using StaticResource) to bind UI components together. Even worse is the fact that you need to dispatch property changed events yourself (in Flex you simply specify the [Bindable] attribute on class and/or property level). A direct binding to an expression is also not an option in Silverlight. The fact that there's 2 way binding in Silverlight is an advantage for Silverlight because the current version of Flex is limited to 1 way binding (the upcoming release of Flex has 2 way binding).

2. Data communications - In Silverlight you're more or less stuck with SOAP and JSON for the time being (you could consider using WebOrb or FluorineFx - this gives Silverlight AMF support).

3. Layouting - Thank God there's Flex. Need to layout a data entry form? In Flex you can use Form and FormItem. In Silverlight you need to use Grid, RowDefinition and ColumnDefinition. Not too bad if you didn't have to specify Column and Row IDs because what do you need to do when you need to insert a line in your form... right... renumber everything. There are also no 'right' and 'bottom' properties in Silverlight - pretty annoying.

4. Exception handling - This is a 'bad in both cases' topic. In Flex there's still no global exception handler. Silverlight has one but for some strange reason the screen goes blank after certain exceptions. In other words: there's global exception handler support in Silverlight but it doesn't work...

5. Code behind - To me it's not essential but the fact that there's no out of the box support for code behind in Flex is a pitty. The fact that there's no out of the box WYSIWYG design support in Visual Studio 2008 is probably much more problematic for developers starting with Silverlight (or do you really expect them to constantly switch between slow blend and quick visual studio???).

6. Multi-language - I haven't completely figured out the multi-language support in Silverlight but it's already clear to me that it's way easier to implement in Flex. Just to be clear: the internationalization in Flex is also far from perfect. You need to take care of date formats, decimal and thousands separator support yourself because there's no application global setting in Flex (which is problematic when using validators and binding).

7. Validation - although not perfect in Flex (do they really think all telephone numbers are formatted the US way...), the support in Silverlight is simply absent. You will need to develop validators and the nice red "error tips" yourself.

8. Generics and LINQ - currently there's no support for generics in Flex (actually Actionscript).

What's even worse: there's no LINQ (or something similar) in Actionscript. Silverlight comes with LINQ and that is definitely an advantage (you can't use it for database querying however). Support for partial classes and extension methods is another advantage of Silverlight over Flex. It's clear that we're in need of Actionscript 4 (even if that results in non-compliance with Ecmascript).

9. Components - The Silverlight component set is smaller than the Flex component set (eg. a menu bar component is missing). This might change quicky however. There are already more 3rd party component development companies working on Silverlight controls than companies working on Flex controls.

10. Browser compatibility - Although there are some issues with Flash player running in Google Chrome - the situation is much better compared to Silverlight. That one just doesn't work in Google Chrome.

I'll probably discover more differences during the coming weeks. If so I'll post a new overview over here.

Sunday, December 14, 2008

Flip book using the nice component built by Ruben Swieringa

I've created a mini-site for a family member using the flip book component built by Ruben Swieringa:

http://klepsydra.vdeprojects.com.

What do you think? Would it make sense to build a Flex-based CMS solution for creating this type of projects? Do you think there's a demand for a CMS to build this type of mini-sites?

Tuesday, December 2, 2008

Why is it called Flash Catalyst???

Why are the project names always better than the names the marketing department can come up with???? Thermo is now called "Flash Catalyst". Can someone explain to me why "Flash" had to be added to the name? "Flash Catalyst" imports Photoshop, Fireworks and Illustrator files and 'converts' them to Flex projects. I don't see any "Flash" in this... Why not simply call it "Adobe Catalyst" (or Ca in short)? My guess is that we'll end up in a similar naming soup like we had with the data services thing. That one has been renamed in the past as well (and I hope it will be renamed once more because the current situation is also far from logical). My 2 cents of course :)