Silverlight and jQuery "may be" intended for similar things, rich user interface, but Silverlight has a complete framework that utilizes the power of .NET and provide rich feature set.
Some "time" back, I was given a choice to decide between jQuery and Silverlight.
I did not delve into the discussion of what Silverlight is and what ASP.NET MVC + Jquery + html for a web application. is. I just presented the solution, using jQuery for MVC application, Silverlight if its intranet based.
First, please understand that Silverlight is not Macromedia Flash. It is far more superior, and elegant; -- and -- it has the "capabilities" of Flash.
1). For competitive reasons you may want to stick with MVC at the time being. Silverlight is a great technology but not everyone has the plugin yet. If you write standards compliant HTML / CSS etc. with an MVC site your users will not have to download any additional plug-ins; just a browser. It depends on your application.
2). If you want mobile support today Silver-light doesn’t have it so MVC wins.
In all other cases, Silverlight will usually make more sense – because it costs so much less to maintain and upgrade the site:
To do Silverlight you need expertise in:
- XAML
- A .NET language
To do MVC you need expertise in:
- A .NET language
- MVC
- ASP.NET
- HTML
- CSS
- Browser compatibility (present, past and future)
- Javascript
- JQuery
Why would an employer want to pay to keep someone up to date in all those skills?
I’ve answered this to the best of my ability, through my opinions shared below.
3). Why can’t you use both?
The real question here is not Technology X vs. Technology Y. More likely it is:
What technology or set of technologies will help me accomplish my goal in the most effective way possible?
Browser Plugin
Generally speaking, a browser plugin (Flash, Silverlight) is going to give you a lot of power in terms of rich user experience that would be difficult or impossible to duplicate using pure JavaScript. It is also a different programming paradigm, because it is a stateful application running inside the browser.
HTML + JavaScript
JQuery is just one of many JavaScript frameworks out there for building rich client experiences for your web application. It offers a lot of flexibility, and has a very broad reach, but at the end of the day you are still working with the DOM, and will be limited to what can be accomplished using JavaScript and angle brackets. This is also a stateless programming paradigm so you need to understand how that fits in with your overall architecture when designing your application.
Hybrid
More than likely you will be able to take advantage of both. Figure out what sub-section of your application really needs rich user interaction, and code that in Flash/Silverlight or whatever you want. The rest of your site can be done AJAX style with whatever combination of server/client frameworks you want. If you like JQuery, go with it, but don’t discount other frameworks just because JQuery is all the rage right now.
I had to research some weeks ago on which UI technology would be the best choice for the applications that my client has and is going to build in the next couple of years. We are a .NET shop, so there are 2 major directions you could move into: standards-based web development, or Silverlight.
When you have to recommend one over the other, you ideally want to be able to back up your choice with more than just some opinions.
Silverlight scores very badly for a web-apps’s designing and implementing strategies, the fact that it’s not standards-compliant(like usual MS products) obviously hurts. But there’s more to it than that. First of all, the ‘Mobile’ story pretty much kills it (Android and iOS don’t support it, Microsoft hasn’t even announced a Silverlight browser plugin for WP7 yet and who knows if it will? That means that Silverlight web applications aren’t usable on any mobile device right now).
But there are several areas where SilverLight scores better than ASP.NET – MVC3 with jQuery: When it comes to Tools, you can’t deny the fact that Visual Studio and Blend cover a lot of ground when it comes to the whole Silverlight developer experience. At the very least, you can mostly stick to your familiar integrated environment, whereas with standards-based web development, you’re likely to spend some time in Firebug or Google Chrome’s developer tools instead of sticking almost entirely with Visual Studio.
The biggest benefit that Silverlight has over standards-based web development is that you only need to know C# and XAML. With standards-based web development, you have to know HTML, CSS, JavaScript and the language of your server-side technology, in this case also C#. This might impact your ability to find new developers so Silverlight does have sort of an advantage there.
From a security point of view, Silverlight also scores better because you don’t really have to worry about common issues such as XSS, CSRF and other vulnerabilities that are common in web-development.
You can download the analysis spreadsheet here.
Conclusion
In the end, do your homework, and make an informed decision. You will be happier having learned the pros and cons of multiple technologies and frameworks, and chosen one based on your needs, not just because someone on SO told you that X technology was awesome so you should only ever use it.
No comments:
Post a Comment