Laurence Moroney on Silverlight
Yesterday i saw a presentation of MS Silverlight held by Laurence Moroney at this years QCon. The main reason for watching this was that i still wanted to understand and see the advantages compared with Adobe Flex.
After 45 minutes of very bad brain wash advertising my mind is bloated with even more questions on Silverlight. Mainly one fact hacks me: Moroney states that one big advantage is the streaming of unprocessed XAML to the client. To me it seems to be a big disadvantage. Streaming unprocessed code to the client always means that the client has to spend CPU time on processing it. I’m not talking about parsing and possible parse errors because i’m sure the MS guys are smart enough to equip the developers with tools to deploy syntactical correct code but it is doubtful if this approach does not lower the user experience. I mean client side compiling always cuts off performance. The application has a longer startup phase. Maybe this is not important for small apps but as Moroney himself used the example of a huge web application where MS Silverlight and it’s streaming code approach satisfied the customer who was a major cat food company which wanted to modify their content easily some questions popped into my mind.
1. Moroney states: The streaming code approach protects you from recompiling and rededployment of your entitre application as needed in Flash
Maybe he is talking about the Flash IDE. In this case i would agree but in relation to the Flex framework he is completely wrong. Flex supports incremental builds. Ok, deployment is another issue but to be honest - “huge” applications are not one big ball of mud! They should consist of modules and components which are downloaded as they are needed.
2. Moroney states: The XAML code can be generated on server side and the passed over to the client which allows you runtime code manipulations.
This is a good point but as i think of Flex Data Sevices this is no longer an advantage. Also if he would reference only UI-Components i would have to ask for the sprit and purpose of runtime generated UI-Components. Even if he would reference components that are only specific for one in a million use cases i would refer to server side generated MXML which is compiled on server side and downloaded by the client.
3. Streaming source code and client side processing
In my honest opinion this feature is can seriously turn into a bottleneck of your big apps for some reasons. On the one hand transferring source code instead of a precompiled binary can bloat your network traffic. On the other hand making the client responsible to parse and compile the source sounds like potentially loosing performance because of having some overhead on code handling at least at app start up. I must admit that i have no clue about the rendering process of the Silverlight runtime so i may be wrong. If someone has a good explanation for this please let me know! To me it seems, that the only reason for streaming the source is the aim to easily deploy an application as a desktop app using the Windows Presentation Framework.
Also some other points like the huge plugin size of 5MB of the Silverlight runtime compared to less than 1MB of the Flash Player makes me think.
In the end MS Silverlight does not thrill me. By now i only can see a clumsy attempt to catch up with Adobe Flex and AIR. I’ll keep an eye on it and give it another try when the next version is out.
One important thing i’ve learned from Moroneys presentation: Avoid the usage of online demos in your presentations! You’ll never know if the network is your buddy.
So in this point i feel sympathy for Laurence.
Best,
Frank