SharePoint - PowerPoint PPT Presentation

1 / 35
About This Presentation
Title:

SharePoint

Description:

Format: theory plus some code and/or demo to back it up. Agenda. SharePoint Summary ... Chrome. Visual administration. layout. Connectivity augmentations. WP2WP ... – PowerPoint PPT presentation

Number of Views:64
Avg rating:3.0/5.0
Slides: 36
Provided by: kenw152
Category:

less

Transcript and Presenter's Notes

Title: SharePoint


1
SharePoint
  • Patterns of Development
  • Lecturer Ken Wong

2
Abstract
  • Present common development patterns
  • UI customizations
  • Format theory plus some code and/or demo to back
    it up

3
Agenda
  • SharePoint Summary
  • UI Customizations
  • Basics
  • Web part patterns
  • Custom code behind
  • Site Definition Modifications
  • Custom property page
  • Extending Areas

4
What is SharePoint?
  • SharePoint is about collaboration
  • Information aggregator
  • Hierarchal storage of data

5
Areas
  • Nodes in the hierarchy
  • Storage of
  • Lists ? tables of data
  • Documents / images
  • Urls
  • Rich Text
  • Landing page (default.aspx)

6
Areas and Site Definitions
  • Site definition template ? Area
  • Analogy to OOP
  • Site Def is to class
  • Area is to object (instance of class)
  • Schema of data (lists)
  • Schema of files (including landing page ?
    default.aspx)

7
Basic UI Customizations
  • WSS
  • apply themes
  • SPS
  • logo
  • adding custom CSS
  • Web Part Infrastructure
  • drag and drop web parts
  • web part zones

8
Demo
  • Basic UI Customizations

9
Web Parts
  • Web Control on steroids
  • Visual augmentations
  • Chrome
  • Visual administration
  • layout
  • Connectivity augmentations
  • WP2WP
  • Inherits System.Web.UI.Control
  • Very much like a web control
  • RenderWebPart verus Render method
  • Must go on a Web Part Page

10
Web Parts
  • Good MSDN white paper
  • A Developers Introduction on Web Parts

11
Web Part User Control
  • User Controls are easier to make than Web
    Controls
  • Separate of presentation and logic
  • Code behind model

12
Web Part User Control Benefits
  • Develop User Control outside of SharePoint
  • Prototype it on another dev environment
  • Business logic doesnt access SharePoint OM
  • Familiar to ASP.NET developers
  • Dont know have to know SharePoint

13
User Control Project Setup
  • All User Controls in its own library
  • Must follow SharePoint security model
  • Signing it and putting in GAC is easiest
  • Testing ASP.NET web site

14
Demo
  • Web Part User Control

15
Web Part Xml/Xslt
  • Alternative to user control
  • Has separation of code / data
  • Model from Sharepoint Portal Server 2001

16
Web Part Xml / Xslt
  • Can have developers to maintain the views ?
    dont need to know SharePoint nor ASP.NET just
    Xslt
  • Transformation to Xml maintain by a core team
  • Gotchas
  • Caching will be needed for scalability
  • Where Xslt is stored could be an issue

17
Demo
  • Web Part Xml/Xslt

18
Custom Page Code Behind
  • Extend existing SharePoint pages or to add new
    pages
  • WebPartPage is still a System.Web.UI.Page

19
Demo
  • Creating a custom page code behind code
    walkthrough

20
Site Definition ASPX Modifications
  • Way to change the look, the UI of the landing
    pages and other pages
  • Corporate branding
  • TEMPLATES\1033
  • MSDN article on how to create a new Site
    definition from an existing

21
Site Definition ASPX Modifications
  • DISCLAIMER
  • Changes to the OTB Site Definitions are not
    supported by Microsoft
  • Make modifications on a copy
  • Setup your portal areas to use the modified Site
    Definition

22
Modified Site Definitions Setup
  • One Solution

23
Ghosted / Unghosted Files
  • Ghosted
  • From NTFS
  • Faster access
  • centralized
  • Unghosted
  • From SQL Server
  • Slower database hit
  • Copy On Write (COW) algorithm

24
Types of Site Definition Changes
  • Easy
  • Landing page changes
  • Several default.aspx
  • Includes creating new web part zones
  • Hard
  • All List CRUD pages
  • Files in _layouts (shared management pages)
  • Why? Couple of hundred files dont support the
    ONET.XML alternateHeader tag

25
Types of Site Definition Changes
  • Presents a big problem for corporate branding
  • Customers dont like it when only half of their
    site is branded

26
Sketch of a Solution
  • Console app that iterates through the aspx pages
  • Looks for source tags and does
  • Replace/Insert
  • Before tag
  • After tag
  • InnerXml First node
  • InnerXml Last node
  • Where clause based on tag attributes
  • Challenges
  • Aspx are not fully xml compliant
  • Regex doesnt work across carriage returns (must
    use old fashion string.indexOf)
  • Tags (ltIMGgt) are self closing without /

27
What not to Do
  • Do not get rid of server controls
  • Hide them with a ltdiv stylevisibilityhiddenblo
    cknonegtlt/divgt
  • Why? referenced in code behind
  • ? Object reference not found
  • Do not do this on the OTB site definitions
    (unsupported) do it on a copy

28
Some Cavaets
  • Brute force
  • All pages need to be tested
  • Get firm requirements before applying this
  • Does not do major structural changes
  • If possible convince the customer to only do it
    on landing pages and list CRUD pages try to
    leave out _layouts

29
Site Definition ASPX Structural Changes
  • Changes to the main table layout
  • Very hard ? no automated solution
  • Must be done manually (1000 files)

30
Custom Property Pages
  • SPS has encapsulated many UI components for its
    admin pages
  • Tabs
  • General page layout
  • Can just reuse them to create new property pages

31
Demo
  • Custom property page code walkthrough

32
Extending Areas
  • Area object has user defined fields to store
    other information
  • 3 booleans
  • 3 integers
  • 5 strings
  • To get more strings serialize data to the
    NText1 field

33
Demo
  • Code walkthrough of AreaEx class

34
Summary
  • Basics of UI customization
  • Web Part patterns
  • user control / xslt
  • Custom page code behind
  • Site Definition ASPX changes
  • Custom Property Page
  • Extending SharePoint areas

35
More Information Books
  • Microsoft SharePoint Technologies
  • Microsoft SharePoint Building Office 2003
    Solutions
  • Microsoft SharePoint Products and Technologies
    Resource Kit
Write a Comment
User Comments (0)
About PowerShow.com