SharePoint and InfoPath

Download Report

Transcript SharePoint and InfoPath

Welcome to the
Minnesota SharePoint
User Group
User Group Goal / Objectives
Develop and support a local community focused on
Microsoft SharePoint Technologies
• Educate user group members about SharePoint Technologies
• Transfer knowledge within the community
• Communicate best practices
• Introduce new products / solutions
Agenda
•
Quick Intro
•
Announcements and News
•
Presentation
•
Break
•
Presentation (continued)
•
Office 12 Updates, Q & A, Give Away!
Introductions – MNSPUG Sponsors
• Inetium (www.inetium.com)
• Twin Cites based Microsoft consulting company
• Microsoft Gold Certified Partner
• Practice Area focused on Information Worker Technologies
• New Horizons – Minnesota (www.newhorizonsmn.com)
• Microsoft Gold Certified Partner
• Training on many technologies
• Microsoft (www.microsoft.com)
• I’m guessing you’ve heard of them
www.sharepointmn.com
• Website for user group
• SharePoint resource documents
• SharePoint resource websites links
• RSS Feeds
• Meeting Schedule
• Past User Group Presentations
• Watch for changes soon!
www.sharepointmn.com
Upcoming Schedule
• Next Meetings
• April 12th 9:00 AM to 11:00 AM
• Topics: SharePoint Success Stories – Case Studies
• May 10th 9:00 AM to 11:00 AM
• 2 yr MNSPUG Anniversary Celebration
• Ongoing Schedule
• 2nd Wednesday of every month
• 9:00 to 11:00 am
• Microsoft’s Bloomington Office
Conference Reminder
•
SharePoint Connections
April 2-5: Orlando, FL
•
Advisor Summit on Microsoft SharePoint
April 9-13: Las Vegas, NV
•
Tech Ed
June 11-16: Boston, MA
SharePoint
Web Part Development
(Part 1)
Building a Basic Web Part
• Assembly References
• Code
• Deployment
Assembly References
• What: Microsoft.Sharepoint.dll
• Why: We need to inherit from Webpart
• Others
•Microsoft.SharePoint.Administration
•Microsoft.SharePoint.Portal
•Microsoft.SharePoint.Portal.Search
The Code
• Inherit from WebPart
• Override RenderWebPart
• Display Something
Deployment – The Hard Way
• Code Signing
• Create DWP
• Deploy Files
•/bin or GAC
•/wpcatalog
• SafeControl
•Edit web.config
Deployment – The Easy Way
• Make a CAB
• Visual Studio Setup Project
• Manifest.xml
• Deployment made simple
• stsadm.exe -o addwppack -filename myfile.cab –url http://myportal/
Demo – Hello World
Personalization – What can we do?
• Storage
•Personal, Shared, None
• Default Values
• Categories
• User Editing
Demo – Hello Whoever You Are
Beyond Simple Webparts
• Using Web Controls
• Wiring up Events
• Making Polite Web Parts
Using Web Controls
• Commonly Used Server Controls
• TextBox
• Label
• DataGrid
• Intitialize these controls in CreateChildControls
• You can override RenderWebPart
• Use EnsureChildControls() to ‘ensure child
controls’
Events
• Not as intuitive as in WinForms
• Uses similar Event/Delegate model
• Needs to be initialized early in the Lifecycle
Web Part Life Cycle
• Web Part Constructor
• Web Part Init
• Load ViewState
• Create Child Controls
• Web Part Load
• Web Part PreRender
• Save ViewState
• Web Part Render
• Web Part Unload
Making Polite Web Parts
• Errors can cause big problems
•PIC
• Wrap calls with try/catch
Demo – Hello DataGrid
Using User Controls in SharePoint
• User Controls
• Can be visually Designed
• Deployed as ascx Files
• Aren’t Natively Supported in SharePoint
User Controls – The Solution
• SmartPart
• Freely Downloadable Tool
• Wraps a User Control in a Server Control
• Supports Basic Personalization and Connections
• Alternatives
• Write your own wrapper
• The Secret Is In LoadControl
Demo – HelloSmartPart
Break!
SharePoint
Web Part Development
(Part 2)
Web Part Connections
• Web Parts can communicate via
connection interfaces
• Can implement both provider and
consumer interfaces
• Can maintain multiple concurrent
connections
Web Part Connections
Provider
Consumer
Shares
ICellProvider
ICellConsumer
Single value
IRowProvider
IRowConsumer
Single row
IListProvider
IListConsumer
List of data
IFilterProvider
IFilterConsumer
Filter string
IParametersOutProvider
IParametersOutConsumer
List of parameters – provider
defined
IParametersInProvider
IParametersInConsumer
List of parameters –
consumer defined
Web Part Connections
• Built in transformers allow additional
connection options
Provider
IRowProvider
Consumer
ICellConsumer
IRowProvider
IFilterConsumer
IParametersOutProvider
IParametersInConsumer
IRowProvider
IParametersInConsumer
Demo
ICellProvider Web Part
SharePoint Object Model
• Microsoft.SharePoint.Portal.WebControls.BaseAreaWebPart
 GetAreaInformation
 GetAreaPath
 GetSubAreas
• Web Parts can gain access to their current SPSite and SPWeb
 Microsoft.SharePoint.WebControls.SPControl.GetContextSite()
 Microsoft.SharePoint.WebControls.SPControl.GetContextWeb()
Demo
MyWebs Web Parts
SharePoint Web Services
• WSS Provides several Web Services
• Located in the [site]/_vti_bin/ directory
SharePoint Web Services
Administration
Provides methods for managing a deployment ofWindows SharePoint Services, such as for creating
or deleting sites.
Alerts
Provides methods for working with alerts for list items in a SharePoint site.
Document
Workspace
Exposes the Document Workspace Web service and its eleven methods for managing Document
Workspace sites and the data they contain.
Forms
Provides methods for returning forms used in the user interface when working with the contents of a
list.
Imaging
Provides methods that enable you to create and manage picture libraries.
List Data Retrieval
Provides a method for performing queries against lists in Microsoft Windows SharePoint Services.
Lists
Provides methods for working with lists and list data.
Meetings
Provides methods that enable you to create and manage Meeting Workspace sites.
Permissions
Provides methods for working with the permissions for a site or list.
Site Data
Provides methods that return metadata or list data from sites or lists in Microsoft Windows
SharePoint Services.
Sites
Provides a method for returning information about the site templates for a site collection.
Users and Groups
Provides methods for working with users, site groups, and cross-site groups.
Versions
Provides methods for working with file versions.
Views
Provides methods for working with views of lists.
Web Part Pages
Provides the methods to send information to and retrieve information from XML Web services.
Webs
Provides methods for working with sites and subsites.
SharePoint Web Services
Name
Description
AddWebPart
Adds a new Web Part to a Web Part Page.
DeleteWebPart
Deletes a Web Part.
GetWebPart
Returns the XML data for a Web Part.
GetWebPart
CrossPageCompatibility
Returns the compatibility information of providerPartID with all the parts
on the target page.
GetWebPart
PageConnectionInfo
Returns group and interface information for all parts on the same page
as well as compatibility results for the provider part (providerPartID) with
other parts on the same page.
GetWebPartPageDocument
Returns the Web Part Page, complete with Web Parts and properties
included within each Web Part zone.
GetWebPartProperties
Returns an XML string of all Web Parts associated with a Web Part
Page.
GetXmlDataFromDataSource
Returns the XML from a data retrieval service.
RenderWebPartForEdit
Returns an XML blob including part property information and rendering
HTML.
SaveWebPart
Saves changes to an existing Web Part.
Demo
Web Part Inventory
ASP.NET 2.0 Web Parts
• Built using the 2.0 Framework
• Requires ASP.NET Personalization
• Can exist outside of SharePoint
• Specialized Zones to provide SharePoint
WebPart functionality
ASP.NET 2.0 Web Parts
WebPartManger
•Required for all Web Part pages
•Manages the DisplayMode for the page
–DesignDisplayMode
–EditDisplayMode
–CatalogDisplayMode
–ConnectDisplayMode
–BrowseDisplayMode
ProxyWebPartManager
•Used only when using Master Pages
•Placed on a content page to allow configuration of static connections (since
you don’t have access to the WebPartManager at designtime)
ASP.NET 2.0 Web Parts
WebPartZone
•Container for your Web Parts
•Allows configuration, dynamic placement, etc
•Can define style for WebParts placed into the Zone
ASP.NET 2.0 Web Parts
CatalogZone
•Container for CatalogParts
•Allows users to add Web Parts to Web Part Zones
•Displayed only when in CatalogDisplayMode
DeclarativeCatalogPart
•Add Web Parts to the “Gallery” at design time
•Would have to write the “Virtual Server Gallery” functionality to pull from a
server side listing of available Web Parts
PageCatalogPart
•Similar to the “Page Gallery” in SharePoint
•Holds closed Web Parts
ImportCatalogPart
•Used to import Web Part Description Files (.webpart)
ASP.NET 2.0 Web Parts
EditorZone
•Container for EditorParts
•Allows users to configure Web Part properties
•Displayed only when in EditDisplayMode
AppearanceEditorPart
•Manage Title, Direction, Width/Height
BehaviorEditorPart
•Manage Description, Title link, icons, and behavior rules (close, edit, hide,
etc..)
LayoutEditorPart
•Manage Zone, Zone index
PropertyGridEditorPart
•Manage public Web Part properties decorated with
[Personalizable(true)]
[WebBrowsable(true)]
ASP.NET 2.0 Web Parts
ConnectionsZone
•Used to create Part-to-Part connections at Runtime
ASP.NET 2.0 Web Parts
Courtesy of Jan Tielen’s Blog: http://weblogs.asp.net/jan
Demo
ASP.NET 2.0 Web Parts
Resources
•WebPart Templates for VS2k3:
–http://www.microsoft.com/downloads/details.aspx?familyid=CAC3E0D2-BEC1494C-A74E-75936B88E3B5&displaylang=en
•Rational Guide to Building SharePoint Web Parts
–http://www.amazon.com/gp/product/0972688862
•Professional Web Parts and Custom Controls with ASP.NET 2.0
–http://www.amazon.com/gp/product/076457860X
•SharePoint Products and Technologies 2003 Software Development Kit
–http://www.microsoft.com/downloads/details.aspx?FamilyId=AA3E7FE5-DAEE4D10-980F-789B827967B0&displaylang=en
•SmartPart Resources
–http://www.gotdotnet.com/workspaces/releases/viewuploads.aspx?id=6cfaabc8db4d-41c3-8a88-3f974a7d0abe
Thanks for coming.
See you next month!