Date post: | 23-Dec-2015 |
Category: |
Documents |
Upload: | clarissa-black |
View: | 215 times |
Download: | 0 times |
Developing and Consuming Services for SharePoint
Zlatan DzinicPrincipal ConsultantMicrosoft Most Valuable Professional - SharePointBusiness Connexion
Session Objectives and Takeaways
Audience: Developers who want to learn more about building services for SharePoint
Session Objectives: To understand the different ways in which you can develop web services for SharePointProvide some guidance around native, ASMX, and WCF services for SharePoint 2007
Level 400 means:You’ve got enough development experience
We will walk through concepts and codeYou understand at least basic concepts of servicesYou have a general willingness to toil and occasionally be frustrated
Agenda
Custom app development and SharePointSharePoint Web servicesCustom Web servicesFuturesSummary Q & A
Custom App Development and SharePoint
SharePoint? Development Platform?
Microsoft Windows 2003/2008
SQLServer IIS .NET Framework
ASP.NET WF
Windows SharePoint Services
MOSS
Custom Solutions
VS/SPD
Internet
LOB Systems
Intranet
…
- 650,000 SharePoint Developers WW
Your Development EnvironmentGetting Started
Windows Server 2003 or 2008WSS 3.0 SP1MOSS 2007 (Standard/Enterprise/FIS) SP2.NET Framework 3.5 SP1Visual Studio 2008 SP1VSeWSS 1.2 or 1.3Optional
Expression Blend (WPF or Silverlight UI development)SharePoint Designer (Master pages, custom field types)Silverlight Tools for VS 2008 SP1 (Silverlight solution development)
SharePoint Web Services
SharePoint Web Services Provide programmatic access to key SharePoint functionality
Work with lists, Excel services, business data catalog, etc.
Both admin and non-admin services availableCannot be accessed anonymously
Windows Credentials are required
SharePoint Web Services (cont’d) Take caution when writing custom services
You could write one when the service already existsThink about type of reference
Creating a service increases portabilityReferencing DLL increases performance (but you’re restricted to server-only deployment)
SharePoint Virtual Directories
_vti_bin _vti_admThings you can do in WSS sites Things you can do in Central Admin
http://server/site/_vti_bin/service.asmx
* Note the path to the site!
http://server:1234/_vti_adm/service.asmx
* Note the PORT!
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\isapi
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\admisapi
Exploring the Native SharePoint Web Services
demo
Common UsageDocument and asset management
Create or store images Document and form libraries
Read/write list dataEnhance applications using DM capabilities
Site managementCreate sites dynamicallyAdd users programmatically
Custom listsCreate and populate custom lists
Microsoft Office 2003 and 2007Check In/Out Documents
Development MethodologyNative SharePoint Web Service
Get familiar with the available servicesCreate your clientDiscover the servicesConsume the service in your app
Through service integrationThrough DLL reference
Deploy your app
Windows Server
SharePoint
Client1
Microsoft.SharePoint.dll
2
Consuming a Native SharePoint Web Servicedemo
Custom Web Services
ASP.NET and WCF
You can create either ASMX or WCF Web servicesSharePoint supports ASMX nativelyBoth are supported through isolated Web app domainDeployment to hive requires additional service configurationSecurity considerations include cross-domain policy files
Consuming Custom ServicesNo different than other web services
Create a Web ReferenceWrite some codeHere’s how to call a custom web service deployed to the _layouts virtual directory which creates sub sites
Development MethodologyCustom ASP.NET Web ServiceCreate and build your serviceTest the serviceDeploy the service
To SharePoint Hive (with configurations)To Isolated Web App Domain
Test in deployed environmentCreate your clientDiscover the servicesConsume the service in your appDeploy your client
Windows Server
SharePoint
ClientApp
Domain1
2
Creating the ASMX Web ServiceDeploying to SharePoint Hive
In VS 2008, create an ASP.NET Web Service
Copy the DLL to the GAC and make sure you add a fully qualified reference to it in your ASMX fileRun the disco tool against the ASMX file to create a .dsco and .wsdl fileAmend the files to work with SharePointAppend the files with .aspx and copy to ISAPI folder (copy ASMX and the two ASPX files)List in SPDISCO.ASPX file
Creating the ASMX Web ServiceDeploying to SharePoint HiveIn VS 2008, create an ASP.NET Web Service
Copy the DLL to the GAC and make sure you add a fully qualified reference to it in your ASMX fileRun the disco tool against the ASMX file to create a .dsco and .wsdl fileAmend the files to work with SharePointAppend the files with .aspx and copy to ISAPI folder (copy ASMX and the two ASPX files)List in SPDISCO.ASPX file
Developing and Consuming a Custom ASP.NET Web Service
demo
Development MethodologyCustom WCF Web ServiceCreate and build your serviceTest the serviceDeploy the service
To SharePoint Hive (with configurations)To Isolated Web App Domain
Test in deployed environmentCreate your clientDiscover the servicesConsume the service in your appDeploy your client
Windows Server
SharePoint
ClientApp
Domain1
2
Developing and Consuming a Custom WCF Service
demo
Futures
No Touch Low Touch High Touch
Streaming Services
<iframe/>Web Part as
Host
.NET Assembly/ Web Part
SP OM/External Data
Silverlight and SharePointIntegrating Custom Services
SharePoint, Silverlight & Custom Services
demo
Windows Azure
Azure™ Services Platform
Windows Azure - Services
Windows Azure exposes servicesBlob storageTable storageQueues
Services can be exposed via Web RoleWorker Role can consume services
Scheduled or command initiated tasks can interact with SharePoint web services
Summary
Summary
You have a number of options when developing services for SharePointRange from native Web services to custom services to services in the cloudBe sure to evaluate needs and design for custom services against existing Web servicesExplore both native and custom services—trying both ASMX and WCF to test the differenceThe future will see more development in the area of Azure SharePoint Services and certainly more Silverlight integration with services
Win!LifeCam Show
Ultra-Thin Mobile DesignWorld-Class High Definition Optics
Question:{Enter the qualifying question here / or find another way to select your winner}
Please attend other business productivity sessionsOffice and SharePoint track (OFC)Unified Communications (UNC)
question & answer
Additional ResourcesBlogs
http://dotnet.org.za/zlatan http://blogs.msdn.com/steve_fox/default.aspx http://blogs.msdn.com/sharepoint/
BooksMicrosoft SharePoint 2007 Development Unleashed (Sams)Real World SharePoint Development (Wrox)Professional SharePoint Developing using Silverlight 2 (Wrox)
MSDNhttp://msdn.microsoft.com/en-us/sharepoint/default.aspxhttp://msdn.microsoft.com/en-us/office/aa905503.aspx
© 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.