Date post: | 03-Jun-2018 |
Category: |
Documents |
Upload: | eric-shupps |
View: | 223 times |
Download: | 0 times |
of 32
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
1/32
From .NET to SharePoint:
Introduction to SharePoint
Programming for .NETDevelopers
Eric Shupps, Microsoft MVP [SharePoint]
President
BinaryWave
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
2/32
Sponsored by:
Visit us on the web at www.binarywave.com
Real-time application monitoring, event
management, and operational health
metrics for Microsoft SharePoint
Reduce troubleshooting time by up to 30%
Increase efficiency and improve user satisfaction
Avoid downtime and costly outages
Meet or exceed service level agreements
Maximize investment in current infrastructure
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
3/32
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
4/32
Why SharePoint?
.NET
Data Storage
PresentationClustering
Security
Disaster Recovery
Web Services
API
Features
SharePoint
Data Storage
PresentationClustering
Security
Disaster Recovery
Web Services
API
Features
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
5/32
SharePoint 2007 and ASP.NET
SharePoint 2007 derives from ASP.NET 2.0 and adds an
extra layer of functionality (OM, Web Services, Features,
Solution Packages, etc.)
Many ASP.NET development practices transfer directly
to SharePoint development
Some ASP.NET development methods are suboptimal
or unsupported within a SharePoint environment and
new methods must be learned to take advantage of
SharePoint functionality (Database vs. OM)
Yes, you can utilize source control and managed code
deployment within SharePoint!
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
6/32
Web Applications & Site Collections
Web application = IIS Virtual Server
Web application is base management unit
A site collection resides within a web application
Site collections include basic WSS sites and full portalsites; replace portal areas
Special site collection types include My Sites, Shared
Services Provider, Publishing Web
Each web application may be assigned its own app pool Web applications may share one or more Shared
Service Providers
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
7/32
List Structures, Types and Views
Lists are ad-hoc data repositories with a limited number
of field types and data elements
List content is stored in a single table in SQL
List content is displayed in user-defined views that canbe filtered, sorted, grouped and styled
List views are somewhat similar to ASP.NET GridView
objects but are sealed and non-extensible
Lists may be accessed programmatically via the objectmodel or web services
Lists support list, folder and item level security
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
8/32
Features
A Feature is a defined set of functionality encapsulated
within a specific format
Features are the basic building block of SharePoint
development
Features may be comprised of configuration parameters,
code/file deployment, or both
Features may be deployed manually or automatically on
a local or global basis
Features are heavily dependent on CAML
Multiple features can be bundled into a single Solution
Package for easy deployment
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
9/32
Object Model
The SharePoint object model is a rich API provided for
.NET developers to extend the base functionality of
SharePoint
The OM contains a rich set of interfaces, including
extensive web services
Any custom code can utilize the SharePoint OM by
referencing the Microsoft.SharePoint.dll
NOTE: Majority of OM code must run on a SharePoint
server instance (limited remote development/debugging)
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
10/32
Get to the
Demos
Already!
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
11/32
Narrative
Bob, an ASP.NET developer, must create an application
in SharePoint to support his companys new product
introductions
Users must be able to comment on new product designs
WITHOUT having the ability to edit the list item
Management wants a dashboard providing easy access
to the latest comments
Product managers must be able to archive old product
designs for audit and retention purposes
The entire solutions must be provided to IT as a single
package
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
12/32
Meet Bob
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
13/32
Meet Bob
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
14/32
Meet Bob
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
15/32
Meet Bob
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
16/32
Meet Bob
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
17/32
DEMO
Creating Custom Lists
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
18/32
Application Pages
Shared set of resources used by all site collections
Provide access to a variety of (mostly) administrative
tasks, including setting properties, making configuration
changes, viewing content collections, assigning
permissions, etc.
Run in a separate virtual directory (/_layouts)
Stored on disk in the 12\TEMPLATE\LAYOUTS folder
Share a common design theme but use a fixed masterpage separate from site master
Custom application pages are relatively easy to create
and deploy
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
19/32
DEMO
Creating an Application Page
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
20/32
Event Receivers
Event Receivers are handler assemblies that respond to
events on specific objects (Sites, Lists, etc.)
List ERs override one of the following methods:
ItemAdding (during event)
ItemAdded (post event)
ItemUpdating (during event)
ItemUpdated (post event)
No UI or user feedback mechanism (write errors and
status messages to event log)
Must run with Full Trust in the GAC
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
21/32
DEMO
Creating an Event Receiver
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
22/32
Web Parts
Web Parts are a specific type of server control that
inherit from System.Web.UI.WebPart
Web Parts contain discreet functionality that is exposed
to the user in the context of a Web Part Page
Web Parts may contain any custom code but do not
have an IDE; all controls must be built dynamically
Web Parts execute in the context of the current user
Require a WebPartManager and WebPartZone Web Parts may be deployed individually or as part of a
solution package
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
23/32
DEMO
Creating a Web Part
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
24/32
Web Services
SharePoint Web Services provide remote access to a
number of Objet Model functions
Web Services are limited in scope to several primary
functional areas, such as Farm, Site, Web, List, List
Items, List Views, etc.
Web Services require a great deal of XML manipulation
Many Web Service functions require a solid
understanding of CAML
In some instances Web Services can be more
performant than direct OM interaction
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
25/32
Workflow
SharePoint Workflow inherits and builds upon Windows
Workflow Foundation (WF)
Simple workflows can be created in SharePoint
Designer, advanced workflows require Visual Studio
Two types of workflow Sequential and State Machine
User interaction provided via InfoPath forms or custom
ASPX pages
Workflows are tied directly to lists and list items
Built-in history, tasks, and tracking mechanisms
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
26/32
Customization & Branding
SharePoint 2007 utilizes ASP.NET master pages and
extensive CSS
Customization and branding can be done on a site-by-
site basis using SharePoint Designer or on a global
basis using custom Site Definitions
Site Definitions are advanced templates that may include
custom code, including server controls, user controls,
web parts, etc.
Site Definitions are deployed using the Feature
framework
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
27/32
Site Definition Structure
Solution Package
Features
Master
Page
Site
Columns
Content
Types
Layout
Pages
Files
Webtemp
Site
Templates Styles Images
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
28/32
Solution Packages
Solution Packages are bundles of functionality that are
deployed and managed at the farm level
Solution Packages are created in Visual Studio using the
Cabinet SDK
Solution Packages may contain one or more Features,
assemblies, pages, controls, and other objects
SharePoint handles installation and configuration of
solution items automatically across entire farm
Solution Packages add development overhead but
dramatically decrease code maintenance and
deployment overhead
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
29/32
DEMO
Code Deployment Using Features and
Solution Packages
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
30/32
Please fill in the evaluation
forms!Feel free to talk to me after the
seminar!
8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
31/32
Resources
Slides and sample code: www.sharepointcowboy.com, Presentations link
http://www.sharepointcowboy.com/http://www.sharepointcowboy.com/8/12/2019 From .NET to SharePoint - Introduction to SharePoint Programming for .NET Developers
32/32
In Memory of Patrick Tisseghem
1968 - 2008