<<

SharePoint Development[TITLE] for ASP.Net Developers

Tarek Bohsali [PRESENTATIONAGENDA TITLE ] [PRESENTATION TITLE] • SharePoint Basics • Packaging and Deployment • Common Artifacts • Remote Applications • Demo • Visual Web Parts • List Definitions • Event Receivers • Client Object Model

WHY SHAREPOINT?

.NET SharePoint

Data Storage Data Storage

Presentation Presentation

Security Security

Clustering Clustering

API‟s API‟s

Office Integration Office Integration

Features Features SHAREPOINT TERMINOLOGY Layout Page Timer Job Elevated Privileges Web Part Farm CAML Content Type Safe Control Site Column Declarative Workflow STSADM Feature Site CollectionPersisted Object Application Page Site Definition Solution Package Scope Content DatabaseEvent Receiver Central List Definition Publishing PageWeb ApplicationAdministrationTheme ONET List Instance List View Feature Receiver Team Site Field Control Client Object Model SHAREPOINT ARCHITECTURE [PRESENTATIONSERVER TITLE FARMS] [PRESENTATION TITLE] • A collection of SharePoint role servers and a Server Farm SQL database server • Servers can perform one or more functions Web Front Ends (web front end, search, application, etc.) • Farm-level features are managed via Central Administration • Custom code can be deployed at the Farm level and managed centrally Application • Solution Packages allow custom code to be automatically deployed across the farm

Database [PRESENTATIONWEB APPLICATIONS TITLE] AND SITE COLLECTIONS [PRESENTATION TITLE] • Web application = IIS Virtual Server • Each web application may be assigned its own app pool • Web applications may utilize multiple service applications • Site collections reside within web applications • Site collection functionality derived from underlying site definition • Special site collection types include My Sites, Shared Services Provider, Publishing Web

[PRESENTATIONSOLUTION TITLE PACKAGES] [PRESENTATION TITLE] • Solution Packages are “bundles” of functionality deployed to the farm or site collection (sandbox) • May contain one or more Features, assemblies, pages, controls, and other artifacts • SharePoint framework handles installation and Web Parts Assemblies configuration of solution items automatically across entire farm Mapped • Automated packaging and deployment in Visual Folders Studio 2010

WSP [PRESENTATIONSANDBOX TITLE SOLUTIONS] [PRESENTATION TITLE]

• Trusted solutions which run in isolated process • Load balanced execution

• Uploaded to solution directory in site collection MyWebPart.dll Runtime • Administratively controlled via quotas • Can be automatically disabled • Subset of OM functionality Full Object Subset Object Model Model • Ability to use trusted proxy for restricted operations Proxy

[PRESENTATIONFEATURES TITLE ] [PRESENTATION TITLE] • A „Feature‟ is a defined set of functionality Solution encapsulated within a specific format • Features are the basic building block of WSS v3 and MOSS development • Features may be comprised of any combination of Feature code, including web parts, workflows, and site definitions • Features may be deployed manually or automatically on a local or global basis XML • Features are heavily dependent on CAML Project Item

Receiver Web Part Template Workflow Assembly

[PRESENTATIONWEB PARTS TITLE] [PRESENTATION TITLE] • Web Parts are a specific type of server control that inherit from System.Web.UI.WebPart Page • Web Parts contain discreet functionality that is exposed to the user in the context of a Web Part Page • Classic Web Parts do not have an IDE; Visual Web Parts host ASP.NET User Controls • Web Parts execute in the context of the current user Form

• Web Parts may be deployed individually or in Web Part conjunction with other artifacts Manager

Web Part

Controls

[PRESENTATIONLIST ELEMENTS, TITLE] TYPES AND VIEWS [PRESENTATION TITLE] • Lists are virtual data repositories for unstructured content • Fields defined by associated content types and user-defined columns • Common lists types included OOTB • Custom list types may be created in UI or code • List data is stored in the content database associated with the site collection • Maximum limit for list items is 30M+ • Be aware of performance implications and throttling when storing/retrieving large amounts of list data • Lists have associated views defined in UI or CAML • Custom field types may be created programmatically [PRESENTATIONEVENT RECEIVERS TITLE] [PRESENTATION TITLE] • Event Receivers are handler assemblies that respond to events on specific objects (Webs, Lists, Features, etc.) • Event receivers override built-in methods: • Adding/Added • Updating/Updated • Activated/Deactivated Content • Installing/Uninstalling Database • Event Receivers have no UI or user feedback mechanism • Event Receivers must run with Full Trust in the GAC

[PRESENTATIONRELATIONAL TITLE] DATA [PRESENTATION TITLE]

• LINQ to SharePoint var q = from announcement in dc.announcements where announcement.Expires >= DateTime.Today select new { announcement.Title, announcement.Body }; • CAML joins

[PRESENTATIONWORKFLOW TITLE] [PRESENTATION TITLE] • 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

[PRESENTATIONWEB SERVICES TITLE] [PRESENTATION TITLE] • SharePoint Web Services provide remote access to a number of Object 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 • Custom web services should be deployed as WCF solutions • Can increase load on Web Front End Servers • Deploy isolated WFE if used heavily [PRESENTATIONREST TITLE] [PRESENTATION TITLE] • HTTP-based XML data transfer • Stateless, cacheable, uniform • Conforms to Atom Publishing Protocol • Direct integration with SharePoint Services (Excel) and Lists • Sample queries: • http://myserver/_vti_bin/listdata.svc • http://myserver/_vti_bin/Ex celRest.aspx/Docs/Docum ents/sampleWorkbook.xlsx /model/Ranges('Sheet1!A1 |G5') [PRESENTATIONCLIENT OBJECT TITLE] MODEL [PRESENTATION TITLE] • Subset of server OM Browser functionality JavaScript • .NET, Silverlight, Controls JavaScript Server • Sync and Async JavaScript OM Object Model processing Proxy • Request throttling Client Service • Batch object handling Proxy

Managed OM Content Database

Managed Controls

Client Server