Wednesday, February 3, 2010

Project Next - Client/browser side technology. Why not Silverlight.

Doing a lot of reading recently trying to understand the directions where the MS client/browser side development is going. I have to deliver a very intensive data-entry application in the next 7 months and that makes me wonder what is the best approach nowadays.

As go-live would be in a year from now I’m able to consider any betas. The options I started with were Silverlight 4.0 versus combination of ASP.NET MVC 2.0 with MvcContrib, jQuery, new Ajax features and probably some Silverlight with ASP.NET MVC host.

Silverlight 4.0 (Beta 1 now)sl4bloglogo

Prism v2 with MVVM would be the guiding frameworks to follow. Although as I understood Prism v2 is more about modular design and not exactly about achieving good MVVM (http://stackoverflow.com/questions/1595409/mef-vs-prism-what-is-the-difference-what-will-be-supported-in-the-future).

For the MVVM guidance/frameworks on Silverlight actually little can be found. Looks like there is a good one for WPF (with MEF, not Unity): http://waf.codeplex.com/ but still there is no real Silverlight support except for “experimental” release http://waf.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=30057.

And if I understand it right MEF is going to be part of Silverlight 4.0 which in turn will support probably more of MVVM.

Evaluation:

+ Versatility. Silverlight can serve all-in-one purposes from data-entry to ink notes taking and video comments recording

+  Guidance. There is MVVM guidance with MEF

+  Duplex communication. This is very good compared to all other hack Ajax solutions like comet variations

? Reuse. They say you can reuse to some extent Silverlight views in WPF. Never witnessed such a reuse though, and not really relevant in my case.

+-  Scaffolding. There is a data access scaffolding story. Not exactly for Oracle though which is going to be my data storage. I’d have to buy an Oracle EF provider, not expensive but still involves then non-open-source 3party involved with all the support/upgrade etc implications.

+-  Cross Browser. Rather than reusing views in WPF I’ll need to expose some views to users with mobile browsers (like telco mobile dealers or self-care users) and though Silverlight 4.0 is even going to target chrome (http://timheuer.com/blog/archive/2009/11/18/whats-new-in-silverlight-4-complete-guide-new-features.aspx) this is still not enough.

+-  Testing. There is some unit testing story (http://code.msdn.microsoft.com/silverlightut) for Silverlight (and MVVM is a TDD enabler), but this supports at the moment SL up to v3. And this is not something of WatiN value.

- Community and frameworks support. Prism v2 only supports Silverlight v3 right now and somehow I don’t want to wait for Prism v4 mid summer (http://compositewpf.codeplex.com/Thread/View.aspx?ThreadId=80980). Overall, it looks like no one can keep up to speed with pace of Silverlight progress, it looks like a good idea to wait until v8 :) to avoid being on the “bleeding” edge.

 -  Speed

      Go to the Telerik  reports demo site and imagine yourself presenting that as part of your application. Think about how do you fill the gap for every control loading 30 seconds.  They first show you % indicator, then report loading progress indicator, then page loading progress indicator, this is just for user perception that something is happening during those 30 seconds!

     image => image => image

      Now open some pdf attachment in gmail and that is something you will not be ashamed of presenting as part of your application.

Conclusion:

Too many cons with real showstoppers for me. If I had to create an eye candy with no regard to practicality I’d try Silverlight. But this is clearly not my target.

I’m going forward with ASP.NET MVC and ajax approach with probably embedding Silverlight on the edges where required.

No comments: