Monday, April 06, 2009

Discussing SilverLight!!

I was having an discussion with my wife on things to come in computer software and silverlight. below is a brief snippet:

My wife holds an computer engineering degree and is passionate about new innovations. She is a prolific programmer though she ONLY codes when she feels like(or finds a problem worth her attention) and thus is NOT a regular coder like mortals like me who are ... well, just coders, who codes for money:D


Wife: What is this buzz around Silverlight?
Subodh: Because we need smarter applications which makes extracting the required data easy and more meaningful. See; as human beings we require information. Computers provide information to us; but extracting the data using computers is cumbersome. Not many people are skillful in extracting the right information. As developers of applications our main motive is to provide easiest way to provide the information.
RIAs are a great platform as they provide animations, have in built ways to communicate with server asynchronously. The RIA application is smart enough to do some data crunching on its own and require to connect to server only when some data is required.

As we move towards smart clients; and as more people are comfortable with browsers; the momentum is towards RIAs which combine the goodies of a smart client within browsers. Silverlight provides an easy approach towards developing RIA as developers can leverage on the knowledge they aleady have on .Net platform.

Wife: I got it... But Why Silverlight? what exactly is Silverlight?
Subodh: Actually as with every platform, Silverlight have two faces. From a user perspective, Silverlight is a browser plug-in which when installed will provide Rich user experience to the user. The plugin is free download. Also the plugin is per OS and NOT per browser. what that means is that when silverlight is installed, the application built on top of it will work exactly the same on any browser ; be is IE, firefox or flock.

From a developer perspective Silverlight is a new development platform for developing RIAs. It interestingly takes all good practices from .Net platform.
For UI: SL uses XAML;
For event handling mechanisms: Javascript may be used in SL1.0; C#, VB .net may be used for SL 2.0; and there are languages like IronRuby and IronPython which is supported Silverlight Dynamic Language Runtime(DLR).
For comminicating with Server: Silverlight supports Http WCF. It also supports duplex. It even supports Sockets.


Wife: umm..  We have Silverlight 2.0... Whats deal with 3.0 version...

Subodh: Actaully, i personally like SL because it is the MIX of so many good things. The drive for SL3.0 is to bring in good practices. Now that SL2.0 is stable, the move is towards to bring in patterns like MVC (MVVM to be correct) and domain driven design. (DDD).
So we see that SL30 have a navigation project which supports features like deep linking and back and forward history of browsers. It even supports SEO. (search engine optimization)

DDD is implemented by using a Domain service, which works on the principle of DRY(Dont repeat urself). ROR(ruby on Rails) has been using the principle successfully. Domain service takes the pain out which was required earlier like creating a WCF service exposing it and then writing plumbing code to hook to the server side WCF service. Now the code at the client side is generated at run time, so the developer concentrates on just the Domain service. The validation logic is also put as cross cutting attributes on the entity property itself.

Wife: i got the MVC and the DDD part; what else is new in SL3.0?
Subodh: SL3.0 also now supports the WPF style of databinding in which an object property may be directly binded to another object declaratively in XAML itself... There are really some cool stuff which may be archived out of that just writing plain XAML. For example: a Domain service may be declared in XAML and binded to any controls data binding property with paging, filter and grouping stuff mentioned in XAML itself!!!! :D

Wife:  thats cool... I hear there is a lot on the SL UI controls also??
Subodh: Yes there are lot of new controls, for look and feel ; for graphs and dock panel etc...Also SL3.0 also have a support for 3d now!!! :D
And then there is support for scaffolding which makes programming RIA really easy.

I hope the above conversation will help you get the basics of SL...
I will be sharing some really interesting finding and gotchas on SL in nest series of blog.
Do keep your comments/ suggestions coming in.
Blogged with the Flock Browser

No comments: