zlatan dzinic principal consultant microsoft most valuable professional - sharepoint business...

35

Upload: clarissa-black

Post on 23-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion
Page 2: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Developing and Consuming Services for SharePoint

Zlatan DzinicPrincipal ConsultantMicrosoft Most Valuable Professional - SharePointBusiness Connexion

Page 3: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business 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

Page 4: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Agenda

Custom app development and SharePointSharePoint Web servicesCustom Web servicesFuturesSummary Q & A

Page 5: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Custom App Development and SharePoint

Page 6: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 7: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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)

Page 8: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

SharePoint Web Services

Page 9: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 10: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 11: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Exploring the Native SharePoint Web Services

demo

Page 12: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 13: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 14: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Consuming a Native SharePoint Web Servicedemo

Page 15: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Custom Web Services

Page 16: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 17: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 18: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 19: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 20: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 21: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Developing and Consuming a Custom ASP.NET Web Service

demo

Page 22: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 23: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Developing and Consuming a Custom WCF Service

demo

Page 24: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Futures

Page 25: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 26: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

SharePoint, Silverlight & Custom Services

demo

Page 27: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Windows Azure

Azure™ Services Platform

Page 28: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 29: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

Summary

Page 30: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 31: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion
Page 32: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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)

Page 33: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

question & answer

Page 34: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

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

Page 35: Zlatan Dzinic Principal Consultant Microsoft Most Valuable Professional - SharePoint Business Connexion

© 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.