SlideShare uma empresa Scribd logo
1 de 26
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Server APIs
Remote / Client APIs
SharePoint Standard APIs
REST APIs SOAP APIsCSOM
Data Platform
Farm Site List Data External Lists
Server OM LINQ to SharePoint
Server-side
Client-side
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
AGENDA
1. REST/OData
2. Client-Side Object Model
3. SOAP Web Service
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
REST/OData란?
• REpresentational State Transfer
• Web Service 기반의 Open Data Protocol(Odata) 를 사용
• 네트워크 시스템을 위한 비표준 아키텍쳐 스타일
• 모든 Resource는 유일한 URI로 데이터와 서비스
• http://<site url>/_api/web/lists
• http://<site url>/_api/web/lists/getByTitle('ListTitle')
• Resource는 일반적 인터페이스(HTTP GET, POST, PUT, DELETE)로 접근
• 결과 값은 ATOM or JSON 을 사용
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SharePoint REST Service Architecture
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
REST Operations
HTTP POST
• Create Data In Data Source
HTTP GET
• Read Data from Data Source
HTTP PUT
• Update Data In Data Source
HTTP DELETE
• Delete Data In data Source
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
• URI와 HTTP Method 만으로도 쉽게 의미 전달이 가능하다.
• JavaScript , jQuery를 사용하여 높은 개발 생산성
• Web Developers 개발하기 익숙하다.
• SOAP보단 개발하기 단순하다.
• 결과 값은 ATOM or JSON 을 사용한다.
SharePoint REST API 장점
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
http://<Server>/_api/web/lists/getByTitle(‘Customer')/getItemByStringId(‘1’)?$select=Title, ID
SharePoint Host
Service
Resource Path Query Options
Structure
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
OData Query Operators
Operators Descriptions Examples
Lt Less than http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
Le Less equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id le 1
Gt Greater than http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id gt 1
Ge Greater equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id ge 1
Eq Equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id eq 1
startsWith startswith(GUID,‘11’) http://<server>/_api/web/lists/getByTitle('test')/items?$filter=startswith(GUID, ‘11')
Substringof substringof('Cr',Title) http://<server>/_api/web/lists/getByTitle('test')/items?$filter=substringof(GUID, ‘11')
Eq Equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Title eq ‘1’
Ne Not equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Title lt ‘1’
Day() Day http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
Month() Month http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
Year() Year http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
Minute() Minute http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
Second() Second http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
REST Code Demo
• Site 생성 예제
$.ajax(
{
url: "/_api/web/webinfos/add",
type: "POST",
async: false,
data: JSON.stringify({
'parameters':
{
'__metadata': { 'type': 'SP.WebInfoCreationInformation' },
'Url': "Conference",
'Title': “SharePoint 2013 Conference",
'Description': "컨퍼런스 팀사이트입니다.",
'Language': "1042",
'WebTemplate': "STS#0",
'UseUniquePermissions': "True"
}
}),
headers: {
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest": $("#__REQUESTDIGEST").val()
},
success: function (data) {
location.href = data.d.ServerRelativeUrl;
},
error: function (err) {
alert("Fail");
}
});
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
AGENDA
1. REST/OData
2. Client-Side Object Model
3. SOAP Web Service
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Client-Side Object Model 란?
• Microsoft SharePoint Client API
• SharePoint Server Object Model 과 유사
• Site, Web, ContextType, List, Folder, Navigation…
• .NET Managed, Silverlight, ECMAScript 사용 가능
• SharePoint 2010 버전 부터 사용 가능
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SharePoint CSOM Architecture
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
• SharePoint Developers 개발하기 익숙하다.
• Client Application 개발에 용이하다.
• LINQ, CAML Query 사용이 가능하다.
• RPC Batch Processing
• clientContext.Load(Web);
clientContext.ExecuteQueryAsync(succeedcallback, failcallback);
SharePoint CSOM 장점
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Server
(Microsoft.SharePoint)
.NET Managed
(Microsoft.SharePoint.Client)
Silverlight
(Microsoft.SharePoint.Client.Silve
rlight)
JavaScript
(SP.js)
SPContext ClientContext ClientContext ClientContext
SPSite Site Site Site
SPWeb Web Web Web
SPList List List List
SPListItem ListItem ListItem ListItem
SPFiled Field Field Field
Client Object Modal - Objects
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Object OM Location Names
Managed ISAPI folder Microsoft.SharePoint.Client.dll
Microsoft.SharePoint.Client.Runtime.dll
Silverlight LayoutsClientBin Microsoft.SharePoint.Client.Silverlight.dll
Microsoft.SharePoint.Client.Silverlight.Runtime.dll
JavaScript Layouts SP.js
Client Library
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
CSOM(ECMAScript) Code Demo
• 그룹 권한 추가
var currentCTX = new SP.ClientContext("/Conference");
var currentWeb = currentCTX.get_web();
// Create Group information for Group
var membersFC = new SP.GroupCreationInformation();
membersFC.set_title("컨퍼런스 읽기 그룹");
membersFC.set_description('SharePoint 컨퍼런스 방문자 그룹입니다.');
//add group
oMembersFC = currentWeb.get_siteGroups().add(membersFC);
//return SP.RoleDefinition object /Full Control, Contribute, Read
var rdFC = currentWeb.get_roleDefinitions().getByName('읽기');
// Create a new RoleDefinitionBindingCollection.
var bindingFC = SP.RoleDefinitionBindingCollection.newObject(currentCTX);
// Add the role to the collection.
bindingFC.add(rdFC);
// Get the RoleAssignmentCollection for the target web.
var assignments = currentWeb.get_roleAssignments();
// assign the group to the new RoleDefinitionBindingCollection.
var roleAssignmentFullControl = assignments.add(oMembersFC, bindingFC);
currentCTX.load(oMembersFC);
//Execute Query
currentCTX.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this,
this.onQueryFailed));
function onQuerySucceeded() { alert("Created Group."); }
function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + 'n' + args.get_stackTrace()); }
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
AGENDA
1. REST/OData
2. Client-Side Object Model
3. SOAP Web Service
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SOAP 란?
• Simple Object Access Protocol(SOAP)
• Created By Microsoft in 1998 /W3C Standard
• RPC Model을 사용
• 표준화된 XML 메시징을 사용
• 하드웨어, 소프트웨어, 프로그래밍 언어에 독립적
• 프록시와 방화벽에 구애 받지 않고 쉽게 통신 가능
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SOAP 구성도
Register(WSDL)Find(WSDL)
SOAP
UDDI
Service Requester Service Provider
Service Broker
UDDI(Universal Description, Discovery, and Integration)
• 프로그래밍이 가능한 공개된 레지스트리의 역할
WSDL(Web Services Description Language)
• 웹서비스가 제공하는 서비스에 어떤 파라미터를 가지고 있어야 하는지, 어떤 값을 리턴하는지 설명하는 XML
파일
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
• SharePoint All Versions 지원
SharePoint SOAP 장점
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SharePoint 2007 and 2010 Web Service
SharePoint 2007 SharePoint 2010
Web Service WSS 3.0 MOSS Foundation SP2010
Alerts V V V V
Authentication V V V V
Copy V V V V
Forms V V V V
Lists V V V V
Meetings V V V V
People V V V V
Permissions V V V V
SiteData V V V V
Sites V V V V
SpellChecker V V V V
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
SharePoint 2007 and 2010 Web Service
SharePoint 2007 SharePoint 2010
Web Service WSS 3.0 MOSS Foundation SP2010
User and Groups V V V V
Versions V V V V
Views V V V V
WebPartPages V V V V
Webs V V V V
PublishedLinksService V V
Search V V
UserProfielService V V
Workflow V V
Diagnostics V V
SocialDataService V
TaxonomyClientService V
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Web Service URL
Class Name
Operations
Namespace
Visual Studio Service Reference
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
Reference
• Get started with the SharePoint 2013 REST service
• http://msdn.microsoft.com/en-us/library/fp142380.aspx
• Choose the right API set in SharePoint 2013
• http://msdn.microsoft.com/en-us/library/jj164060.aspx
• Get Some REST : SharePoint 2013 REST API's
• http://www.slideshare.net/eshupps/taking-advantage-of-the-sharepoint-2013-rest-api
• Use OData query operations in SharePoint REST requests
• http://msdn.microsoft.com/en-us/library/fp142385.aspx#bk_architecture
• Add a SOAP service as a data source
• http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-soap-service-as-a-
data-source-HA010355752.aspx
• jQuery Library for SharePoint Web Services
• http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices&referringTitle=%24
%28%29.SPServices&ANCHOR#GeneralSyntax
• 기본 XML Web Services
• http://msdn.microsoft.com/ko-kr/library/ms996507.aspx
SharePoint Korea Conference 2013 Smart한 SharePoint 개발
E-MAIL : AIRGUAIR@GMAIL.COM

Mais conteúdo relacionado

Mais procurados

Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010
Rob Windsor
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
Rob Windsor
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
Phil Wicklund
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
SharePoint Saturday NY
 
How to build a rest api.pptx
How to build a rest api.pptxHow to build a rest api.pptx
How to build a rest api.pptx
Harry Potter
 
Android SharePoint
Android SharePointAndroid SharePoint
Android SharePoint
BenCox35
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
Rob Windsor
 

Mais procurados (20)

Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010Data Access Options in SharePoint 2010
Data Access Options in SharePoint 2010
 
SharePoint 2010 Application Development Overview
SharePoint 2010 Application Development OverviewSharePoint 2010 Application Development Overview
SharePoint 2010 Application Development Overview
 
SharePoint 2013 REST APIs
SharePoint 2013 REST APIsSharePoint 2013 REST APIs
SharePoint 2013 REST APIs
 
Developing a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint appDeveloping a Provider Hosted SharePoint app
Developing a Provider Hosted SharePoint app
 
SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)SharePoint Client Object Model (CSOM)
SharePoint Client Object Model (CSOM)
 
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
SPCA2013 - Developing Provider-Hosted Apps for SharePoint 2013
 
Rest API
Rest APIRest API
Rest API
 
SharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object ModelSharePoint 2010 Client-side Object Model
SharePoint 2010 Client-side Object Model
 
SharePoint REST vs CSOM
SharePoint REST vs CSOMSharePoint REST vs CSOM
SharePoint REST vs CSOM
 
Doing REST Right
Doing REST RightDoing REST Right
Doing REST Right
 
Introduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST APIIntroduction to the SharePoint Client Object Model and REST API
Introduction to the SharePoint Client Object Model and REST API
 
What is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | EdurekaWhat is REST API? REST API Concepts and Examples | Edureka
What is REST API? REST API Concepts and Examples | Edureka
 
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
Lyudmila Zharova: Developing Solutions for SharePoint 2010 Using the Client O...
 
How to build a rest api.pptx
How to build a rest api.pptxHow to build a rest api.pptx
How to build a rest api.pptx
 
Hooking SharePoint APIs with Android
Hooking SharePoint APIs with AndroidHooking SharePoint APIs with Android
Hooking SharePoint APIs with Android
 
SPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx WebpartSPFx Webinar Loading SharePoint data in a SPFx Webpart
SPFx Webinar Loading SharePoint data in a SPFx Webpart
 
Android SharePoint
Android SharePointAndroid SharePoint
Android SharePoint
 
RESTful API - Best Practices
RESTful API - Best PracticesRESTful API - Best Practices
RESTful API - Best Practices
 
Integrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio LightswitchIntegrating SharePoint 2010 and Visual Studio Lightswitch
Integrating SharePoint 2010 and Visual Studio Lightswitch
 
SharePoint 2010 Client Object Model
SharePoint 2010 Client Object ModelSharePoint 2010 Client Object Model
SharePoint 2010 Client Object Model
 

Semelhante a [SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
Kiril Iliev
 
RESTful services
RESTful servicesRESTful services
RESTful services
gouthamrv
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
jamram82
 
2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model
bgerman
 

Semelhante a [SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기 (20)

jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
jsSaturday - PhoneGap and jQuery Mobile for SharePoint 2013
 
SharePoint and Office Development Workshop
SharePoint and Office Development WorkshopSharePoint and Office Development Workshop
SharePoint and Office Development Workshop
 
OData for iOS developers
OData for iOS developersOData for iOS developers
OData for iOS developers
 
Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.Best Practices for Architecting a Pragmatic Web API.
Best Practices for Architecting a Pragmatic Web API.
 
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
Apps 101 - Moving to the SharePoint 2013 App Model - Presented 7/27/13 at Sha...
 
RESTful services
RESTful servicesRESTful services
RESTful services
 
SharePoint 2013 APIs
SharePoint 2013 APIsSharePoint 2013 APIs
SharePoint 2013 APIs
 
Developing With Data Technologies
Developing With Data TechnologiesDeveloping With Data Technologies
Developing With Data Technologies
 
SharePoint 2010 authentications
SharePoint 2010 authenticationsSharePoint 2010 authentications
SharePoint 2010 authentications
 
Dh2 Apps Training Part2
Dh2   Apps Training Part2Dh2   Apps Training Part2
Dh2 Apps Training Part2
 
SharePoint for the .NET Developer
SharePoint for the .NET DeveloperSharePoint for the .NET Developer
SharePoint for the .NET Developer
 
Share point hosted add ins munich
Share point hosted add ins munichShare point hosted add ins munich
Share point hosted add ins munich
 
Introduction to Alfresco Surf Platform
Introduction to Alfresco Surf PlatformIntroduction to Alfresco Surf Platform
Introduction to Alfresco Surf Platform
 
SharePoint 2010 - What's New?
SharePoint 2010 - What's New?SharePoint 2010 - What's New?
SharePoint 2010 - What's New?
 
2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model2012 12 best of spc - moving to the sp2013 app model
2012 12 best of spc - moving to the sp2013 app model
 
Rest API and Client OM for Developer
Rest API and Client OM for DeveloperRest API and Client OM for Developer
Rest API and Client OM for Developer
 
API Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIsAPI Workshop: Deep dive into REST APIs
API Workshop: Deep dive into REST APIs
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
REST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in CodeigniterREST API Best Practices & Implementing in Codeigniter
REST API Best Practices & Implementing in Codeigniter
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 

Último

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Último (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

[SharePoint Korea Conference 2013 / 강율구] Sharepoint 스마트하게 개발하기

  • 1. SharePoint Korea Conference 2013 Smart한 SharePoint 개발
  • 2. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Server APIs Remote / Client APIs SharePoint Standard APIs REST APIs SOAP APIsCSOM Data Platform Farm Site List Data External Lists Server OM LINQ to SharePoint Server-side Client-side
  • 3. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 AGENDA 1. REST/OData 2. Client-Side Object Model 3. SOAP Web Service
  • 4. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 REST/OData란? • REpresentational State Transfer • Web Service 기반의 Open Data Protocol(Odata) 를 사용 • 네트워크 시스템을 위한 비표준 아키텍쳐 스타일 • 모든 Resource는 유일한 URI로 데이터와 서비스 • http://<site url>/_api/web/lists • http://<site url>/_api/web/lists/getByTitle('ListTitle') • Resource는 일반적 인터페이스(HTTP GET, POST, PUT, DELETE)로 접근 • 결과 값은 ATOM or JSON 을 사용
  • 5. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SharePoint REST Service Architecture
  • 6. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 REST Operations HTTP POST • Create Data In Data Source HTTP GET • Read Data from Data Source HTTP PUT • Update Data In Data Source HTTP DELETE • Delete Data In data Source
  • 7. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 • URI와 HTTP Method 만으로도 쉽게 의미 전달이 가능하다. • JavaScript , jQuery를 사용하여 높은 개발 생산성 • Web Developers 개발하기 익숙하다. • SOAP보단 개발하기 단순하다. • 결과 값은 ATOM or JSON 을 사용한다. SharePoint REST API 장점
  • 8. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 http://<Server>/_api/web/lists/getByTitle(‘Customer')/getItemByStringId(‘1’)?$select=Title, ID SharePoint Host Service Resource Path Query Options Structure
  • 9. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 OData Query Operators Operators Descriptions Examples Lt Less than http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1 Le Less equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id le 1 Gt Greater than http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id gt 1 Ge Greater equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id ge 1 Eq Equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id eq 1 startsWith startswith(GUID,‘11’) http://<server>/_api/web/lists/getByTitle('test')/items?$filter=startswith(GUID, ‘11') Substringof substringof('Cr',Title) http://<server>/_api/web/lists/getByTitle('test')/items?$filter=substringof(GUID, ‘11') Eq Equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Title eq ‘1’ Ne Not equal http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Title lt ‘1’ Day() Day http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1 Month() Month http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1 Year() Year http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1 Minute() Minute http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1 Second() Second http://<server>/_api/web/lists/getByTitle('test')/items?&$filter=Id lt 1
  • 10. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 REST Code Demo • Site 생성 예제 $.ajax( { url: "/_api/web/webinfos/add", type: "POST", async: false, data: JSON.stringify({ 'parameters': { '__metadata': { 'type': 'SP.WebInfoCreationInformation' }, 'Url': "Conference", 'Title': “SharePoint 2013 Conference", 'Description': "컨퍼런스 팀사이트입니다.", 'Language': "1042", 'WebTemplate': "STS#0", 'UseUniquePermissions': "True" } }), headers: { "accept": "application/json;odata=verbose", "content-type": "application/json;odata=verbose", "X-RequestDigest": $("#__REQUESTDIGEST").val() }, success: function (data) { location.href = data.d.ServerRelativeUrl; }, error: function (err) { alert("Fail"); } });
  • 11. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 AGENDA 1. REST/OData 2. Client-Side Object Model 3. SOAP Web Service
  • 12. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Client-Side Object Model 란? • Microsoft SharePoint Client API • SharePoint Server Object Model 과 유사 • Site, Web, ContextType, List, Folder, Navigation… • .NET Managed, Silverlight, ECMAScript 사용 가능 • SharePoint 2010 버전 부터 사용 가능
  • 13. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SharePoint CSOM Architecture
  • 14. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 • SharePoint Developers 개발하기 익숙하다. • Client Application 개발에 용이하다. • LINQ, CAML Query 사용이 가능하다. • RPC Batch Processing • clientContext.Load(Web); clientContext.ExecuteQueryAsync(succeedcallback, failcallback); SharePoint CSOM 장점
  • 15. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Server (Microsoft.SharePoint) .NET Managed (Microsoft.SharePoint.Client) Silverlight (Microsoft.SharePoint.Client.Silve rlight) JavaScript (SP.js) SPContext ClientContext ClientContext ClientContext SPSite Site Site Site SPWeb Web Web Web SPList List List List SPListItem ListItem ListItem ListItem SPFiled Field Field Field Client Object Modal - Objects
  • 16. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Object OM Location Names Managed ISAPI folder Microsoft.SharePoint.Client.dll Microsoft.SharePoint.Client.Runtime.dll Silverlight LayoutsClientBin Microsoft.SharePoint.Client.Silverlight.dll Microsoft.SharePoint.Client.Silverlight.Runtime.dll JavaScript Layouts SP.js Client Library
  • 17. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 CSOM(ECMAScript) Code Demo • 그룹 권한 추가 var currentCTX = new SP.ClientContext("/Conference"); var currentWeb = currentCTX.get_web(); // Create Group information for Group var membersFC = new SP.GroupCreationInformation(); membersFC.set_title("컨퍼런스 읽기 그룹"); membersFC.set_description('SharePoint 컨퍼런스 방문자 그룹입니다.'); //add group oMembersFC = currentWeb.get_siteGroups().add(membersFC); //return SP.RoleDefinition object /Full Control, Contribute, Read var rdFC = currentWeb.get_roleDefinitions().getByName('읽기'); // Create a new RoleDefinitionBindingCollection. var bindingFC = SP.RoleDefinitionBindingCollection.newObject(currentCTX); // Add the role to the collection. bindingFC.add(rdFC); // Get the RoleAssignmentCollection for the target web. var assignments = currentWeb.get_roleAssignments(); // assign the group to the new RoleDefinitionBindingCollection. var roleAssignmentFullControl = assignments.add(oMembersFC, bindingFC); currentCTX.load(oMembersFC); //Execute Query currentCTX.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed)); function onQuerySucceeded() { alert("Created Group."); } function onQueryFailed(sender, args) { alert('Request failed. ' + args.get_message() + 'n' + args.get_stackTrace()); }
  • 18. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 AGENDA 1. REST/OData 2. Client-Side Object Model 3. SOAP Web Service
  • 19. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SOAP 란? • Simple Object Access Protocol(SOAP) • Created By Microsoft in 1998 /W3C Standard • RPC Model을 사용 • 표준화된 XML 메시징을 사용 • 하드웨어, 소프트웨어, 프로그래밍 언어에 독립적 • 프록시와 방화벽에 구애 받지 않고 쉽게 통신 가능
  • 20. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SOAP 구성도 Register(WSDL)Find(WSDL) SOAP UDDI Service Requester Service Provider Service Broker UDDI(Universal Description, Discovery, and Integration) • 프로그래밍이 가능한 공개된 레지스트리의 역할 WSDL(Web Services Description Language) • 웹서비스가 제공하는 서비스에 어떤 파라미터를 가지고 있어야 하는지, 어떤 값을 리턴하는지 설명하는 XML 파일
  • 21. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 • SharePoint All Versions 지원 SharePoint SOAP 장점
  • 22. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SharePoint 2007 and 2010 Web Service SharePoint 2007 SharePoint 2010 Web Service WSS 3.0 MOSS Foundation SP2010 Alerts V V V V Authentication V V V V Copy V V V V Forms V V V V Lists V V V V Meetings V V V V People V V V V Permissions V V V V SiteData V V V V Sites V V V V SpellChecker V V V V
  • 23. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 SharePoint 2007 and 2010 Web Service SharePoint 2007 SharePoint 2010 Web Service WSS 3.0 MOSS Foundation SP2010 User and Groups V V V V Versions V V V V Views V V V V WebPartPages V V V V Webs V V V V PublishedLinksService V V Search V V UserProfielService V V Workflow V V Diagnostics V V SocialDataService V TaxonomyClientService V
  • 24. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Web Service URL Class Name Operations Namespace Visual Studio Service Reference
  • 25. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 Reference • Get started with the SharePoint 2013 REST service • http://msdn.microsoft.com/en-us/library/fp142380.aspx • Choose the right API set in SharePoint 2013 • http://msdn.microsoft.com/en-us/library/jj164060.aspx • Get Some REST : SharePoint 2013 REST API's • http://www.slideshare.net/eshupps/taking-advantage-of-the-sharepoint-2013-rest-api • Use OData query operations in SharePoint REST requests • http://msdn.microsoft.com/en-us/library/fp142385.aspx#bk_architecture • Add a SOAP service as a data source • http://office.microsoft.com/en-us/sharepoint-designer-help/add-a-soap-service-as-a- data-source-HA010355752.aspx • jQuery Library for SharePoint Web Services • http://spservices.codeplex.com/wikipage?title=%24%28%29.SPServices&referringTitle=%24 %28%29.SPServices&ANCHOR#GeneralSyntax • 기본 XML Web Services • http://msdn.microsoft.com/ko-kr/library/ms996507.aspx
  • 26. SharePoint Korea Conference 2013 Smart한 SharePoint 개발 E-MAIL : AIRGUAIR@GMAIL.COM