SlideShare a Scribd company logo
1 of 26
Building Applications with Microsoft Silverlight andMicrosoft SharePointServer 2010 Bob German Technology Architect Microsoft Technology Center | Boston
Session Agenda Getting Started 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 Open Data Protocol (REST) access to SharePointusing WCF Data Services More topics and solution “nuggets” Cross-domain access Web Part Connections Search, maps, webcams and more!
SharePoint is… An ASP.NET application using SQL Server HTTP/HTTPS web interface XML Web services WebDAV (Office client integration) Web Front End SharePoint ASP.NET SQL Server IIS
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 Web Server User Code Browser Controls Managed Interop Prop sys Deep zoom CLR Layout Text Media Gfx Image
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
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 C# equivalent xaml border.CornerRadius = new CornerRadius(2);LinearGradientBrushlgb = new LinearGradientBrush(); lgb.StartPoint = new Point(0.5, 0);lgb.EndPoint = new Point(0.5, 1); GradientStopgs = 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; <Border CornerRadius="2">                                        <Border.Background>                                            <LinearGradientBrushStartPoint="0.5,0" EndPoint="0.5,1">      <GradientStop Color="#FFFFFF" Offset="0"/>     <GradientStop Color="#D1D1D1" Offset="1"/>                                            </LinearGradient>  </Border.Background>                                    </Border>
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)
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 ofMicrosoft.SharePoint Code Access Security policy limitsruntime access Easy to Manage Site Collection Solution Gallery Central Administration for managing andmonitoring solutions, resource quotas Two Sandboxes arebetter than one! .xap Silverlight .wsp SharePoint
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 filesto a Module for deployment “Enable Silverlight Debugging” checkbox(on SharePoint tab of startupproject property page)
Hosting SilverlightIt’s Just an <object> Tag! <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%">      <param name="source“     value="http://server/ClientBin/HelloWorld.xap"/>       <param name="onerror" value="onSilverlightError" />       <param name="background" value="white" />       <param name="minRuntimeVersion" value=“3.0.0.0" />       <param name="autoUpgrade" value="true" />       <param name=“initparams” value=“Param1=Value1” />        <!– HTML to render if Silverlight not installed --> </object>
Hello Silverlight Getting Started with Silverlight 4.0 and SharePoint 2010 Development demo
SharePoint Data Access from SilverlightMany options Client Object Model WCF Data Services(REST access to lists – formerly “ADO.NET Data Services”) Call SharePoint webservices API Pass data on the HTML page Call a custom web service SharePoint Server SilverlightPlug-in
Get Request (page) Get Response (page) Load Get Request (data) Typical Service Interaction User Browses Web Browser SharePoint Server SilverlightPlug-in Do we really need another round trip to the server? Get Response (data)
User Browses Get Request (page) Get Response (page,data) Load (data ref) Read (data) Web Browser SharePoint Server SilverlightPlug-in Piggybacking on the Page(more efficient for initial data read)
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
Picture View Web Part Web Page Web Part < object> tag with hidden field name Image Library JSON with picture data (hidden field) Silverlight Viewer
Picture View Web Part ,[object Object]
Running Out of Browser
Printing from Silverlightdemo
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) This uses Open Data Protocol (OData)to SharePoint Example: To show 3rdgroupof 10 rows, ?$top=10&$skip=20
Paged List View Web Part Web Page Web Part ListData.svc < object> tag with hidden field name List JSON with initial load of list data (hidden field) Silverlight Viewer
Large Datasets Paging through data with WCF Data Services demo
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
External Data Access Silverlight won’t access a server at a differentDNS 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) x Silverlight Browser bar.services.com foo.pages.com
Solution “Nuggets” demo Demonstrations ofmore SharePoint and Silverlight Solutions
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

More Related Content

What's hot

The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...SPTechCon
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008Hossein Zahed
 
Hard learned CSOM and REST tips
Hard learned CSOM and REST tipsHard learned CSOM and REST tips
Hard learned CSOM and REST tipsSPC Adriatics
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiencesgoodfriday
 
HTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptHTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptZac Gordon
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overviewmdc11
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointMark Rackley
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP TutorialLorna Mitchell
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOMMark Rackley
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web appsIvano Malavolta
 
High performance website
High performance websiteHigh performance website
High performance websiteChamnap Chhorn
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government DevelopersFrank La Vigne
 
Share point apps the good, the bad, and the pot of gold at the end of the r...
Share point apps   the good, the bad, and the pot of gold at the end of the r...Share point apps   the good, the bad, and the pot of gold at the end of the r...
Share point apps the good, the bad, and the pot of gold at the end of the r...Bill Ayers
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersRob Windsor
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Sonja Madsen
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 Mark Rackley
 
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonCSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonKunaal Kapoor
 
Introdution to HTML 5
Introdution to HTML 5Introdution to HTML 5
Introdution to HTML 5onkar_bhosle
 

What's hot (20)

The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Microsoft SQL Server 2008
Microsoft SQL Server 2008Microsoft SQL Server 2008
Microsoft SQL Server 2008
 
Hard learned CSOM and REST tips
Hard learned CSOM and REST tipsHard learned CSOM and REST tips
Hard learned CSOM and REST tips
 
Lessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX ExperiencesLessons from the Trenches: Engineering Great AJAX Experiences
Lessons from the Trenches: Engineering Great AJAX Experiences
 
Lessons
LessonsLessons
Lessons
 
HTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScriptHTML5, CSS3, and JavaScript
HTML5, CSS3, and JavaScript
 
Silverlight 5 whats new overview
Silverlight 5 whats new overviewSilverlight 5 whats new overview
Silverlight 5 whats new overview
 
SPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePointSPTechCon 2014 How to develop and debug client side code in SharePoint
SPTechCon 2014 How to develop and debug client side code in SharePoint
 
Web Services PHP Tutorial
Web Services PHP TutorialWeb Services PHP Tutorial
Web Services PHP Tutorial
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
Local storage in Web apps
Local storage in Web appsLocal storage in Web apps
Local storage in Web apps
 
High performance website
High performance websiteHigh performance website
High performance website
 
Intro to .NET for Government Developers
Intro to .NET for Government DevelopersIntro to .NET for Government Developers
Intro to .NET for Government Developers
 
Share point apps the good, the bad, and the pot of gold at the end of the r...
Share point apps   the good, the bad, and the pot of gold at the end of the r...Share point apps   the good, the bad, and the pot of gold at the end of the r...
Share point apps the good, the bad, and the pot of gold at the end of the r...
 
JavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint DevelopersJavaScript and jQuery for SharePoint Developers
JavaScript and jQuery for SharePoint Developers
 
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...Quick start guide to java script frameworks for sharepoint add ins sharepoint...
Quick start guide to java script frameworks for sharepoint add ins sharepoint...
 
SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013 SharePoint & jQuery Guide - SPSTC 5/18/2013
SharePoint & jQuery Guide - SPSTC 5/18/2013
 
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday HoustonCSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
CSOM (Client Side Object Model). Explained @ SharePoint Saturday Houston
 
Introdution to HTML 5
Introdution to HTML 5Introdution to HTML 5
Introdution to HTML 5
 
Html5 Basic Structure
Html5 Basic StructureHtml5 Basic Structure
Html5 Basic Structure
 

Viewers also liked (9)

BASPUG Meeting 7/11/12 - Presentation from Bill English
BASPUG Meeting 7/11/12 - Presentation from Bill EnglishBASPUG Meeting 7/11/12 - Presentation from Bill English
BASPUG Meeting 7/11/12 - Presentation from Bill English
 
BASPUG 8/13/13 Meeting
BASPUG 8/13/13 MeetingBASPUG 8/13/13 Meeting
BASPUG 8/13/13 Meeting
 
February 20th, 2013 BASPUG Meeting
February 20th, 2013 BASPUG MeetingFebruary 20th, 2013 BASPUG Meeting
February 20th, 2013 BASPUG Meeting
 
January 9th, 2013 BASPUG Meeting
January 9th, 2013 BASPUG MeetingJanuary 9th, 2013 BASPUG Meeting
January 9th, 2013 BASPUG Meeting
 
February 20th, 2013 Presentation - Chris McNulty
February 20th, 2013 Presentation - Chris McNultyFebruary 20th, 2013 Presentation - Chris McNulty
February 20th, 2013 Presentation - Chris McNulty
 
I ready presentation for teacher training 9.16.2011
I ready presentation for teacher training 9.16.2011I ready presentation for teacher training 9.16.2011
I ready presentation for teacher training 9.16.2011
 
6/9/10 Boston Area SharePoint Users Group Meeting
6/9/10 Boston Area SharePoint Users Group Meeting6/9/10 Boston Area SharePoint Users Group Meeting
6/9/10 Boston Area SharePoint Users Group Meeting
 
4/13/11 Boston Area SharePoint Users Group Meeting
4/13/11 Boston Area SharePoint Users Group Meeting4/13/11 Boston Area SharePoint Users Group Meeting
4/13/11 Boston Area SharePoint Users Group Meeting
 
Boston Area SharePoint Users Group November 9th, 2011 Meeting
Boston Area SharePoint Users Group November 9th, 2011 MeetingBoston Area SharePoint Users Group November 9th, 2011 Meeting
Boston Area SharePoint Users Group November 9th, 2011 Meeting
 

Similar to Building Apps with Silverlight and SharePoint

DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightClint Edmonson
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentRandy Connolly
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps todayRandy Williams
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 RefresherIvano Malavolta
 
Introduction to Microsoft Silverlight
Introduction to Microsoft SilverlightIntroduction to Microsoft Silverlight
Introduction to Microsoft SilverlightGlen Gordon
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetAdil Mughal
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsIvano Malavolta
 
Parallel minds silverlight
Parallel minds silverlightParallel minds silverlight
Parallel minds silverlightparallelminder
 
Silverlight Document Search Engine
Silverlight Document Search EngineSilverlight Document Search Engine
Silverlight Document Search EngineMustata Bogdan
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersSascha Corti
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsDave Allen
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebGeorge Kanellopoulos
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Jonas Follesø
 

Similar to Building Apps with Silverlight and SharePoint (20)

Spsmi13 charts
Spsmi13 chartsSpsmi13 charts
Spsmi13 charts
 
HTML5
HTML5HTML5
HTML5
 
DODN2009 - Jump Start Silverlight
DODN2009 - Jump Start SilverlightDODN2009 - Jump Start Silverlight
DODN2009 - Jump Start Silverlight
 
Web II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side developmentWeb II - 01 - Introduction to server-side development
Web II - 01 - Introduction to server-side development
 
Building the next generation of browser apps today
Building the next generation of browser apps todayBuilding the next generation of browser apps today
Building the next generation of browser apps today
 
[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher[2015/2016] HTML5 and CSS3 Refresher
[2015/2016] HTML5 and CSS3 Refresher
 
Introduction to Microsoft Silverlight
Introduction to Microsoft SilverlightIntroduction to Microsoft Silverlight
Introduction to Microsoft Silverlight
 
DevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp NetDevNext - Web Programming Concepts Using Asp Net
DevNext - Web Programming Concepts Using Asp Net
 
HTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile appsHTML5 & CSS3 refresher for mobile apps
HTML5 & CSS3 refresher for mobile apps
 
Parallel minds silverlight
Parallel minds silverlightParallel minds silverlight
Parallel minds silverlight
 
Silverlight Document Search Engine
Silverlight Document Search EngineSilverlight Document Search Engine
Silverlight Document Search Engine
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
Word camp nextweb
Word camp nextwebWord camp nextweb
Word camp nextweb
 
HTML5 Intoduction for Web Developers
HTML5 Intoduction for Web DevelopersHTML5 Intoduction for Web Developers
HTML5 Intoduction for Web Developers
 
php
phpphp
php
 
Data Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight ApplicationsData Driven WPF and Silverlight Applications
Data Driven WPF and Silverlight Applications
 
WordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWebWordCamp Thessaloniki2011 The NextWeb
WordCamp Thessaloniki2011 The NextWeb
 
HTML5 Refresher
HTML5 RefresherHTML5 Refresher
HTML5 Refresher
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 

More from Boston Area SharePoint Users Group

Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...
Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...
Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...Boston Area SharePoint Users Group
 
SharePoint Integration and the BDC - Richard Harbridge and Mark Brahmhall
SharePoint Integration and the BDC - Richard Harbridge and Mark BrahmhallSharePoint Integration and the BDC - Richard Harbridge and Mark Brahmhall
SharePoint Integration and the BDC - Richard Harbridge and Mark BrahmhallBoston Area SharePoint Users Group
 

More from Boston Area SharePoint Users Group (17)

BASPUG Meeting deck from 7/11/12
BASPUG Meeting deck from 7/11/12BASPUG Meeting deck from 7/11/12
BASPUG Meeting deck from 7/11/12
 
Boston Area SharePoint Users Group January 11th, 2012 Meeting
Boston Area SharePoint Users Group January 11th, 2012 MeetingBoston Area SharePoint Users Group January 11th, 2012 Meeting
Boston Area SharePoint Users Group January 11th, 2012 Meeting
 
Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...
Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...
Scott Jamison - Maximizing Value and Getting the Most out of SharePoint - BAS...
 
10/12/11 Boston Area SharePoint Users Group Meeting
10/12/11 Boston Area SharePoint Users Group Meeting10/12/11 Boston Area SharePoint Users Group Meeting
10/12/11 Boston Area SharePoint Users Group Meeting
 
7/13/11 Boston Area SharePoint Users Group Meeting
7/13/11 Boston Area SharePoint Users Group Meeting7/13/11 Boston Area SharePoint Users Group Meeting
7/13/11 Boston Area SharePoint Users Group Meeting
 
3/9/11 Boston Area SharePoint Users Group Meeting
3/9/11 Boston Area SharePoint Users Group Meeting3/9/11 Boston Area SharePoint Users Group Meeting
3/9/11 Boston Area SharePoint Users Group Meeting
 
2/9/11 Boston Area SharePoint Users Group Meeting
2/9/11 Boston Area SharePoint Users Group Meeting2/9/11 Boston Area SharePoint Users Group Meeting
2/9/11 Boston Area SharePoint Users Group Meeting
 
Developing Web Content Management Sites with SharePoint 2010
Developing Web Content Management Sites with SharePoint 2010Developing Web Content Management Sites with SharePoint 2010
Developing Web Content Management Sites with SharePoint 2010
 
Boston Area SharePoint User Group 11/10/10 Meeting
Boston Area SharePoint User Group 11/10/10 MeetingBoston Area SharePoint User Group 11/10/10 Meeting
Boston Area SharePoint User Group 11/10/10 Meeting
 
SharePoint Integration and the BDC - Richard Harbridge and Mark Brahmhall
SharePoint Integration and the BDC - Richard Harbridge and Mark BrahmhallSharePoint Integration and the BDC - Richard Harbridge and Mark Brahmhall
SharePoint Integration and the BDC - Richard Harbridge and Mark Brahmhall
 
Boston Area SharePoint User Group 10/21/10 Meeting
Boston Area SharePoint User Group 10/21/10 MeetingBoston Area SharePoint User Group 10/21/10 Meeting
Boston Area SharePoint User Group 10/21/10 Meeting
 
8/11/10 Boston Area SharePoint Users Group meeting
8/11/10 Boston Area SharePoint Users Group meeting8/11/10 Boston Area SharePoint Users Group meeting
8/11/10 Boston Area SharePoint Users Group meeting
 
BASPUG 09/08/10 - Steven Fowler
BASPUG 09/08/10 - Steven FowlerBASPUG 09/08/10 - Steven Fowler
BASPUG 09/08/10 - Steven Fowler
 
8/11/10 Boston Area SharePoint Users Group meeting
8/11/10 Boston Area SharePoint Users Group meeting8/11/10 Boston Area SharePoint Users Group meeting
8/11/10 Boston Area SharePoint Users Group meeting
 
7/14/10 Boston Area SharePoint Users Group Meeting
7/14/10 Boston Area SharePoint Users Group Meeting7/14/10 Boston Area SharePoint Users Group Meeting
7/14/10 Boston Area SharePoint Users Group Meeting
 
Service Applications in SharePoint 2010
Service Applications in SharePoint 2010Service Applications in SharePoint 2010
Service Applications in SharePoint 2010
 
5/12/10 Inaugural Boston Area SharePoint Users Group Meeting
5/12/10 Inaugural Boston Area SharePoint Users Group Meeting5/12/10 Inaugural Boston Area SharePoint Users Group Meeting
5/12/10 Inaugural Boston Area SharePoint Users Group Meeting
 

Recently uploaded

Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 

Recently uploaded (20)

Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 

Building Apps with Silverlight and SharePoint

  • 1. Building Applications with Microsoft Silverlight andMicrosoft SharePointServer 2010 Bob German Technology Architect Microsoft Technology Center | Boston
  • 2. Session Agenda Getting Started 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 Open Data Protocol (REST) access to SharePointusing WCF Data Services More topics and solution “nuggets” Cross-domain access Web Part Connections Search, maps, webcams and more!
  • 3. SharePoint is… An ASP.NET application using SQL Server HTTP/HTTPS web interface XML Web services WebDAV (Office client integration) Web Front End SharePoint ASP.NET SQL Server IIS
  • 4. 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 Web Server User Code Browser Controls Managed Interop Prop sys Deep zoom CLR Layout Text Media Gfx Image
  • 5. 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
  • 6. 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 C# equivalent xaml border.CornerRadius = new CornerRadius(2);LinearGradientBrushlgb = new LinearGradientBrush(); lgb.StartPoint = new Point(0.5, 0);lgb.EndPoint = new Point(0.5, 1); GradientStopgs = 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; <Border CornerRadius="2"> <Border.Background> <LinearGradientBrushStartPoint="0.5,0" EndPoint="0.5,1"> <GradientStop Color="#FFFFFF" Offset="0"/> <GradientStop Color="#D1D1D1" Offset="1"/> </LinearGradient> </Border.Background> </Border>
  • 7. 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)
  • 8. 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 ofMicrosoft.SharePoint Code Access Security policy limitsruntime access Easy to Manage Site Collection Solution Gallery Central Administration for managing andmonitoring solutions, resource quotas Two Sandboxes arebetter than one! .xap Silverlight .wsp SharePoint
  • 9. 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 filesto a Module for deployment “Enable Silverlight Debugging” checkbox(on SharePoint tab of startupproject property page)
  • 10. Hosting SilverlightIt’s Just an <object> Tag! <object data="data:application/x-silverlight," type="application/x-silverlight-2" width="100%" height="100%"> <param name="source“ value="http://server/ClientBin/HelloWorld.xap"/> <param name="onerror" value="onSilverlightError" /> <param name="background" value="white" /> <param name="minRuntimeVersion" value=“3.0.0.0" /> <param name="autoUpgrade" value="true" /> <param name=“initparams” value=“Param1=Value1” /> <!– HTML to render if Silverlight not installed --> </object>
  • 11. Hello Silverlight Getting Started with Silverlight 4.0 and SharePoint 2010 Development demo
  • 12. SharePoint Data Access from SilverlightMany options Client Object Model WCF Data Services(REST access to lists – formerly “ADO.NET Data Services”) Call SharePoint webservices API Pass data on the HTML page Call a custom web service SharePoint Server SilverlightPlug-in
  • 13. Get Request (page) Get Response (page) Load Get Request (data) Typical Service Interaction User Browses Web Browser SharePoint Server SilverlightPlug-in Do we really need another round trip to the server? Get Response (data)
  • 14. User Browses Get Request (page) Get Response (page,data) Load (data ref) Read (data) Web Browser SharePoint Server SilverlightPlug-in Piggybacking on the Page(more efficient for initial data read)
  • 15. 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
  • 16. Picture View Web Part Web Page Web Part < object> tag with hidden field name Image Library JSON with picture data (hidden field) Silverlight Viewer
  • 17.
  • 18. Running Out of Browser
  • 20. 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) This uses Open Data Protocol (OData)to SharePoint Example: To show 3rdgroupof 10 rows, ?$top=10&$skip=20
  • 21. Paged List View Web Part Web Page Web Part ListData.svc < object> tag with hidden field name List JSON with initial load of list data (hidden field) Silverlight Viewer
  • 22. Large Datasets Paging through data with WCF Data Services demo
  • 23. 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
  • 24. External Data Access Silverlight won’t access a server at a differentDNS 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) x Silverlight Browser bar.services.com foo.pages.com
  • 25. Solution “Nuggets” demo Demonstrations ofmore SharePoint and Silverlight Solutions
  • 26. 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
  • 27. Resources Source Code for demos in this session:http://code.msdn.microsoft.com/SP2010Silverlight My blog (see previous posting for pointer to MSDN webcast for click-by-click getting started)http://blogs.msdn.com/bobgerman/ Books: Previousgeneration,still helpful Ch. 5 and14 areSilverlight
  • 28. © 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.

Editor's Notes

  1. There are more!! Cookies, for example.