2010 In this session Neil will demonstrate how Silverlight has become an integral part of the SharePoint 2010 experience Then he will walk through current and future Silverlight Development techniques using Visual Studio Expression Blend Web Services and the new Client Object Model ID: 643798
Download Presentation The PPT/PDF document "Silverlight Development in SharePoint" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Slide1
Silverlight Development in SharePoint 2010
In this session Neil will demonstrate how Silverlight has become an integral part of the SharePoint 2010 experience. Then he will walk through current and future Silverlight Development techniques using Visual Studio, Expression Blend, Web Services and the new Client Object Model.Slide2
About the Speaker
Company: Gig WerksNeil Barkhina is an MCAD Certified professional with nearly 7 years of experience working with .NET technologies. He specializes in web development and SharePoint technologies and has worked on numerous projects including Leading Development on a SharePoint Intranet site for the largest real estate firm in New York. He has also worked in the video games industry doing 3D Game Development and Mobile Phone Applications. Slide3
About Silverlight
Browser plug-in clientSupportsWindows, Mac, LinuxIE, Firefox, SafariSupports rich media scenarios (video)
Subset of .net, subset of WPF100+ Controls OOBMobile
Future: Windows Phone 7
Third Party Moonlight project under development for GNU/LinuxSlide4
Silverlight 1
Rich Media Scenarios (Videos)Programming involved writing XAML and javascript “codebehind”Slide5
Silverlight 2
Version 2.0 released October 2008Write applications using managed code and .NET languages (C#, VB .NET)Rich UI such as animation, vector graphics and audio-video playbackDeep ZoomSlide6
Silverlight 3
New controls: datagrid, treeviewAAC audio decoding, H.264 video, 1080p streamingPerspective 3D
Bitmap APIOut-of-BrowserSlide7
Silverlight 4
Web cam and Mic supportPrintingRight mouse click supportRichTextBox control
Hosted Browser Support (html in silverlight)Multi-touchSupport for Chrome Browser
Deploy applications to “set-top boxes”Slide8
Vs. Flash
Pros:Flash is not a development environmentEasy transition for existing .NET developersEasy transition for existing Flash developers, uses many of the same concepts: key frames, animations, gradients, transformations
Able to use Visual StudioFuture: Full hardware 3D supportCons:Market penetration still lagging, but
gettings
stronger. Currently at 60% of internet devices!!Slide9
Development Methodology
Separation of Design and CodeDesigners can work independently using the Expression SuiteXAML data can be indexed by search enginesSlide10
Development Methodology
XAML
Serialization of
.net
objects
Represents visual UI, separate from implementation
Designable in Expression Blend
<
Border
CornerRadius
=
"
2
"
>
<
Border.Background
>
<
LinearGradientBrush
StartPoint
="0.5,0"
EndPoint="0.5,1"> <GradientStop Color="#FFFFFF" Offset="0"/> <GradientStop Color="#D1D1D1" Offset="1"/> </LinearGradient> </Border.Background> </Border>
border.CornerRadius = new CornerRadius(2);LinearGradientBrush lgb = new LinearGradientBrush();lgb.StartPoint = new Point(0.5, 0);lgb.EndPoint = new Point(0.5, 1);GradientStop gs = new GradientStop();gs.Color = Color.FromArgb(0,255,255,255);gs.Offset = 0;lgb.GradientStops.Add(gs);gs = new GradientStop();gs.Color = Color.FromArgb(0, 209, 209, 209);gs.Offset = 1;lgb.GradientStops.Add(gs);lgb.Background = lgb;
=
code
xamlSlide11
Themeable ControlsSlide12
Microsoft Expression
Blend is the main tool for XAML layoutExpression Design can be used for creating graphical assets. Like PhotoshopSlide13
Key Points
Silverlight uses a subset of the .NET framework.Similar to WPF, XAML syntax, not as many controlsCan’t mix DLLs between .NET and silverlightRuns in a isolated security sandbox
Can effect the DOMAll shapes defined as vectors, no loss of quality for scaling, transformationsSlide14
Limitations
Network calls must be made to the TLD from which it originated (same exact port)Can make cross domain calls with a crossdomain.xml fileCan do sockets programming with a predefined set of ports 4502-4532All Server side calls must be made to a WCF or Web Service
All Server side calls must be invoked asynchronouslySubset of .net types
Missing:
XmlDocument
, ADO.NET Data,
ArrayList
No
DataTables
, but you can use LINQ!Slide15
Why Silverlight and SharePoint?
Silverlight
SharePoint
Data Layer
Presentation
Client Integration
Logic Layer
Security
App ModelSlide16
Development Prerequisites
Visual Studio 2008 SP1Silverlight 3 tools for Visual StudioBlend 3System.Web.Silverlight DLL in GACASP .NET AJAXSlide17
Set up new project
Use new visual studio template for creating Silverlight projectsDesign surface is read only (in Visual Studio 2008)
Use Blend for LayoutSlide18
SharePoint 2007 Integration (old)
You must have the xap MIME type registered, works in IIS 7 out of the boxCan also use zip/xap trick
All communication with server must be done using web services layerI recommend web services instead of WCFWatch out for HTTP/HTTPSSlide19
SharePoint 2007 Integration (old)
Embed “Install Silverlight” image in solutionUse random string to prevent cachingUse the
System.Web.Silverlight control to ease management of Silverlight TAG (requires ScriptManager
on page)
Pass initial parameters using
InitParams
Set up width/height and
maxframerateSlide20
Current Development
Visual Studio 2010integrated designer surface and toolbox supportBlend 4 beta
Visual Studio 2010 RC for Windows Phone developmentYou can manually upload XAP file to a simple document library
Build directly into the
Clientbin
folder of SharePoint
Write an application to upload XAP to SharePointSlide21
Hosting Silverlight in SharePoint 2010
Script/markup on pageSilverlight ASP.NET controlPartsOut-of-box Silverlight Web PartCustom Web PartFull-page (web part host page)Slide22
Talking to SharePoint
Web ServicesMore coverageClient
Object ModelSite, nav, security servicesVery flexible
REST
Easiest to use
For fixed list schema
Rendering Data to Page
Web Services
Advanced Operations
SharePoint Server Operations
Client OM
Advanced List Operations
Site Operations
Security
REST
Working with list data,
fixed schemaSlide23
REST
Read/update/delete of list dataObject-oriented, ATOM-based meansStandards-based, consistent with other data sources
Details:In VS, Add Service Referencehttp://yourserver/yoursite/_vti_bin/listdata.svcSlide24
Client Object Model
Based on SharePoint server-side OMAlso for JavaScript and Managed CodeTwo main concepts:To read data from objects, you must ask for it
Reads and writes are sent in a asynchronous batchCall backs must invoke the UI thread
All namespaces don’t have “SP” at the front
Details
:
<
SharePointRoot
>\14\TEMPLATE\LAYOUTS\
clientbin
\
Asynchronous Load
modelSlide25
SOAP Web Services
Fixed functions exposed in the product, or build your ownMore MOSS, WSS functionality coveredNot all services representable in
SL WCF ClientDetails:See SDK for list of web services
Of course, also in 2007!