This open source framework will make developer’s work much easier when they develop a media player for Silverlight.
Friday, January 29, 2010
Monday, January 25, 2010
After joining in new company I rarely get time to learn new technologies than my previous company.Obviously its due to more responsibilities.But this week end I was managed to find some time to learn MEF (Managed Entity Framework) which was introduced some time back.
In simple words its all about Export,Import and Composition.ie you export a type or property then you import into another property which is present in another class.For this to happen there should be somebody in the middle.That is composition.
The export and import takes place by using attributes.Just decorate the class or property with the attribute export or import to achieve the functionality.For composition you just need one line code :-)
Exporting one type
The above code just exports one class.Lets see how this is being used or imported.
The employee view model class receives the exported type as Current.This code it not completed.To complete the code we need to compose.It is done by the line below.
This is the constructor of EmployeeViewModel class and the first line does the composition and after that if we access the object it will be initialized and ready for use.In this case it will display the default ToString method’s output ie the class name.
This is the basic concept of MEF.This can be used in data binding and for collection types etc…Next time will discuss about a data binding and MEF.
The project contains a reference to the dll System.ComponentModel.Composition.dll.You can locate this file from the attached sample or in the Silverlight 4 installation.
Sample can be downloaded from here.
Sunday, January 17, 2010
Just now got a good link in MSDN for performance optimization in Silverlight 3 applications.
Don’t know when can I get a chance to apply this in my current project :-(