St. Louis Day of Dot Net 2011 Jump Start: SharePoint Development

Slides:



Advertisements
Similar presentations
SharePoint 2010 Overview Presented by: Oscar Garcia
Advertisements

SharePoint 2010 Client Side Object Model. Agenda Introduction The Problem Client side vs Server Side Client Side Object Model – How it works – What can.
Getting Started with SharePoint 2013 Apps
Creating Page Layouts using SharePoint Designer or Visual Studio Becky Bertram MCSD, MCAD MCTS WSS Development MCTS MOSS Development
Basel · Baden Bern · Brugg · Lausanne Zurich Düsseldorf · Frankfurt/M. · Freiburg i. Br. Hamburg · Munich · Stuttgart · Vienna Entwicklung von SharePoint.
Microsoft SharePoint® Online: Extensibility and Customization
Randy Williams, MOSS MVP Senior Consultant Synergy Corporate Technologies.
Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security
SharePoint 2010 First Look: What's new for Developers in Microsoft SharePoint 2010 Matthew McDermott, MVP Aptillon, Able
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
St. Louis Day of Dot Net 2011 Jump Start: SharePoint Development Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET, MCTS
Development models for on-premises Transformation approaches Farm solution considerations.
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
Chapter 11 ASP.NET JavaScript, Third Edition. 2 Objectives Learn about client/server architecture Study server-side scripting Create ASP.NET applications.
Becky Bertram SharePoint MVP
Windows SharePoint Services 3.0 (WSS v3) Browser Clients MS Word Clients MS Outlook Clients Microsoft Office SharePoint Server 2007 (MOSS) Windows.
Site Provisioning Options Web Template Fundamentals Web Templates and App Webs Custom Solutions for Site Provisioning Wrap Up.
Fraser Technical Solutions, LLC
SPC220 Web Template FundamentalsCreating Web Templates Using Web Templates Web Templates and App Webs Wrap Up.
SharePoint Development 101: Feature Design By Becky Isserman
Introduction to SharePoint Development with VS2010 Paul Yuknewicz Lead Program Manager
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
Building Dynamic Applications on both Office 365 and on-premise.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
Facebook Like Solution in SharePoint Using JavaScript Amie Seisay
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Workflow and SharePoint Presented by Ben Geers. Overview What is workflow? Windows Workflow Foundation How does workflow apply to SharePoint? WSS v3 vs.
Creating Page Layouts using SharePoint Designer or Visual Studio Becky Bertram MVP SharePoint Server, MCSD, MCAD
SharePoint and Open XML Using SharePoint as a Data Source for your custom Open XML Documents Presented by Becky Bertram MCSD, MCAD, MCTS
Sustainable SharePoint 2010 Customizations By Bill Keys.
Spicing Up Web Parts Randy Williams SharePoint Hawaii User Group May 11, 2011.
Basic Developer Knowledge That Every SharePoint Admin Must Have Randy Williams, MVP MOSS Synergy Corporate Technologies
SharePoint Workflows with Visual Studio Stuart Cox RBA Consulting techpunch.wordpress.com.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
Sponsors Gold Silver Bronze Custom REST services and jQuery AJAX Building your own custom REST services and consuming them with jQuery AJAX.
HOW SHAREPOINT WORKS By Gary Newman. Root Folder Virtual Directories SP Farm DNS Iterative Forward DNS query for A host record HTTP request HTML & JS.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Customization Using SharePoint Designer 2007 Overview Editing look and feel –Master pages.
Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010.
New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.
SharePoint Online – Developing Solutions for the Cloud Chris Mayo Microsoft Corporation
What’s New in SharePoint 2010 SharePoint 2010 Development Primer New Developer Tools for SharePoint 2010 SharePoint 2010 Integration with PowerShell.
Michael Hofer Senior Consultant Microsoft Corporation.
Welcome to the Minnesota SharePoint User Group February 13 th, 2013 SharePoint 2013 – Developers Track - Client Side Rendering.
Copyright © 2006 Pilothouse Consulting Inc. All rights reserved. Site Definitions and Features Overview Review of SharePoint 2003 site definitions What’s.
Yaroslav Pentsarskyy Involved in SharePoint since 2003 SharePoint MVP (2009- Present) Blog: sharemuch.com.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
NET Development on Microsoft SharePoint Technology Part 4: Templates, Features, and Solution Deployment Mick Badran Breeze Training Consulting Trainer.
Application Hosting and Customization Introducing Sandboxed Solutions Executing Code in the Sandbox Sandbox Resource Monitoring.
Windows SharePoint Services Development Part 1: Paul Appleby Application Architect Microsoft Limited.
The Microsoft SharePoint Server Feature and Solution Framework An Overview Michael Mukalian – Technology Manager
Apps for the modern enterprise INTRODUCTION TO SHAREPOINT AS A DEVELOPMENT PLATFORM RON COURVILLE.
May 27, 2016 Building Workflows with SharePoint Designer the Good, the Bad, and the Ugly.
Start-SPPowerShell – Introduction to PowerShell for SharePoint Admins and Developers Paul BAker.
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
INF230 Basics in C# Programming
What's new in the world of SharePoint development and deployment
Automate Custom Solutions Deployment on Office 365 and Azure
Building Dynamic Applications with the SharePoint Client Object Model
Line of Business Solutions in SharePoint Online
SPC Developer 6/25/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Microsoft Dynamics.
SharePoint Online Development Best Practices
SharePoint-Hosted Apps and JavaScript
Code Tax: Programming With The Taxonomy API In SharePoint 2010
SharePoint Saturday Omaha April 2016
Lecture 1: Multi-tier Architecture Overview
Visual Studio 2010 SharePoint Development Tools Overview
5/17/ :57 AM OSP305 Developing Collaboration Solutions in the Cloud with Microsoft SharePoint Online Chris Mayo Snr. Technical Evangelist, Office.
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

St. Louis Day of Dot Net 2011 Jump Start: SharePoint Development Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET, MCTS www.beckybertram.com @beckybertram

SharePoint Six-in-One The information in this presentation is condensed from chapters 7 and 8, authored by myself, in “SharePoint 2010 Six-in-One”, published by Wrox.

Topics What is a SharePoint feature? What is a SharePoint solution? What are my development tools? Using Visual Studio 2010 with SharePoint Ways of interacting with SharePoint: CAML Server Object Model Client Object Model LINQ to SharePoint REST SharePoint Web Services

Features and Solutions

What is a SharePoint Feature? A unit of functionality within SharePoint that can be turned on, or “activated”. Hard to describe because it can be essentially any piece of functionality in SharePoint. You could write a feature to: Add a site column, content type, or list to a site. Add an item to a list Start a timer job. Kick off a workflow Add a web part to a page Etc.

Scope 4 different scopes: Farm, Web Application, Site Collection, Site A feature can be activated only once per item at the given scope. (For instance, a feature scoped to the Site Collection level could be activated in both the “HR” and “IT” site collections, but it could only be activated once in the HR site collection and activated only once in the IT site collection.) Examples: Feature that deploys a master page would be scoped to Site Collection level, while feature that adds a particular document library to a site could be scoped to the Site level.

Reusability Because features can be reused, you ensure that the exact same behavior will happen in the exact same way across farms, web applications, site collections, or sites, (as opposed to using a tool like SharePoint Designer, or making the change in the browser, where human error could accidentally make a mistake).

Activation Dependency Features can be dependent on one another, which means one feature cannot be activated until another feature has been activated first. Example: I have one feature scoped to the Site Collection level called “My List Def” that deploys a custom list definition to the site collection called My Custom List. I have another feature scoped to the Site level, called “My List”, which, when activated, creates an instance of My Custom List in the local site. The “My List” feature is dependent on the “My List Def” feature.

Feature Activation/Deactivation Features can be activated or deactivated via the browser or by using PowerShell

Feature Folder Each feature contains a folder that includes files related to that feature: Element files (ASPX pages, images, etc.) Element manifest files (tell SharePoint what to do with element files, such as add an item to a list) Feature manifest (Feature.xml – tells SharePoint which element manifest files to execute, as well as properties of the feature, such as its name and scope)

What is a Solution? A solution package is just a cabinet file with an extension of WSP. A solution is a mechanism for deploying assets to your SharePoint server farm. Assets: assembly, files, features Manifest: solution properties, assembly location, feature location, web.config changes Solutions work across a load balanced farm.

Solutions and Features Solutions can contain references to features. Example: I have a feature called “My Web Part” that includes a compiled web part. When activated, the feature adds that web part to the Web Part Gallery of the site collection. The solution package would contain: a reference to the feature manifest file the assembly used by the web part an instruction that the web.config must be updated to tell SharePoint that it’s okay to use that web part’s assembly (i.e. mark the web part type as “safe”).

Sandboxed vs. Farm Solutions Farm solutions deploy assets to the server file system and assemblies are executed from within the web server process. Sandboxed solutions are extracted and run within their own separate “sandboxed” process, and are thus safer. Sandboxed solutions have reduced functionality, but are safer to use when the site is co-located. Sandboxed solutions can be deployed by site administrators, whereas farm solutions must be deployed by server admins. Resource throttling prevents “rogue” sandboxed solutions from chewing up server resources. Farm solutions added to server via PowerShell (or STSADM tool), deployed via PowerShell or Central Admin. Sandboxed solutions uploaded to Solutions Gallery, deployed from there.

Customization vs. Development Customization involves making changes to a particular site collection or site, usually by means of a tool like SharePoint Designer, or via the web browser. Development involves the creation of solution packages, features, etc., which can be used repeatedly in different environments. Developers utilize a tool like Visual Studio.

Visual Studio 2010 Visual Studio 2010 must be used to build SharePoint 2010 applications. You can use Visual Studio 2010 to build SharePoint 2007 solution packages, but you still have to do the manual work to compile the packages. Visual Studio 2010 comes with a number of built in project templates that can serve as a starting point for building SharePoint solutions. Built-in debugging functionality

VS Third Party Add-Ons SharePoint Power Tools: http://visualstudiogallery.msdn.microsoft.com/8e602a8c-6714-4549-9e95-f3700344b0d9/ CKS-Dev: http://cksdev.codeplex.com/

Demo: Creating a Solution Package

Developing for SharePoint

CAML Collaborative Application Markup Language Gives instructions telling SharePoint how to add assets to the content database. Adding an item to a list (including adding items to libraries) Adding a list or library to a site Adding a content type or site column to a site Can also be used to retrieve items from the content database much like a SQL query, using “where”, “sort by” and “group by clauses”. This is called a CAML Query.

CAML Example <Field Type="Choice" Group="My Custom Columns" DisplayName="Fiscal Quarter" Name="FiscalQuarter" ID="{0DFD4BB2-DBC8-461b-8A2E-E7E5D077F679}"> <CHOICES> <CHOICE>Q1</CHOICE> <CHOICE>Q2</CHOICE> <CHOICE>Q3</CHOICE> <CHOICE>Q4</CHOICE> </CHOICES> </Field>

Server Side Object Model Many of the core classes are contained in the Microsoft.SharePoint.dll assembly, and the Microsoft.SharePoint namespace. Core classes often start with “SP”, such as: SPFarm SPWebApplication SPSite (site collection) SPWeb (site) SPList SPListItem

SSOM Hierarchy The hierarchy of objects is fairly intuitive; each item contains a collection of lesser items, and each item can access its parent item.

Client-side Object Model Used to access SharePoint from a location outside of the SharePoint environment 3 CSOM API’s: Client-side API for running code in a .NET 3.5 (or higher) managed code application Silverlight API ECMAScript API (i.e. javascript) Executes commands in batches, so as to reduce round-trips to server

CSOM Example (Client-side API) using System; using Microsoft.SharePoint.Client; … ClientContext ctxt = new ClientContext("http://intranet/"); Web marketingSubsite = ctxt.Web; ctxt.Load(marketingSubsite); ctxt.ExecuteQuery(); string siteTitle = marketingSubsite.Title; ListCollection lists = marketingSubsite.Lists; ctxt.Load(lists); marketingSubsite.Title = "New Title"; marketingSubsite.Update(); string newTitle = marketingSubsite.Title; Console.WriteLine(lists.Count.ToString()); Console.WriteLine(newTitle);

LINQ to SharePoint Provides a way of querying SharePoint in assemblies using SQL-like syntax and strongly-typed classes. Must use the SPMetal.exe tool to generate entity classes. Example: If you have a list called “Customers” with two columns: “First Name” and “Last Name”, the entity classes generated would allow you to access the list using an object called Customers, which would contain a collection of Customer objects. You could access the value stored in the First Name column by using the Customer.FirstName property, etc.

RESTful Interface REpresentational State Transfer interface Uses HTTP operations of POST, GET, PUT and DELETE to interact with SharePoint data. Allows you to use URLs to retrieve data from SharePoint remotely, by appending “/_vti_bin/ListData.svc” to your site URL. Examples: Retrieves the title of the second item in the Accounting site’s Documents list: http://intranet/sites/accounting/_vti_bin/ListData.svc/Documents(2)/Title Returns an XML-formatted list of documents from the document library where the title of the document is “My Document”: http://intranet/sites/accounting/_vti_bin/ListData.svc/Documents?filter=Title eq ‘My Document’

SharePoint Web Services Fairly neglected in SP2010, since goal was to get people to use the CSOM instead of web services to access SharePoint. Web services are found in the /_vti_bin directory of your web application. Like REST, append URL of web service to current site to get data from that site. For example, you can retrieve list data from the HR site by accessing http://intranet/sites/HR/_vti_bin/Lists.asmx. You can use the Lists web service to pass in query information via XML, which will in turn return an XML-formatted list of list data.

Questions?