Based on a WebPartManagerTracks which Web Parts have been added to each particular zoneStores and retrieves data about how each Web Part has been customized and personalizedThe Web Part chrome is responsible for rendering common properties and styles as well as menu and administration user interface elements
SharePoint Programming Basic
SHAREPOINT PROGRAMMINGPART1: BASIC SHAREPOINT PROGRAMMING USING VSEWSS V1.3 Nguyen Ba Quang email@example.com http://basquang.spaces.live.com
Agenda SharePoint 2007 (MOSS) overview Programming in SharePoint
Office SharePoint Server 2007:Key Investments Server-based spreadsheets plus Next generation e-mail, project BI portals built on SQL Server management, workflow, blog Analysis Services and wiki support Business Intelligence Collaboration Server-based forms and Windows Enhanced SharePoint Portalworkflow with smart client Business SharePoint Portal aggregation and personalization and browser interfaces Processes Services Content Management Search Integrated document, records and Great relevance Web content management with rich people and business data search Unified ASP.NET 2.0 workspace foundation for scalability and extensibility
Business Process ManagementSupport for XML standardsBrowser-based formsDesign-once development model Business Process ManagementForm-Import wizardMultiple form views
Business IntelligenceWeb access to published spreadsheetsProgrammatic access to published spreadsheetsBusiness Data CatalogDashboards Business IntelligenceReport Center Web sites
Programming in SharePoint Introduction to SharePoint Developer tool V9.0 (VSeWSS) Programming Tasks SharePoint Object Model Programming CAML query and LINQ to SharePoint Hello VSeWSS with Simple WebPart Features Application Pages and Site Pages Lists and Event Handler
SharePoint Developer tool Download from Microsoft website Support for VS 2008 New templates and deployment tools Easy to development Easy to deployment
SharePoint Object Model Managed code OM on the server Accessible via ASP.NET or any process Implemented in C# Exposes almost of all of the data stored in WSS
SharePoint OM Demo Simple Console Application Create, Update, Read, Delete List Item Simple Web Application
CAML Query Collaborative Application Markup Language XML based query language
CAML can be used… Provide schema definition to the Web site provisioning system about how the site looks and acts. Define views and forms for data and page rendering or execution. Act as a rendering language that performs functions in the DLL like pulling a value from a particular field. Provide batch functionality for posting multiple commands to the server using protocol.
CAML Demo Using CAML query building tool Query SharePoint data using CAML query
LINQ to SharePoint LINQ to SharePoint now support from Microsoft Using LINQ syntax Query SharePoint data without write any makeup code Reduce line of code
Features Overview Features? A means to extend the functionality of MOSS 2007 A feature can include various elements Event handlers, custom Menu items… Encapsulate WSS functionality for ease of distribution and deployment Feature scope Farm, Web Application, Site (site collection),Web (web site) Add or remove a feature Install/uninstall Activate/deactivate The 04 corresponding events can be trapped and handled
Element Type Scope DescriptionContent Type Site Contains a schema definition you can reuse and apply to multiple list definitions. Content type binding enables you to provision a content type on a list defined in the onet.xml schema.Content Type Binding Site Lists defined in the onet.xml schema cannot be modified directly. Farm, A delegate control contains a registration for a well-known control installed on a Web page. This letsControl WebApplication, you replace existing controls, such as the Windows SharePoint Services search control, with another Site, Web control. You can define the following kinds of custom actions: Farm, • Content type links for the content type settings pageCustom Action WebApplication, • Drop-down menu actions for the drop-down menu that appears for an item Site, Web • Form toolbar buttons for New, Edit, or Display form toolbars. • Site Settings link for the Site Settings page. Farm,Custom Action Group WebApplication, Defines a group of custom actions. Site, Web Contains the definition of a document converter. A document converter is a custom executable file thatDocument Converter WebApplication takes a document of one file type, and generates a copy of that file in another file type. Farm,Feature/Site Template Association WebApplication, Binds a feature to a site definition or template so that created sites are provisioned with the feature. SiteField Site Contains a field definition that can be reused among multiple lists. Farm,Hide Custom Action WebApplication, Hides a custom action that has been added through another custom action. Site, WebList Instance Site, Web Provisions a SharePoint site with a specific list of data.List Template Site, Web Contains a list definition or template, which defines a list that can be provisioned in a SharePoint site.Module Site, Web Contains a set of files with which to provision sites.Receiver Web Contains an item event receiver registration.Workflow Site Contains the definition for a workflow in a list.
Features Overview A feature has a subfolder within the Features setup directory Feature.XML: defines the base properties of the Feature lists elements bound to it XML element manifest Supporting files (.aspx, .htm, .xsn, .resx, .dll…) Feature.XML Element manifest XML file(s)
Application/Site Pages Application Pages Like settings.aspx Do not support customization Can access from any site Always compiled into a DLL Place under _layouts folder Site Pages Like default.aspx, page.aspx… Support customization Content customized store in database
Application/Site Pages Demo Application Page using ASP.Net 3.5 Site Pages
SharePoint List Collaborative data in SharePoint Defined based on an XML-defined schema Heart of the core WSS architecture
List Type DescriptionDocument library Used for collaborating on documents with support for versioning, check-in and check-out, and workflow. Includes support for deep integration with Microsoft Office.Form library Used to store XML documents and forms for use with Microsoft Office InfoPath.Wiki page library Used for collaborative Web pages based on wiki pages, which are dynamically generated and collaboratively edited Web pages.Picture library A specialized document library enhanced for use with pictures. Includes support for slide shows, thumbnails, and simple editing through Microsoft Office Picture Manager.Announcements Used for simple sharing of timely news with support for expiration.Contacts A list for tracking people and contact information, with support for integration into Microsoft Office Outlook and other WSS-compatible contacts applications.Discussions A simple list for threaded discussions with support for approval and managing discussion threads.Links A list for managing hyperlinks.Calendar A list for tracking upcoming events and deadlines. Includes support for integration and synchronization with Office Outlook.Tasks A list of activity-based items that can integrate with workflow.Project tasks An enhanced tasks list with support for Gannt chart rendering and integration with Microsoft Office Project.Issue tracking A list for tracking issues and resolution, with support for prioritization.Custom list An empty list definition for extending with custom columns, or created using Microsoft Office Excel spreadsheets.
Event Receivers Developer-extensibility mechanism to add behaviors to lists, list items Typically used: Perform data validation. Ensure data integrity Kick off custom business processing Two categories Before events: fires before an action has been completed After events: fires after an action has been completed