Archive for May, 2007

Silverlight- Microsoft’s answer to flash

May 14, 2007

From Java vs .NET framework to ipod vs zune to silverlight vs flash… Microsoft always has the knack of coming up with strong opponents to topple the market leaders. By now, as all of us know, Silverlight is no different. I didn’t get my hands dirty with silverlight yet and so please correct me if I am wrong.

Silverlight–What is it?

Silverlight is a cross- browser, cross-platform plug in that allows developers to create .NET applications(C# etc), for delivering media and rich interactive applications (RIAs) for the Web.

The first thing I liked about it is its 1 MB size to download. Silverlight is a lightweight subset of XAML. By separating markup (XAML) from code, Silverlight provides a familiar web metaphor for developers. XAML can be embedded directly witihin an HTML file or can be kept separate. Microsoft is also introducing a new drm system, called PlayReady. The current version of Flash cannot protect content at this time. It is very easy for an ASP.NET AJAX developer to add Silverlight content.

How and why silverlight would succeed?

With all their experience in building user friendly tools, microsoft can avoid the mistakes adobe has committed and can come up with a much better toolset. Their expression suite that I saw in one of the videos is pretty impressive.

Microsoft should and will pour money in silverlight’s promotion. Given their experience, this shouldn’t be a problem.

One of the major problems with microsoft is that it isn’t cross-platform. It seems to have sorted it out with silverlight.

As of now, silverlight looks likes a clone of flash. They need to improve their feature set in future.

To conclude, a lot of developers(around 84%) doing RIAs are using adobe applications now. Silverlight is a welcome change and good competitior but I still think it has a long way to go to dethrone flash completely.

C# 3.0(Orcas) Language Features– A overkill?

May 6, 2007

The three new language features in C# 3.0 :

  • Automatic Properties
  • Object Initializers, and
  • Collection Initializers

Read this blog by Scott Guthrie.

Private int _age;

Public int Age

{ get{return _age;}

set{_age = value;}}

Firstly, by automatic properties, we can shorten a code sample above to the one below.

Public int Age{get; set;}

At first look, I thought this would be a elegant way to keep my code terse and simple. But, is this intuitive? Does a new developer find it easy to see a private field and public property in it? Also, for people like me who use add-ins like resharper for visual studio.NET, properties are automatically created. I think its simplicity and intuitiveness is lost with these automatic properties.

Unlike Automatic properties, object and collection initializers are awesome features to write concise and intuitive code.

Employee employee = new Employee{ id = “007″ name = “bond”} ;

EmployeeList employeeList = new EmployeeList{new Employee{ id = “007″ name = “bond”} } ;

The above one liners not only conserve time and space but are more intuitive and less error prone.