Silverlight as AJAX replacement

For discussions about game development that does not fit in any of the other topics.
Post Reply
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Silverlight as AJAX replacement

Post by Jackolantern »

In my journey of learning Silverlight, I came across some pretty nifty functionality it has. It can both read and alter the DOM in a very consistent manner, making it more akin to jQuery than Javascript. There are some projects out there that are creating small, single-color Silverlight applications that sit in the corner of a page that are only big enough to display the "Get Silverlight" logo if the user does not have it, and then turn the same color as the background if they do, where they will exist only to control the DOM and communicate with various servers. Instead of making a very lengthy article about it, I figured I would make a Pro and Con style list for the idea of completely replacing, or nearly replacing Javascript/AJAX with Silverlight.

Pros:
- An extremely robust programming platform that is fully object-oriented with many modern features that will likely never make their way into Javascript.
- Full, real-time networking access through either WCF, sockets, or any other solution.
- Fully cross-browser, relieving the developer of normal Javascript-related cross-browser issues.
- Client-side access of web services.
- Fully unit-testable with excellent libraries and tools to support it.
- Visual Studio.
- Cross-language support, being able to be used by any .NET language (C#, VB.NET, IronPython, F#, etc.).

Cons:
- Requires a plugin. Even though Silverlight has greater than 60% installation base, that is a far cry from the 95%+ Flash install base. This means you are pretty much guaranteed to have some users that won't have the plugin and will need to download and install it. While this is relatively painless and fast process, some users may not feel comfortable downloading it, or some inexperienced computer users may get confused during, or not understand, the process.
- Using an RIA plugin means that your page may not be usable on most mobile devices.
- Some projects may be better off designing with WebSockets in mind, depending on the future support for WebSockets among browsers and some issues with browser WS lock-outs being resolved.
- While there are work-arounds, Silverlight is not equally supported in the Opera browser and on the Linux OS. The Moonlight project and a community-created hack for Opera can fix both of these, but it is fairly unrealistic to think that a user will go through all that effort just to use your application, particularly if they are trying your application on impulse.
The indelible lord of tl;dr
User avatar
hallsofvallhalla
Site Admin
Posts: 12026
Joined: Wed Apr 22, 2009 11:29 pm

Re: Silverlight as AJAX replacement

Post by hallsofvallhalla »

nice read, thanks! I have often found myself dabbling with silverlight. I am always just scared that MS will come up with something new or just abandon it being that it did not take off like they expected. Not saying it is not big but it is not near as used as they expected.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: Silverlight as AJAX replacement

Post by Jackolantern »

Actually it has made crazy progress in the last 14 months, almost all of which is due to Netflix. Netflix chose Silverlight due to SL's superior video streaming capabilities over Flash, and as Netflix web streaming has taken off, so has Silverlight! To put it into perspective, about 14 - 18 months ago, Silverlight 3 was installed on ~23% of all internet-connected personal computers (including Macs) worldwide. Today, Silverlight 4 (which hasn't been out all that long) is installed on 60%+ of the same base. That is huge for one year, and much faster growth than Flash ever had in any similar period. Of course the argument could be made that the 20% - 60% growth range is going to be the fastest, and Flash's growth patterns could possibly support that (Flash's 80% - 90% took over 3 years, I suppose because you are wearing down people who actively don't want it lol).

Of course there is always a worry with technologies like Flash, C#, Silverlight and other proprietary technologies that they could be discontinued due to something else coming out. But, if we look back at Visual Basic 6, we can see that just because something is superseded doesn't mean we have to stop using it! There are still plenty of people today using VB6 and maintaining applications created with it. Further bug fixes have not seemed to be a problem since it was actively supported by Microsoft until 2009, more than a decade after it was released. This seems to be longer than most open source software versions are actively supported by their creators and/or community, as most users will have moved to a newer edition by then. In the end, no technology will last a developer forever without having to learn something new or upgrade your skillset.

I wholeheartedly suggest to check out Silverlight! For what I plan to use it for, it seems to be the most logical choice!
The indelible lord of tl;dr
Post Reply

Return to “General Development”