Who am Anders Rask SharePoint Solution.

Slides:



Advertisements
Similar presentations
SharePoint 2010 Web Templates What are They and How to Conquer Them Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.
Advertisements

SharePoint Feature and Solution upgrading Bram de Jager | Lead SharePoint Developer | Macaw.
Microsoft Office SharePoint Portal Server 2007 Introduction to InfoPath Forms Services Daryl L. Rudolph.
Learn the techniques to create a SharePoint 2010 web site from an existing branded web site.
Thomas Palmié Architect Microsoft Schweiz Implementierung eines mehrsprachigen Intranets basierend auf SharePoint 2010.
ALM with SharePoint 2010 and Visual Studio 2010 Paul Yuknewicz Lead Program Manager, Visual Studio
Microsoft Patterns and Practices SharePoint Guidance Robert L. Bogue MS MVP, MCSE, MCSA: Security
How to make SharePoint 2010 not look like SharePoint Branding for Developers By Matt Huber.
Visual Studio 2010 SharePoint Developer Tools. Developer Tools for SharePoint  Familiar VS Experience  Build, Debug, Deploy SharePoint projects  Visual.
SharePoint 2010 First Look: What's new for Developers in Microsoft SharePoint 2010 Matthew McDermott, MVP Aptillon, Able
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
Development models for on-premises Transformation approaches Farm solution considerations.
Developing Branding Solutions for 2013 Thomas Daly,
Microsoft SharePoint 2013 SharePoint 2013 as a Developer Platform
Microsoft ® Official Course Introducing Apps for SharePoint SharePoint Practice Microsoft SharePoint 2013.
Becky Bertram SharePoint MVP
Site Provisioning Options Web Template Fundamentals Web Templates and App Webs Custom Solutions for Site Provisioning Wrap Up.
SPC220 Web Template FundamentalsCreating Web Templates Using Web Templates Web Templates and App Webs Wrap Up.
Microsoft ® Official Course Monitoring and Troubleshooting Custom SharePoint Solutions SharePoint Practice Microsoft SharePoint 2013.
OFC308 Windows SharePoint Services (version 3) Development: Using Feature and Solution Definitions for Constructing Custom SharePoint Sites Todd C. Bleeker,
SharePoint Development 101: Feature Design By Becky Isserman
Michael Atkins. Note:  This is a non-technical overview  Some light technical background is given, to put things in context  Some of the content is.
Introduction to SharePoint Development with VS2010 Paul Yuknewicz Lead Program Manager
Windows SharePoint Services 'v3': Creating And Defining Custom Templates, Sites, Features, And Solutions Mike Ammerlaan OFF308 Program Manager Microsoft.
Larry Mead Microsoft Corp. Jon Flanders Session Code: INT203.
Create with SharePoint 2010 Jen Dodd Sr. Solutions Consultant
SharePoint 2010 and Office 2010 Development Randy Williams Senior Consultant & Trainer Synergy Corporate Technologies.
Office 365 Platform Flexible Tools Understand different provisioning options and their advantages and disadvantages…
Virtual techdays INDIA │ Nov 2010 Developing Office Biz Application using WPF on Windows 7 Sarang Datye │ Sr. Consultant, Microsoft Sridhar Poduri.
Basic Developer Knowledge That Every SharePoint Admin Must Have Randy Williams, MVP MOSS Synergy Corporate Technologies
SharePoint Workflows with Visual Studio Stuart Cox RBA Consulting techpunch.wordpress.com.
Microsoft SharePoint Server 2010 for the Microsoft ASP.NET Developer Yaroslav Pentsarskyy
HOME EVIDENCE EXECUTION MICROSOFT SOLUTIONS SERVICES PARTNERS Custom Field Controls and SharePoint Web Content Management Chakkaradeep Chandran Robert.
Upgrading Projects to Visual Studio 2010 Upgrading Projects to SharePoint 2010 Integrating with SharePoint 2010.
New & Improved Events List Relationships and Joins Large List Support Field & List Item Validation.
Office Business Applications Workshop Defining Business Process and Workflows.
Module 1: Getting Started. Introduction to.NET and the.NET Framework Exploring Visual Studio.NET Creating a Windows Application Project Overview Use Visual.
SharePoint Online – Developing Solutions for the Cloud Chris Mayo Microsoft Corporation
Artezio LLC Address: 3G Gubkina Str., suite 504, Moscow, Russia, Phone: +7 (495) Fax: +7 (495)
S HARE P OINT 2010 W EB T EMPLATES W HAT ARE T HEY AND H OW TO C ONQUER T HEM Ryan McIntyre, MCITP, MCPD Director, Portals & Collaboration Practice.
What’s New in SharePoint 2010 SharePoint 2010 Development Primer New Developer Tools for SharePoint 2010 SharePoint 2010 Integration with PowerShell.
Michael Hofer Senior Consultant Microsoft Corporation.
Connect with life Vedant Kulshreshtha Technology Solutions Professional – SharePoint | Microsoft India
Advanced Feature Development Neil Iversen Inetium
Designing Enterprise Corporate Web Sites using SharePoint 2010 Paul Stubbs Technical Evangelist Microsoft.
Microsoft ® Official Course Designing and Managing Features and Solutions Microsoft SharePoint 2013 SharePoint Practice.
Reduce, Reuse, Recycle. Housekeeping… Download EventBoard Mobile and remember to fill out session evaluations… Phasers set to stun, mobile devices set.
UNDERSTANDING YOUR OPTIONS FOR CLIENT-SIDE DEVELOPMENT IN OFFICE 365 Mark Rackley
NET Development on Microsoft SharePoint Technology Part 4: Templates, Features, and Solution Deployment Mick Badran Breeze Training Consulting Trainer.
Application Hosting and Customization Introducing Sandboxed Solutions Executing Code in the Sandbox Sandbox Resource Monitoring.
Workflow in Microsoft Office SharePoint Server Jessica Gruber Consultant Microsoft Corporation.
Entity Framework Database Connection with ASP Notes from started/getting-started-with-ef-using-mvc/creating-an-
Office 365: Attack of the Clones! Building reusable site templates with the Office 365 PnP Framework.
Software services delivering SharePoint, Mobile, and Business Intelligence solutions Understanding and implementing the remote provision pattern in SharePoint.
Supported by The new experience for developing SharePoint solutions in VS2010 Richard Fennell & James Mann from Black Marble
Joy Rathnayake Senior Architect – Virtusa Pvt. Ltd.
Reporting Services 2012 Data Alerts
Microsoft Ignite /18/ :08 AM BRK3027
What's new in the world of SharePoint development and deployment
SPC Developer 6/25/2018 © 2012 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
Migration to SharePoint 2013
SharePoint Online Development Best Practices
Developing Branding Solutions for 2013
SharePoint-Hosted Apps and JavaScript
Module 1: Getting Started
07 | Workflows Chris Johnson | SharePoint Guru
03 | Site collection and site provisioning with app model
Visual Studio 2010 SharePoint Development Tools Overview
St. Louis Day of Dot Net 2011 Building Web Parts for an Office 365 SharePoint Site Becky Bertram Independent SharePoint Consultant SharePoint MVP, MCSD.NET,
MS Confidential : SharePoint 2010 Developer Workshop (Beta1)
Presentation transcript:

Who am Anders Rask SharePoint Solution Architect, ProActive A/S Community moderator on sharepoint.stackexchange.com

Developing Custom Web Templates In Visual Studio 2010 #spsuk30

Web Templates?  Web Templates is a new site provisioning method in SharePoint 2010 that, amongst other things, can be used with MSOL since it can be deployed as a Sandboxed Solution  Relatively unknown, probably due to little attention from product group  Should be used when ever possible for branding SharePoint 2010!

 Site Templates  Site Definitions  Feature Stapling  Provisioning Providers  WebProvisioned event  Web Templates Template Provisioning methods

Site Templates  A ”light” version of Web Templates.  (Most) sites can be saved as template  In SP2010 they are WSP solutions (not STP files)  Can be imported into Visual Studio to become ”real” Web Templates

Custom Site Definitions  Defacto way of customizing SharePoint in SP2007  Many opinions on how (and if) to use them  Best Practice to keep site def’s slim (get ID and use feature stapling)  That means no modules in ONET.XML and as few features as possible

Feature Stapling  Makes it possible to associate (staple) functionality to existing site definitions when site is being provisioned " TemplateName="BLANKINTERNET#0" />  Can also have feature properties  Scope is usually Farm, but can also be WebApp or Site  To associate to all templates (except Blank) use Global

Provisioning Providers  ”Hotwires” site provisioning, by only creating site collection and database, but not apply template  In code you then apply any template, and then apply any logic  Example: Activate features, restrict sub-templates, create subsites, set security, create groups, add web parts... class MeetingWorkspaceProvisioningProvider : SPWebProvisioningProvider { public override void Provision(SPWebProvisioningProperties properties) { SPWeb site = properties.Web; string xmlPath = properties.Data; // provision Blank Meeting Template site.ApplyWebTemplate("MPS#1"); // do something potentially useful here } class MeetingWorkspaceProvisioningProvider : SPWebProvisioningProvider { public override void Provision(SPWebProvisioningProperties properties) { SPWeb site = properties.Web; string xmlPath = properties.Data; // provision Blank Meeting Template site.ApplyWebTemplate("MPS#1"); // do something potentially useful here }

WebProvisioned event receiver  Gives you a hook into the provisioning process to execute arbitrary code.  Event is asynchronous (but a good idea to set to Synchronous to avoid race conditions)  Receiver can have Site or Web scope  Site: called for every sub-site created in the site collection  Web: called only for the sub-sites that are immediate children of the site where receiver is called  Usage example: set Theme on sub-sites, add web parts... etc public override void WebProvisioned(SPWebEventProperties properties) { ThmxTheme theme = ThmxTheme.Open(properties.Web.Site, ThmxTheme.GetThemeUrlForWeb(properties.Web.ParentWeb)); theme.ApplyTo(properties.Web, false); properties.Web.Update(); base.WebProvisioned(properties); } public override void WebProvisioned(SPWebEventProperties properties) { ThmxTheme theme = ThmxTheme.Open(properties.Web.Site, ThmxTheme.GetThemeUrlForWeb(properties.Web.ParentWeb)); theme.ApplyTo(properties.Web, false); properties.Web.Update(); base.WebProvisioned(properties); }

Web Templates  Created in Visual Studio as Element  No direct tool support yet, but not much to it…  Custom ONET is injected instead of referenced site definition, so no link to provisioned sites  Scope can be Site (Sandboxed Solution) or Farm (Trusted solution)  Supports publishing framework

 Use the right tool for the job  Often a combination is the right solution.  The customizations you want to do often dictates approach.  Use Web Templates whenever possible! What provisioning method is right? ”It Depends!”

Time for… DEMO!

Common ”gotcha’s” creating Web Templates  Since stapling is not supported, be aware that features that would normally be stapled on an OOB site definition must be activated manually (e.g. Taxonomyfield feature)  Web Template and the element it resides in must have same name  If your Web Template has site scoped features, you must ensure these are activated when using template on sub-webs  When provisioning sub-webs with PowerShell using Sandboxed Solutions you need to provision in two steps: 1) Create web, 2) Apply template Known issues:  Doesn’t work with variations and content publishing  Subweb and Locale doesn’t work!  Bug if OS regional settings and installed language isn’t the same and provisioning “outside of UI” (Visual Studio or PowerShell)  “Race conditions” with Content Type provisioning (CT hub)

Good Web Template practices  Save the custom template name in a property bag on the SPWeb for future reference  Ensure your site scoped features for example by calling them from web feature in ONET.XML  Use Visual Studio –not save Site as Template- to create Web Templates  Check what features are normally stapled to the OOB site definition you are mimicking and add them last at appropriate scope in ONET.XML

Key take-aways  Web templates is just a new way of provisioning sites in SharePoint 2010  Prefer them over Site Definitions 99% of the time:  B2B upgrades is easy (no link to manifest)  V2V upgrades will be easier  Works on SharePoint Online  Scope is either Site (Sandbox) or Farm (Trusted) solutions  Does not work with Site Variations, Content Publishing or similar sites where template selection is out of your control (think Meeting templates, My Sites etc)

Mirjam van Olst: Using Web Templates to create Site Collections Supported and unsupported scenarios for working with custom site definitions Vesa Juvonen: SharePoint 2010 and web templates Robert Bogue: Understanding SharePoint Branding Options Brian Wilson: Site Definitions versus Site Templates and deciding on the correct customization approach New Event Binding Functionality in SharePoint Foundation References

Thanks for attending session! Thanx for attending! See you at

 Visual Studio 2010 SharePoint Power Tools Templates and extensions that provide a sandboxed Visual Web Part together with enhanced support for sandboxed compilation to help you develop SharePoint solutions even more productively.  Mavention Cancel Adding SharePoint Project Items Disables the default behavior of automatically adding SharePoint Project Items to Features.  CKS - Development Tools Edition (Server) The SharePoint 2010 Visual Studio 2010 Extensions project (CKSDEV) is a collection of Visual Studio templates, Server Explorer extensions and tools providing accelerated SharePoint 2010 development based on Microsoft's new SharePoint 2010 development tools.  Imtech Get SPMetal Definition Extension Installs a Site Node Extension that allows you to generate the SPMetal Definition from the given SharePoint Site.