Download presentation
Presentation is loading. Please wait.
Published byAbigail Anthony Modified over 6 years ago
1
Tech Ed North America 2010 11/30/2018 4:43 AM Required Slide SESSION CODE: OSP301 Building Rich Internet Applications with Microsoft Silverlight and Microsoft SharePoint Server 2010 Bob German Technology Architect Microsoft Technology Center | Boston © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
2
Play the Microsoft Office & SharePoint Track Tag Contest
Tech·Ed North America 2009 11/30/2018 4:43 AM Play the Microsoft Office & SharePoint Track Tag Contest Download the Microsoft Tag Reader Open the internet browser on your mobile phone and visit Grand Prize (1) Xbox 360 Prize Package and Microsoft® Office 2010 Daily Prizes 40 copies of Microsoft® Office 2010 Come to the Expo Hall – Yellow Section OSP Info Desk for Official Rules & Collect Additional Tags from all OSP Track Sessions, Speakers and Expo Hall! © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
3
Session Agenda Getting Started SharePoint Data in Silverlight
Brief background Building a solution “from scratch” with Visual Studio 2010 SharePoint Data in Silverlight Passing data on the web page Silverlight Client Object Model WCF Data Services (RESTful access to SharePoint) More topics and solution “nuggets” Cross-domain access Web Part Connections Maps, webcams and more!
4
SharePoint is… An ASP.NET application using SQL Server Web Front End
HTTP/HTTPS web interface XML Web services WebDAV (Office client integration) Web Front End SharePoint ASP.NET IIS SQL Server
5
Silverlight is… A browser plug-in (mostly): Your app runs in a sandbox
XAML declarative markup Contains subset of .NET runtime Cross-browser/cross-platform Can interact with the network and web browser User Code Browser Controls Managed Interop Web Server CLR Prop sys Layout Text Media Gfx Deep zoom Image
6
Why Build a Silverlight UI?
Easier to build and test Common runtime fewer browser compatibility headaches Familiar .net semantics Separate design from coding Common development and debugging platform (Visual Studio) More powerful Animations, media, data binding, etc. Client Integration HTML Bridge Out of browser File System Multi-touch
7
Silverlight Development
Subset of Windows Presentation Foundation XAML (eXtensible Application Markup Language) Declarative serialization of .net objects Separates visual UI from application logic Expression Blend is a rich design tool for XAML xaml C# equivalent <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.Background = lgb;
8
Coding in Silverlight Subset of .net types Missing: XmlDocument, ADO.NET Data, ArrayList Silverlight projects can only reference Silverlight assemblies Web-style Networking All calls must be asynchronous Rules of the web apply: generally, you can only call back to web services the same domain Interact with UI only on the UI Thread (use Dispatcher)
9
Two Sandboxes are better than one!
Sandboxed Solutions SharePoint Solution runs Partly trusted Same .wsp file – easily selected in Visual Studio 2010 project settings Installed at the Site Collection level Deployed as content in content DB Ideal in hosting situations Declarative features light up Code runs in a separate process Exposes a subset of Microsoft.SharePoint Code Access Security policy limits runtime access Easy to Manage Site Collection Solution Gallery Central Administration for managing and monitoring solutions, resource quotas Two Sandboxes are better than one! .xap Silverlight .wsp SharePoint
10
Development Environment
Two targets, one tool: Visual Studio 2010! Visual Studio setup: One Visual Studio solution per WSP: A project per Silverlight application A project for SharePoint solution Use Output References to copy .xap files to a Module for deployment “Enable Silverlight Debugging” checkbox (on SharePoint tab of startup project property page)
11
Hosting Silverlight It’s Just an <object> Tag!
Microsoft SharePoint Conference 2009 11/30/2018 Hosting Silverlight It’s Just an <object> Tag! <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source“ value=" <param name="onerror" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value=“ " /> <param name="autoUpgrade" value="true" /> <param name=“initparams” value=“Param1=Value1” /> <!– HTML to render if Silverlight not installed --> </object> © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
12
Getting Started with Silverlight 4.0 and SharePoint 2010 Development
11/30/2018 4:43 AM Hello Silverlight Getting Started with Silverlight 4.0 and SharePoint 2010 Development demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
13
SharePoint Data Access from Silverlight Many options
11/30/2018 4:43 AM SharePoint Data Access from Silverlight Many options Client Object Model WCF Data Services (REST access to lists – formerly “ADO.NET Data Services”) Call SharePoint web services API Pass data on the HTML page Call a custom web service SharePoint Server Silverlight Plug-in © 2004 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.
14
Typical Service Interaction
User Browses Web Browser SharePoint Server Get Request (page) Get Response (page) Silverlight Plug-in Load Get Request (data) Do we really need another round trip to the server? Get Response (data)
15
Piggybacking on the Page (more efficient for initial data read)
User Browses Web Browser SharePoint Server Get Request (page) Get Response (page,data) Silverlight Plug-in Load (data ref) Read (data)
16
Silverlight HTML Bridge
Access the HTML DOM from Silverlight Call JavaScript from Silverlight Silverlight code from Javascript Call Javascript event handlers from Silverlight Call Silverlight event handlers from Javascript Pass Silverlight types to (and return them from) Javascript functions and objects
17
JSON with picture data (hidden field)
Picture View Web Part Web Page Web Part < object> tag with hidden field name Image Library JSON with picture data (hidden field) Silverlight Viewer
18
demo Picture View Web Part Reducing round trips via HTML Bridge
11/30/2018 4:43 AM Picture View Web Part Reducing round trips via HTML Bridge Running Out of Browser Printing from Silverlight demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
19
Large Datasets Too much data Slow, unresponsive UX
Too much data Overwhelms the user Answer: Only load what the user needs to see Allow user to query for information Allow user to page through data WCF Data Services is your friend! (a.k.a. ADO.NET Data Services) Example: To show 3rd group of 10 rows, ?$top=10&$skip=20 REST Syntax LINQ Syntax Function $skip=n .Skip<T>(n) Skip n rows $top=n .Take<T>(n) Return the top n rows
20
Paged List View Web Part
Web Page < object> tag with hidden field name List JSON with initial load of list data (hidden field) Silverlight Viewer ListData.svc
21
Paging through data with WCF Data Services
11/30/2018 4:43 AM Large Datasets Paging through data with WCF Data Services demo © 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
22
External Data Access Why surface non-SharePoint data in Silverlight?
Authenticate directly from client (may be good or bad ) Access data not available in a Sandboxed Solution Rich, multithreaded UI Issue: Cross-domain access
23
External Data Access Silverlight won’t access a server at a different DNS domain, protocol or port than the hosting page unless… Target server has contentaccesspolicy.xml or crossdomain.xml files granting access, OR, You use a proxy (your own or a public one), OR, You use the Javascript bridge (then you’re subject to the browser’s cross-domain policy) “Out of Browser” always needs policy file (unauthenticated) Silverlight Browser x foo.pages.com bar.services.com
24
Solution “Nuggets” Demonstrations of more SharePoint and Silverlight Solutions
25
Summary It only takes an <object> tag to put Silverlight in SharePoint Two Sandboxes is Better than One (Silverlight and Sandboxed Solutions) Use the HTML bridge to reduce round trips and post back data on page Allow user browsing to trigger accessing only the data you need Make mash-ups with connected web parts
26
Resources Source Code for demos in this session: My blog (see previous postings and watch for more): Books: Previous generation, still helpful Ch. 5 and 14 are Silverlight
27
Play the Microsoft Office & SharePoint Track Tag Contest
Tech·Ed North America 2009 11/30/2018 4:43 AM Play the Microsoft Office & SharePoint Track Tag Contest Download the Microsoft Tag Reader Open the internet browser on your mobile phone and visit Grand Prize (1) Xbox 360 Prize Package and Microsoft® Office 2010 Daily Prizes 40 copies of Microsoft® Office 2010 Come to the Expo Hall – Yellow Section OSP Info Desk for Official Rules & Collect Additional Tags from all OSP Track Sessions, Speakers and Expo Hall! © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
28
Play the Microsoft Office & SharePoint Track Tag Contest
Tech·Ed North America 2009 11/30/2018 4:43 AM Play the Microsoft Office & SharePoint Track Tag Contest Download the Microsoft Tag Reader Open the internet browser on your mobile phone and visit Related Session Time DEV303 – Building RESTful Applications with Open Data Protocol Wednesday 3:15pm Room 283 OSP08-HOL – Developing a Microsoft SharePoint 2010 UI with Silverlight in Visual Studio 2010 (ongoing) OSP212 – Overview of the SharePoint 2010 Developer Platform Monday 4:30pm Room 252 OSP308 – Developing with Microsoft SharePoint Server 2010 Sandboxed Solutions Tuesday 8:00am Room 276 OSP309 – Developing with REST and LINQ in Microsoft SharePoint 2010 Wednesday 5:00pm Room 272 DEV318 – Prototyping Rich Microsoft Silverlight 4 Applications with Microsoft Expression Blend + Sketchflow Tuesday 8:00am Room 261 Come to the Expo Hall – Yellow Section OSP Info Desk for Official Rules & Collect Additional Tags from all OSP Track Sessions, Speakers and Expo Hall! © 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
29
Track Resources For More Information – http://sharepoint.microsoft.com
Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Tech Ed North America 2010 11/30/2018 4:43 AM Track Resources For More Information – SharePoint Developer Center – SharePoint Tech Center – Official SharePoint Team Blog – © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
30
Required Slide Speakers, please list the Breakout Sessions, Interactive Sessions, Labs and Demo Stations that are related to your session. Tech Ed North America 2010 11/30/2018 4:43 AM Related Content Breakout Sessions – See Conference Guide for full list of OSP Track Sessions Interactive Sessions – OSP Track has 10 Interactive Sessions – OSP01-INT – OSP10-INT Hands-on Labs – OSP01-HOL – OSP20-HOL Product Demo Stations – Yellow Section, OSP Office 2010, SharePoint 2010, Project Server 2010, Visio have kiosks and demos © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
31
Resources Learning Required Slide www.microsoft.com/teched
Tech Ed North America 2010 11/30/2018 4:43 AM Required Slide Resources Learning Sessions On-Demand & Community Microsoft Certification & Training Resources Resources for IT Professionals Resources for Developers © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
32
Complete an evaluation on CommNet and enter to win!
Tech Ed North America 2010 11/30/2018 4:43 AM Required Slide Complete an evaluation on CommNet and enter to win! © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
33
Sign up for Tech·Ed 2011 and save $500 starting June 8 – June 31st
You can also register at the North America 2011 kiosk located at registration Join us in Atlanta next year
34
Tech Ed North America 2010 11/30/2018 4:43 AM
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION. © 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
35
Required Slide Tech Ed North America 2010 11/30/2018 4:43 AM
© 2010 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.