.NET and me Coding dreams since 1998!

2Jun/1017

5 reasons why Silverlight sucks in LOB (compared to WPF)

Recently, Brian Noyes and  Rob Relyea have touched the “WPF VS Silverlight” subject and considering the fact I was also recently thinking about it I wanted to share my thoughts on that topic too.

As I said in previous post, I’ve started at home blogging about the accountingLOB applications in Serbia and one of the questions I got challenged by one of my readers (who knows how BIG Silverlight fan I am)  is

“Would you be using Silverlight for your own accountingLOB application?”

Initially answer looked very clear to me: with all the improvements Silverlight 4 brought to LOB game, desktop like programming model and web deployment looks like a perfect fit for public facing application (outside of intranets)

But, after doing some more thinking on this subject, to my surprise I came up with the opposite conclusion:
WPF is better choice for serious LOB applications.

And here are 5 most important reasons why I think like this:

Silverlight 4 is not cross platform environment any more

The biggest advantage SL had over the WPF (in my mind at least) is ability to be deployed to non-windows machines (MacOS and Linux powered machines).
Having Silverlight 4 with a whole slew of COM+ dependable features virtually prevents creating a Silverlight 4 siteapplication which would run on Mac and Linux. At least, that is the state as of today I am aware – somebody please correct me if I am wrong in this.

The way I see this change is that Silverlight 4 is shifting toward being unique “cross-screen” (desktop, mobile and TV) platform which is perfectly fine with me just it doesn’t have any particular value in context of LOB applications).

UPDATE: I did found a couple of folks with Mac which were kind enough to tell me that on Silverlight.net site there is Silverlight 4 plug-in for Mac which (as long as COM+ features are not used) works fine.

Silverlight adoption rate is not good enough

According to later RIA Stats adoption rate of Silverlight is around 60%. I’ll put aside the fact that I am not seeing that number around me in Czech Republic and accept it as correct one with slightly different interpretation: 40% of PCs are not having Silverlight installed.

The funniest thing is that WPF has 99% adoption rate because every PC with Windows newer then Windows XP SP2 (including Vista and Windows 7) has  WPF installed on it. I am not sure how many Windows 2000 and Windows 98 machines are out there but whatever the number that is personally I don’t think anyone should care targeting that segment as very unlikely to invest any money in purchasing your LOB product.

Even if a PC is not having the .NET framework at all, the download size to get it on PC is just 28 MB which is bigger then 9 Mb size of MacOs Silverlight 3 plug in but who cares (with any non dial up connection it is matter of seconds). In my personal opinion, this is one of the most important WPF features in .NET 4 :)

Silverlight tooling is good enough. WPF tooling is better

Starting with VS 2010 and Blend 4 we can work in SL4 and Silverlight is getting much more attention (just look at the paces of silverlight and wpf toolkits and everything gets to be clear there) but using WPF allows me to use all of the memory profilers, dbg viewers, any framework I want etc. If you are in doubt what exactly I think with this here’s an example: Silverlight does support printing but in case of serious LOB applications you need all the muscle WPF offers. Think something like Crystal Reports for example.

Silverlight programming model is more constrained then the WPF one

Doing Silverlight applications, one is forced to adopt the “make async web service call and get a chunk of data and do something with it” which in my personal experience limits the productivity of LOB developer compared to the speed he has developing with WPF . There’s no direct access to DB (which is actually great) but that ignores the fact that some LOB applications might need just that. For example, application can be written to target local SQL CompactExpress which then is set up to replicatemerge deltas with the central enterprise server. Anything like that (and we know how this things can get crazy in enterprises) is not possible in Silverlight.

Another thing related to this is aspect of offline access. I am aware that Silverlight 4 does have isolated storage and yes it has a bunch of open source DBs sitting on top of it, but it is just a single user storage. In reality, quite often in serious LOB applications we are seeing office andor P2P network topologies where it is essential that you have a “proxy per office” or ability to sync directly the data of “user X”. I know that Sync Framework is coming for Silverlight in 2010 but it is not there now and I am not sure if it would support topologies other then client <->(Azure) server.

Silverlight is still technically inferior to WPF in some areas.

Read Brian's post to see what this point is about.

Conclusion

Now you heard 5 of my most important reasons why I choose to stick with WPF on this. Am I missing the point? Making a false statement? Do you have more reasons in favor of WPF or Silverlight?

Looking forward to hear the comments :)

Technorati Oznake: ,
Comments (17) Trackbacks (0)
  1. Hi Nikola, just a couple of observations from your post:

    • I understand that if you don't need to depend on COM interfaces, you are still fully x-platform.

    • You need to take versions into account, SL4 is on ~5% of PCs and WPF 4 will also not be installed on 99% of computers. The download sizes have been improved dramatically in .NET 4, that's true, but the installation of the runtime is still much nicer for SL4 than for the whole .NET framework.

    • Silverlight apps have a leaner deployment model – true to the RIA style. ClickOnce is close but for some reason doesn't feel as comfortable.

    • I think we were having a discussion about an AIR-like runtime in MS world and you didn't think it would be too useful now that we have SL OOB. But maybe you'd appreciate local SQL engine and less restricted access to a local computer after all? I see AIR somewhere between WPF and Silverlight and think it's a pretty good idea.

    Regards,

    Borek

  2. Borek,

    Thanks for your comments.

    Let say I do a SL4 app without using any of the COM+ things… Will users on Mac and Linux be capable to use it, using the SL3Moonlight 2+ plug in? I believe not (not having Linux/Mac machine to check that out for sure)

    SL4 brought into the game support for printing without which there are no real LOB apps (I personally consider all the "create-PDF-on-the-server" solutions unacceptable for professional LOB), so even using SL3 (which is cross platform) is not an option IMHO

    SL OOB is ok but (as I said it is 1-1 storage with server) and a lot of time in LOB apps you need n users – n hubproxies – one server (in the cloud?)… Supporting that (if possible at all) on SL would most probably be locked on Windows (speculating) so we are back to square one.

    I am really curious to hear why ClickOnce doesn’t *feel* acceptable to you :)  Even I would agree with you (for the conversation sake)  I guess that users installing LOB apps I have in mind (e.g. accounting apps) wouldn’t mind too much installing it from MSI (if that is the only option – ClickOnce not being applicable)

    All this being said doesn’t mean I don’t respect SL any more. I do and I do respect it enough that in general I prefer Silverlight over the WPF but not in the context of LOB applications I am talking about here

    Nikola

  3. Great post as always!

    @Silverlight 4 is not cross platform environment any more

    How many users in Serbia (your target country, right?) have Mac? Why bother with Silverlight then in the first place?

    I've never test my SL app on Mac platform, but I've customers using app on Mac without any problems, and that's something, at least for me! I'm looking into Moonlight project, too, and have high hopes :).

    Silverlight is going to be merged with WPF or the other way around, but I only see it as an improvement and not as a Windows only platform gadget. Justin Angel said that it is possible to implement "COM on Mac", but is Microsoft going to implement it? All we can do is vote: dotnet.uservoice.com/…/4325-silverlight-feature-suggestions

    @Silverlight adoption rate is not good enough

    If I remember correctly it was about 30% last year. It is 60% and raising now, and it's great when you see your customer jumping in app straight away without installing any stuff! Customer is able to start your app in a seconds. I expect it to be 80+% in next year and that's something. Microsoft still didn't upgrade Windows with SL as a critical update, but I'm expecting it soon ;).

    @Silverlight tooling is good enough. WPF tooling is better

    That's right. There are no Crystal Reports, Sql Reporting Services, etc in Silverlight. That sucks, but there are (painful) workarounds if you are big enough fan, which I'm beginning to doubt, now :).

    @Silverlight programming model is more constrained then the WPF one

    @Silverlight is still technically inferior to WPF in some areas.

    Yes. Correct.

    Nikola, I understand your pain when you are trying to decide which one to use, and it's quite possible that for your type of app WPF is the way to go. However, if you have enough time for "fun" may I suggest a "merge" plan:

    Create app which works in SL and reuses same code/XAML in WPF. Use SL as a promo app with limited functionalities when client have SL installed. Use WPF when customer is more interested and have Windows installed and click Install button inside of SL promo app, or download button (if it doesn't have SL installed). Maybe there are some type of users of your app which will be satisfied with SL app all the way, and they will enjoy using it on web?

  4. Danijel,

    I was thinking about Serbia (and I have even some Serbia specific arguments supporting even more WPF) but the conclusions I presented here are "in general" – not country specific.

    Are your Mac customers using application done in Silverlight 4 or Silverlight 3? Silverlight 3 is supported, while I am not so sure about Silverlight 4. As for Justin, we all know he is crazy guy capable of doing a lot of things, but the reason why I don’t think MS would support COM+ features on Mac  in near future is based on the fact they RTM the 4.0 version and I doubt they have now budget for Mac specific (potentially hard core work). Again, just me guessing

    The thing I didn’t found in your comment is the reason why I should use SL instead of WPF other than multi targeting. I understand the value of multi targeting WPFSLWP7 promise and I am experimenting already 1+ year with the concept in a real world app  and I am not sold 100% on how useful it is due to differences in XAML , 3rd party controls etc. and the fact that using it (even with MVVM) leads me to either: a) two exact experiences – in which case why you need WPF at all or b) two different code bases (tough to maintain)

    I am still not discarding the concept itself as a pipe dream but based on limited resources I have (right now: me) having two platforms (even SL would be able to support my idea – which is not the case) looks like an overkill right now.

    All this been said, I do like Silverlight a lot (in fact large web cloud part of my app would be done in Silverlight, even with SEO problems etc.)  just trying to be pragmatic here and make a rational decision about what makes *the most* sense and for client apps it is WPF right now :)

  5. Hello,

    - SL 4 has not any kind of COM dependency. It uses "dynamic" features of C#4 to access COM automation … such as working with excel or word. So, it's still a cross platforms technology.

  6. The U.S. Navy has still refused to deploy Silverlight on its networks. In fact, every little advance since Silverlight 2 has put further nails in that coffin. I believe this remains true of the USMC as well.

  7. Do you even code in Silverlight?

    Cross-platform?  You are posting this ridiculous article and didn't even know that Silverlight runs on a Mac…LOL.  Does WPF run on Windows Phone 7?  Does WPF run on TV set top boxes?  XBOX 360?  Windows Embedded Compact 7 (new Windows tablet OS).  That claim is completely ridiculous on your part.

    Tooling is better?  Silverlight has 9 month release cadance.  Features like the control toolkit (charting), Visual State Manager came to Silverlight BEFORE WPF.

    Programming model is constrained?   With Silverlight you have have the entire web layer exposed to you.  You can create Silverlight Bing Maps visualizations.  SharePoint web parts.

    WPF is going to slowly die a death and is limited.  Notice how Silverlight is championed at almost every single major Microsoft conference: MIXX, Tech-Ed, PDC.  Do a count of WPF vs Silverlight sessions….does that give you a hint at where Microsoft is focusing resources?

    • u r right.. runs only on mac nd windows & windows phone i guess… @present we have android nd other new linux versions getting more popular..
      wish SL version 5 is platform independent …

  8. It's unfortunate that we must consider one over the other (Silverlight over WPF) for an LOB deployment.  The best option, in my opinion, is to use both given the cross platform nature of Silverlight, and the vast set of options available to a WPF 4 / .Net 4 desktop application.

    If we had 100% code compatibility between the two, even if Silverlight were just a significantly smaller subset, we could have a cross platform GUI, and a desktop application that integrated everything (front/back end services) in one place.

    The GUI then becomes our universal terminal that can be tied to a desktop framework that consists of an even bigger feature set or broader set of capabilites.

    And you would have the option of deploying your application as a service for those that want a "pay as you go" subscription model as well as being able to deploy a conventional desktop app for those that want everything in one place, need more power, or require being able to operate disconnected from the internet.

    Alas, we are only starting the approach this possiblity.  It's still easier to just pick one or the other and deal with the limitations imposed by such a choice.

  9. Bart,

    in my part of the world Mac owns 0.01% of PC market and I am not in that group (in fact never spend even 5 minutes with it).. For me  Linux support is much more important and I am glad to see Moonlight guys catching up.

    I knew before this post that here is plug in for SL 3.0, but I was not expecting that there would be plugin for 4.0 considering all the COM+ features SL4 brings to game.

    The fact there is Mac plug-in but  with certain set of features not to be used if app should run on Mac (the message I got from comments)  is not something I would call "cross platform" plugin.

    I do have some experience with Silverlight  not so sure you have the same with WPF when you compare WPF and SL DEV experience.

    As for WP7, XBOX360, set top box – fine. Give me a link and I’ll buy them today. Oh right, they stil don’t exist :)

    As for MS betting on SL – number of sessions -let wait for MIX11 and PDC11 to count SL sessions vs HTML5 sessions… While I see the future for desktop version of  unified WPFSL  platform (VS IDE commitment) I am not so sure about the web future.

    At the end, I  don’t have anything against SL. My blog post was about specific scenario of enterprise LOB applications (completely different scenario then web site scenario you are referring to) in which case WPF wins IMHO.

  10. @Bart

    please read the  Title before posting

    "5 reasons why Silverlight sucks in LOB (compared to WPF)"

    LOB = Line Of Business ( applications like BPM, Financial, Accounting, SalesPOS .. etc )

    …. XBOX?? TV??? SET TOP BOX????

    as for the windows phone.. if u ever use a windows phone for mobile POS .. u  probably will avoid using .NET  .. A serious developer has to have an understanding which  technology suits a need .. there is not a perfect solution  for everything and dogmatism will bring u troubles  :)  . I like SL 4 but for LOB I use WPF …  as for those who are talking about  death for WPF!!! hahahahaa that is stupid!!! Windows Forms are still supported and 3rd party components are still out !!! LOL !!!

  11. "I've never test my SL app on Mac platform, but I've customers using app on Mac without any problems, and that's something, at least for me! I'm looking into Moonlight project, too, and have high hopes :)."

    LOL, I also died laughing.

    "Programming model is constrained?   With Silverlight you have have the entire web layer exposed to you.  You can create Silverlight Bing Maps visualizations.  SharePoint web parts."

    LOL, Sharepoint web parts. OMG

    Now back on topic.  I have these same problems with Silverlight.  It seems that microsoft is just throwing money at another "patch" API.  Worst when you start doing WP7  development.  Its all tons of new code and TONS OF OLD CODE. They never get true cross platform unless they dump all the dump crap they did in windows 3.0

  12. i refuse to install silverlight because it messes up bing maps

  13. Silverlight messes up bing maps.. How ?

    You mean bing maps ajax based ?

  14. Silverlight should die for good, it is miserable attempt to replace flash . No one uses it beside MS & their employees . I think even html5 can replace silverlight , beside this it memory requirement,space is more than of flash

  15. Silver light does suck.  I found this page doing a search for the phrase "silverlight sucks"  after tying to access bing webmaster tools from my development pc running Ubuntu.  Even after installing the beta latest release of moonlight bing webmaster tools doesn't work.  Silverlight sucks bing sucks and the only reason I even visited the site is because now Yahoo results come from Bing.  I may not be an expert, but this kind of alienation can't be good for gaining market shares.   You know what they say.  "You can polish a turd, but it's still a turd."


Leave a comment

No trackbacks yet.