building your first windows phone 7 application for sharepoint

26
[email protected] Building your first Windows Phone 7 application for SharePoint

Upload: joris-poelmans

Post on 18-Jun-2015

1.198 views

Category:

Technology


5 download

TRANSCRIPT

Page 1: Building your first Windows Phone 7 application for SharePoint

[email protected]

Building your first Windows Phone 7 application for

SharePoint

Page 2: Building your first Windows Phone 7 application for SharePoint

SponsorsVenue Sponsor

Platinum Sponsors

Gold Premium Sponsors

Gold Sponsors

Page 3: Building your first Windows Phone 7 application for SharePoint

About me

• Unit Manager at RealDolmen

• Working with SharePoint since 2001

• MVP SharePoint Server since 2005

• Blog - http://jopx.blogspot.com

• Twitter – jopxtwits

• Co-author

• SharePoint Server 2007, the definitive guide (O’Reilly, 2007)

• Real World SharePoint 2007 (Wrox, 2007)

• Real World SharePoint 2010 (Wrox, 2010)

Page 4: Building your first Windows Phone 7 application for SharePoint

@JOPXTWITS#SPSBE34

Page 5: Building your first Windows Phone 7 application for SharePoint

Agenda

• Getting started

• Why authentication matters…

• Exploring different remote APIs in FBA scenario

Page 6: Building your first Windows Phone 7 application for SharePoint

WHY BECOMING A WP7 DEVELOPER?• Gartner expects smartphone

sales to exceed 1 billion in 2015

• Gartner expects Microsoft’s market share to increase from 6% to 20%.

• Business oriented mobile apps are just starting to appear

• But ....

• Fragmented market

• Uncertainty about revenue potential of paying apps

• Marketing required >70K apps available

Page 7: Building your first Windows Phone 7 application for SharePoint

HOW TO START

http://create.msdn.com

Page 8: Building your first Windows Phone 7 application for SharePoint

YOUR DEVELOPMENT ENVIRONMENT

• Multiple options

• Single machine Windows 7

• Single machine W2008 R2 using 2 separate VHDs

• Multiple machines

Page 9: Building your first Windows Phone 7 application for SharePoint

• High performance game framework

• Rapid creation of multi-screen 2D and 3D games

• Rich content pipeline

• Mature, robust, widely adopted technology

spanning

Xbox 360, Windows,

and Zune

• Modern XAML/event-driven application UI framework

• Rapid creation of visually stunning apps

• Metro-themed UI controls

• Reuse existing Silverlight controls and libraries

TWO FLAVOURS OF APPLICATIONS

Page 10: Building your first Windows Phone 7 application for SharePoint

SHAREPOINT API ACCESS SCENARIOS

Scenario Use for

RSS Read

REST API Read and write

Web services Read and write

Client side OM Not supported with WP7 & SPS2010

Custom Read and write

Page 11: Building your first Windows Phone 7 application for SharePoint

SHAREPOINT RSS FEED

SharePoint

_layouts/ListFeed.aspx

• SharePoint provides OOB RSS feeds

• Read only

• Support Anonymous access

• List data only

• Additional fields = XML + HTML

• Difficult to parse

• Feeds can be parsed using

• Any XML API including LINQ

• .Net Syndication library

Page 12: Building your first Windows Phone 7 application for SharePoint

Demo

Integrating with SharePoint using RSS/ATOM feeds

Page 13: Building your first Windows Phone 7 application for SharePoint

Agenda

• Getting started

• Why authentication matters …

• Exploring different remote APIs in FBA scenario

Page 14: Building your first Windows Phone 7 application for SharePoint

SHAREPOINT AUTHENTICATION SCENARIOS• Windows Phone 7 does not support Windows Authentication

• SharePoint authentication design will affect API support

• * Supported with Microsoft Forefront Unified Access Gateway (UAG)

• ** Support depends on design

Scenario Basic Claims (FBA) Anonymous

RSS Supported* Supported Supported

REST API Supported* Supported Not Supported

Web services Supported* Supported Not supported

Custom Supported* Supported Supported**

Page 15: Building your first Windows Phone 7 application for SharePoint

AUTHENTICATED ACCESS SCENARIOS - FBA

• Enable Claims Authentication

• /_vti_bin/Authentication.asmx

1 1. Call authentication.asmx

2. Request credentials3. Send credentials4. Return cookie5. Attach cookie to

subsequent calls

2

3

4

5

Page 16: Building your first Windows Phone 7 application for SharePoint

Demo

Working with Form Based Authentication

Page 17: Building your first Windows Phone 7 application for SharePoint

Agenda

• Getting started

• Why authentication matters …

• Exploring different remote APIs in FBA scenario

Page 18: Building your first Windows Phone 7 application for SharePoint

INTEGRATE USING REST/ODATA

• Service Proxy (works with UAG only)

• Generate a service proxy

• Visual Studio

• DataSvcUtil.exe

• Use generated proxy class to interact with data

• HttpWebRequest – (only option with FBA)

• Url for reads ( simple)

• Create body for write (complex)

• Execute request asynchronously

• Process results in callback method

Page 19: Building your first Windows Phone 7 application for SharePoint

Demo

Integrating with SharePoint REST APIs

Page 20: Building your first Windows Phone 7 application for SharePoint

INTEGRATE USING WEB SERVICES

• Service Proxy

• Generate a service proxy

• Use generated proxy class to interact with data

• HttpWebRequest and SOAP

• Create SOAP request and HttpWebRequest

• Execute request asynchronously

• Process results in callback method

Page 21: Building your first Windows Phone 7 application for SharePoint

SHAREPOINT WEB SERVICES

Service Proxy

Soap Request

SharePoint

OR

imaging.asmxlists.asmx

sitedata.asmxspsearch.amxversions.asmx

views.asmx

Page 22: Building your first Windows Phone 7 application for SharePoint

Demo

Integrating with SharePoint using Lists web service

Page 23: Building your first Windows Phone 7 application for SharePoint

SHAREPOINT USER AND SOCIAL DATA USING WEB SERVICES

• Use Search.asmx and UserProfileService.asmx

• SocialDataService.asmx

• Read and manage

• Comments or Notes

• Tags

• Ratings

Page 24: Building your first Windows Phone 7 application for SharePoint

Demo

Integrating with SharePoint using social web services

Page 25: Building your first Windows Phone 7 application for SharePoint

SUMMARY

• Authentication makes WP7 integration with SharePoint quite troublesome ...

• ... But using the “SharePoint 2010 and Windows Phone 7 Training Kit” – you can get started quite quickly

• Build WP7 apps to extend your SharePoint business solutions – don’t try to build a generic solution.

Page 26: Building your first Windows Phone 7 application for SharePoint

RESOURCES• Building Windows Phone 7 applications with SharePoint 2010 Products and Unified

Access Gateway (UAG) (white paper) - http://technet.microsoft.com/en-us/library/hh180841.aspx

• Developing Windows Phone 7 Applications for SharePoint 2010 - http://blogs.msdn.com/b/pstubbs/archive/2010/10/04/developing-windows-phone-7-applications-for-sharepoint-2010.aspx

• Windows Phone 7 Training Kit for Developers - http://www.microsoft.com/download/en/details.aspx?id=1678

• SharePoint 2010 and Windows Phone 7 Training Kit

http://www.microsoft.com/download/en/details.aspx?id=26813

• Silverlight for Windows Phone Toolkit

http://silverlight.codeplex.com