Tuesday, June 15, 2010

C# 3.0 - Features

1. Object and Collection Initializers
Object initializers let you assign values to any accessible fields or properties of an object at creation time without having to explicitly invoke a constructor.
http://msdn.microsoft.com/en-us/library/bb384062.aspx

2. Anonymous types - (var)
Anonymous types provide a convenient way to encapsulate a set of read-only properties into a single object without having to first explicitly define a type. The type name is generated by the compiler and is not available at the source code level. The type of the properties is inferred by the compiler.
http://msdn.microsoft.com/en-us/library/bb397696.aspx

3. Auto Implemented properties.

Auto-implemented properties make property-declaration more concise when no additional logic is required in the property accessors. They also enable client code to create objects
http://msdn.microsoft.com/en-us/library/bb384054.aspx

4. Lambda Expression
A lambda expression is an anonymous function that can contain expressions and statements, and can be used to create delegates or expression tree types.
http://msdn.microsoft.com/en-us/library/bb397687.aspx

5. Extension method
Extension methods enable you to "add" methods to existing types without creating a new derived type, recompiling, or otherwise modifying the original type. Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type. For client code written in C# and Visual Basic, there is no apparent difference between calling an extension method and the methods that are actually defined in a type
http://msdn.microsoft.com/en-us/library/bb383977.aspx

Saturday, January 2, 2010

Cairngorm and MVVM

Now everybody is changing to RIA(Rich Internet Application). Formally there was only one a matured platform, ie Abode Flex. But in .net framework 3.0 Microsoft came up with new technology SilverLight. After a one and half year it's become more popular than Adobe Flex.

The Cairngorm is the most common design pattern for Adobe Flex and the MVVM(Model View ViewModel) for SilverLight. Both patterns are the extension of the Model View Controller. The MVVM is also using in the WPF application.

Here I'm adding useful links for both.

Cairngorm
http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm

MVVM
http://msdn.microsoft.com/en-us/magazine/dd458800.aspx