Tuesday, July 5, 2011

ECMAScript vs. Silverlight Object Model

In modern web application design, the requirement to add client-side code is becoming increasing popular that’s why I was curious to know, 
Is Silverlight object model is better than ECMAscript object model?
When you are working on Sandbox solution and customizing the list forms (NewForm or EditForm) youhave multiple approaches:

1. You can use SharePoint Designer and Customize list Forms and then use ECMAScript object model to implement business logic inside that forms.
2. Second approach is to design New, Edit and Display forms of list from scratch in Silverlight and use Silverlight object model for business logic implementation.

If you decide you want to add client-side code to a SharePoint solution, then next step is to choose between above approaches. Let's look at the pros and cons of each approach.

ECMAScript:
1. Multiple browser support.
2. Built-in support for ECMAScript, no downloads required.
3. No compile-time type checking and IntelliSense.
4. Need advanced programming skills with ECMAScript to work with Web Services.
5. Automatically generates form based on the SharePoint list columns.

Silverlight:
1. User must download and install the Silverlight runtime to run Silverlight application.
2. Deployment of Silverlight applications is now easy in SharePoint 2010, as SharePoint Foundation includes several different Silverlight 3 applications in standard pages.
3. You can write your code in Visual Studio 2010 with IntelliSense and in C# or VB language.
4. Compile-time type checking.
5. Using Silverlight OM it’s easier to program against web services.
6. Form design needs to be done from scratch.

Reference links:

No comments:

Post a Comment