SharePoint 2013 Server Object Model
This presentation is the property of its rightful owner.
Sponsored Links
1 / 11

SharePoint 2013 Developer Training PowerPoint PPT Presentation


What is SharePoint ? SharePoint Development Introduction covers Server Object Model of SharePoint. You can know more about it from http://www.staygreenacademy.com/

Download Presentation

SharePoint 2013 Developer Training

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Sharepoint 2013 developer training

SharePoint 2013 Server Object Model

SharePoint 2013 Server Object Model

by


Sharepoint 2013 developer training

Introduction

What is Server Object Model ?

Set of classes and namespaces separated into .Net Libraries.

What is the use of these classes?

Allows to develop server-side programs interacting with the SharePoint engine

What is server-side programs/solutions?

Set of instruction running on Server

How to use Server Object Model

Add the library/assembly as a reference in your Visual Studio project.

When is it best to use Server Object Model?

Only when a solution requires to talk with SharePoint farm/engine. This solution is called Farm or Sandboxed solution based on how it is deployed.


Sharepoint 2013 developer training

Introduction

What is the initial best development approach?

Develop solution using Console application in initial stage.

Why ?

Its speeds up the development process

It does not require deployment for testing

Any cautions ?

Make sure project is targeted to 4.5 Framework, and 64x Platform

Which is the main library need to reference?

Microsoft.SharePoint.dll

Where Microsoft.SharePoint.dll and other assemblies are located?

Under 15Hive\ISAPI (15Hive = C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\)


Sharepoint 2013 developer training

Practical

Objects Types

Located or defined in the namespace starts with

Microsoft.SharePoint.*

Microsoft.Office.*

Type or Class names starts with SP

Examples : SPFarm, SPWebApplication, SPSite, SPWeb etc…


Sharepoint 2013 developer training

Object Hierarchy


Sharepoint 2013 developer training

Practical

Creating first LIST Programmatically.


Sharepoint 2013 developer training

Practical

Display All sub sites under a site collections

  • Using

  • SPSite

  • SPWeb

  • Site.AllWebs

  • Web.Title

  • Web.Dispose()


Sharepoint 2013 developer training

Practical

Display All Sites

  • Using

  • SPSite

  • SPWeb

  • Site.AllWebs

  • Web.Title

  • Web.Dispose()


Sharepoint 2013 developer training

Practical

  • siteCollection.RootWeb

  • SPList

  • site.Lists.TryGetList(“”)

  • list.Delete

  • site.Lists.Add(…)

  • list.Fields.Add(…)

  • SPFieldType

  • SPView

  • list.DefaultView

  • defaultView.ViewFields.Add(…)

  • SPListItem

  • list.Items.Add()


Sharepoint 2013 developer training

Practical

Console Application

Practice 1 : How to display name of Lists available in a site ?

Practice 2 : How to display List of sites under a site collection ?

Practice 3 : How to display List Items of a List ?

Practice 3 : How to create List ?

Practice 4 : How to create List Item ?

Practice 5 : How to create a Site ?

Practice 6 : How to Add a Field in a List?

Practice 7 : How to include Field in a Default View


Thank you for watching sharepoint 2013 server object model by

Thank You for WatchingSharePoint 2013 Server Object Modelby


  • Login