Adventures into the web of Silverlight

Skrevet - Friday, March 12th, 2010 kl. 22:14 | Kategori - * Coding, English posts

My employer decided it was time to get our online booking solution up and running. So, I was put to work – having heard so much about Silverlight and RIA services, I decided to have a go at it. Having no experience with online programming besides simple html, I had to go with something that would smell a little like programming in WPF.

To give the judgement before letting the jury vote, I was not impressed. I certainly like the syntax (it’s pretty much like WPF), but RIA services didn’t really win me over. I tried various approaches – first with Entity Framework (re-creating the database-schema giving everything a primary auto-generated column), switching to NHibernate with huge difficulties – then back to Entity Framework with a few Include-attributes. Now, it was beginning to shape up – DomainDataSources and the RIA-services for filtering and serving up the data filtered and sorted/grouped… and then I lost control completely. Yes, XAML power is nice, but I found the DomainDataSource desperately wanting – especially with ComboBoxes (Async binding just blows up). Switching to AutoCompleteTextBoxes sort of remedied that, but the lack of control of when the loading happened just finally sent me packing. I tried reverting to skipping the DomainDataSource and controlling the RIA-service directly… that turned out poorly, having a cache, that I have to remember to clear and odd syntax gave me head-aches.

I don’t know, for me the RIA services is a nice project – it has promise, but it isn’t really production-ready for me. Being used to the fine-grained control, NHibernate gives me, the combination of EF and RIA just didn’t live up to my expectations. Also, having UI-logic (INotifyCollectionChanged et all) baked inside the DTO’s. Well, to make a long story short, it was the end of RIA services for me in this go. I then decided to go the more ‘hardcore’ WCF way – and switched Silverlight after reading the fine print… (how in the name of all that is sacred do you expect me to make LOB-applications without printing…) with an online XBAP (WPF).

And, now I’m back – three customers deployed today with their own individual graphical layout, one with a printed form. And best of all, I have all of the control at my fingertips again – I decided against a deployed WCF-service in virtual folders as the deadline was rapidly approaching and I had no idea how to do it. Instead, I went the albeit more old-fashioned way of Windows Services published via WCF. Fine grained control, SRP pretty much applied everywhere – full usage of a 2nd level cache thanks to NHibernate.

Of course, there are drawbacks (.Net 3.5sp1 is needed client-side, download size is huge compared to Silverlight and deployment is… considerable), but the most important criteria were met – our customers’ expectations and deadlines (one day ahead of schedule is a rarity in our line of business) were met in full (and in one case surpassed by a fair margin).

Feed | Trackback |

Post a Comment