SharePoint Development - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

SharePoint Development

Description:

Iterating through collections by index can result in unnecessary database calls ... SDK, white papers and code samples available at: http://msdn.microsoft.com ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 37
Provided by: bilsi
Category:

less

Transcript and Presenter's Notes

Title: SharePoint Development


1
SharePoint Development
  • Scratching the Surface with
  • Web Parts

2
Agenda
  • Who am I?
  • SharePoint from a developers perspective
  • Web Parts, Zones, and Pages
  • Leveraging the ASP.NET Framework
  • The SharePoint Object Model
  • Deployment Scenarios
  • SharePoint Resources

3
Bil Simser
  • Independent SharePoint Consultant
  • Microsoft Most Valuable Professional for
    SharePoint Portal Server
  • http//www.microsoft.com/mvp/
  • My SharePoint Blog
  • http//weblogs.asp.net/bsimser
  • Contact Me
  • bsimser_at_shaw.ca

4
A Developers Perspective
  • Windows SharePoint Services is great out of the
    box
  • No code required for immediate value
  • Windows SharePoint Services is (optionally) part
    of the Windows Server 2003 infrastructure (and
    free!)
  • Rich extensibility for custom solutions
  • Managed server object model
  • Remote access through Web Services
  • Web Part infrastructure for extending UI
  • Leverages ASP.NET platform advancements in the
    future

5
Development Environment
  • Can use Windows XP or develop directly on server
  • Remote debugging vs. local
  • Virtual Machine running Windows 2003 Server with
    SharePoint
  • See my blog on setting up a virtual environment
  • http//weblogs.asp.net/bsimser/archive/2006/02/09/
    437788.aspx

6
Business Opportunity
  • Applications
  • News Publishing
  • Bug Tracking
  • Project Management System
  • Expense Reporting
  • Blogs
  • Tools
  • Web Parts
  • Usage Reporting
  • Connectivity

7
Web Parts
  • What is a Web Part?
  • A unit of portal functionality
  • Building Block of SharePoint
  • Web Parts are placed in Web Part Zones
  • Web Parts can communicate with each other
  • Can be personalized by end users (if enabled)

8
Web Part Zones
  • Web Part Zones are containers for Web Parts
  • Divide a Web Part Page into sections of content
  • During Customization and Personalization, Web
    Parts can be dragged from one Zone to another

9
Web Part Pages
  • Are the building blocks of a site, providing the
    individual page layouts
  • Each page is addressable individually by URL
  • There is a .aspx file for each page
  • Pages can be customized in Frontpage or by hand
  • Pages contain Web Part Zones

10
Demonstration
  • Getting to know Web Parts, Zones, and Pages

11
Web Part Infrastructure
  • Personalize your page in the browser to simplify
    and focus on the information most relevant to you
  • Page and site authors build custom solutions
    using Web Parts in Microsoft Office FrontPage
    2003
  • Microsoft Visual Studio .NET developers extend
    SharePoint Products and Technologies by
    encapsulating web services and enterprise data in
    ASP.NET server controls

12
Extending UI With Web Parts
  • Building blocks for modular web pages
  • Provides connection to information apps
  • Built by developers
  • ASP.NET Server Controls
  • Added to pages by site owners
  • Easy configuration
  • Personalized by end users
  • Rich and custom client experience

13
Web Parts And Developers
  • ASP.NET Server Control based
  • Web Part is a ASP.NET server control
  • Leverage Visual Studio
  • Project templates on MSDN
  • Intelli-sense, debugging, source control, etc.
  • Deployed as an assembly
  • Reusable across thousands of pages and sites
  • Admins control which Web Parts are available
  • End Power users decide where Web Parts are used

14
Web Parts and SharePoint
  • Built-in Web Parts
  • Rich Text Editor
  • List Views
  • Events/Calendars
  • Member Information
  • Usage Reports
  • Custom Web Parts
  • Lots of 3rd party Web Parts
  • Build your own!

15
Demonstration
  • Hello World Web Part

16
The Pain of Building Web Parts
  • Web Parts dont support design view
  • Web Parts are Server Controls
  • All HTML must be emitted
  • All components must be created and placed in code
  • Rich design time experience
  • Smart Part (uses User Controls)

17
Web Parts and the .NET Framework
  • 100 managed code
  • Multiple language support (C, VB.NET, etc.)
  • Web Services
  • Code Access Security
  • ASP.NET server controls

18
Control Composition
  • Web Parts can be easily built using other
    ASP.NET Controls
  • Re-use functionality and services
  • No need to write everything from scratch
  • Leverage the ASP.NET Framework

19
Demonstration
  • Reusing ASP.NET Components

20
.NET Windows SharePoint Services Object Model
  • Managed code object model on the server
  • Accessible via ASP.NET or any other server
    process
  • Implemented in C
  • Exposes almost of all of the data stored in
    Windows SharePoint Services

21
Working with the Object Model
  • The object model has four top-level objects
  • SPWeb (represents an individual site)
  • SPSite (represents a site collection, which is a
    set of web sites)
  • SPVirtualServer (represents a virtual server)
  • SPGlobalAdmin (used for global administration
    settings)
  • In order to perform actions on data within a web,
    you must first get an SPWeb object.

22
The SPWeb Class
  • Starting point to get at the Lists, Items,
    Documents, Users, Alerts, etc. for a web site.
  • Example Properties
  • Web.Lists (returns a collection of lists)
  • Web.Title (returns the title of the site)
  • Web.Users (returns the users on the site)

23
Demonstration
  • Accessing the Object Model

24
What Is A List?
  • Virtual table storing item data and metadata
  • Building block for collaborative applications
  • Scenarios
  • Spreadsheet on a Web page
  • Community Bulletin Board
  • File Folder
  • Calendar
  • Reports
  • Issue Tracking
  • Surveys
  • Data Table
  • Built-in list types are extensible

25
Programming Lists
  • Multiple methods of accessibility
  • .NET Object Model
  • Lists Web Service
  • FrontPage RPC
  • Extensible functionality
  • New list types for deployment
  • List templates

26
What Is A Document Library?
  • Specialized SharePoint List
  • 3 Types of Document Libraries
  • Document Library
  • Form Library
  • Picture Library
  • Special Features
  • Check-In/Check-Out
  • Versioning
  • WebDAV access
  • Event Handlers
  • Promotion/Demotion of properties

27
Programming Document Libraries
  • Multiple methods of accessibility
  • .NET Object Model
  • WebDAV
  • FrontPage RPC
  • Extensible functionality using event handlers
  • Custom workflow
  • Enforcing business logic

28
Accessing Document Libraries
29
Events
  • Events are supported on document libraries
  • Operations such as add, update, delete, check-in,
    check-out, etc.
  • Events are asynchronous!
  • Events call a managed interface

30
Performance Tips
  • To optimize performance, use foreach() to step
    through collections. Iterating through
    collections by index can result in unnecessary
    database calls
  • Calls to collections such as List.Items are
    expensive. Preserve the collection rather than
    requesting it again

31
Deployment And Security
  • Administrator has to install the assembly
  • Only registered web custom controls will run in
    SharePoint pages
  • Inline server script in the page will not
    execute
  • Code behind in pages can be made to work
  • Utilize ASP.NET Code Access Security (CAS)

32
Demonstration
  • Deployment Using CAB Project

33
Summary
  • SharePoint Products and Technologies is built for
    extensible .NET development
  • Lots of opportunity for rich customization
    through Web Parts
  • Using the .Net platform allows us to leverage
    rich features
  • Infrastructure Scales out and up for large server
    farms
  • SDK, white papers and code samples available
    athttp//msdn.microsoft.com/sharepoint

34
Resources
  • Blogs
  • http//blogs.msdn.com
  • http//weblogs.asp.net
  • Microsoft Newsgroups
  • news.microsoft.com
  • Forums message boards
  • http//asp.net/forums
  • Microsoft SharePoint Site
  • http//www.microsoft.com/sharepoint/default.mspx

35
Resources
  • Elis SharePoint Resources
  • http//weblogs.asp.net/erobillard/archive/2004/06/
    17/158311.aspx
  • Arpan Shaws List of OnDemand Web Casts
  • http//blogs.msdn.com/arpans/archive/2004/10/11/24
    1118.aspx
  • Lamont Harrison
  • http//blogs.msdn.com/lamonth/articles/368827.aspx

36
Questions?
Write a Comment
User Comments (0)
About PowerShow.com