Monday, March 8, 2010

Silverlight Integration with Moss 2007

What is Silver light?
Silver light is a new technology form Microsoft that enables developer to build rich, interactive user experience for web based applications.

It is a cross –browser, cross-platform plug-in that Microsoft developed to enable more compelling and interactive media based application experience on the web
It supports .Net 3.5(C#, LINQ, VB and XML serialization are also supported.), Ajax also more dynamic technologies like Phython, Java script and Ruby.

It also provides extensive library controls to customize , binding, change style templates…etc.

XAML—Extensible Application Markup Language
Silver light XAML is the subset of WPF(Windows Presentation Foundation ) XAML.
Using XAML you can layout your UI and then associate with your controls
XAML provides seleveral “structural” containers to position your controls

Ex: Canvas and add other controls to build complete UI or small part of UI.

When you are building your XAML in visual studio shows you the view that we can expect to work with it.
The view split in to Designer and XAML view.
You can Drag drop controls in to the XAML view and add properties in XAML view.
To use full-drag and drop you need to use Expression blend.—Which also provides rich set of tools to manipulate your silver light control.
Because Expression blend and Visual studios are integrated you can right click on Page.XAML to open in “Open in Expression Blend”.

Silver light integration with Moss:

Pre-requisites:
Windows server 2008/2003 Entp.
Windows sharepoint services 3.0 +wss sp1
Moss 2007 Enpt edition+Moss sp1
Visualstudios 2008 Professional edition above with SP1
Silverlight 2 tools for visual studios 2008sp1
Silverlight2 client runtime
Visual studio extensions for windows sharepoint services 3.0 versions 1.2
Expression Blend 2 SP1

After you have installed above you have to make sure that your development environment configured for Sharepoint and silver light integration.

1) Change MIME type in IIS to support silverlight application.
2) Change web.config file in your root sharepoint direction to support silver light application
3) Ensure that syste.web.silverlight .dll is added in your GAC.

After that

Follow the below basic steps:

1) Create silverlight web application Project VS 2008.
2) Create .xap file
3) Create new-->sharepoint webpart
4) Add reference of System.web.silverlight.DLL to this webpart
4) In child controls

System.web.UI.silverlightcontrols.silverlight test= new System.web.UI.silverlightcontrols.silverlight();

test.ID="testID";
test.source="http://xyz/xaps/silver.xap"; // URL of silver light application
test.width= new system.web.UI.webcontrols.unit(900);
test.Height= new system.web.UI.webcontrols.unit(650);

this.contols.ADD(test);

5) Deploy the webpart.

No comments:

Post a Comment