Case Study: Upgrading SLFE from 2007 to 2010Shai Petel ([email protected])VP R&D, Microsoft Certified TrainerKWizCom Corporation
Content
Building a new solutionUpgrading an existing solutionVersion management
Goals
In this session you will learn about the new VS2010 extensions for WSS
You will learn how to migrate your existing solutions into the new environment reducing the migration process time to minimum.
This session will allow you to make better decisions on your current solutions for 2007 today that will make the transition to 2010 easy and simple.
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Building a New Solution Before you begin…
Is your team ready for 2010?Silverlight, Ajax, JSONVisual web parts! (or is it?)
Prepare to be hosted!Limit customization to site collection levelPrefer to support sandboxed solutions*
Building a New Solution Before you begin…
Creating a new web part?
Inherit from ASP.NET!
• SharePoint web parts are still supported for backwards compatibility
• Do not change base for existing web parts!!!
Building a New SolutionBefore you begin…
Before you begin… you will need to set up your development environment:
• Visual studio 2010 + VSeWSS• SharePoint Designer
Choose your development environment setup
• Install in one• Client / server• Virtualize! (recommended).
Building a New Solution Before you begin…
Install all components on developer machine
Pros Cons
Performance
Slower Hardware
Developer
control
Isolated
Easy to mess up
Hard to backup
Win7/Win2k8
64bit
Building a New Solution Before you begin…
Install developer components on development client and use remote debugger to connect to development server (not so bad, but still…)
Pros Cons
Runtime
Slower
computers
Hard to mess up
the server
Easy to backup
No control on
farm
Not isolated
Building a New Solution Before you begin…
Virtualize! (Recommended) Pros Cons
Restore
Backup,
duplicate,
portable!
Developer full
control on farm
Isolated
Strong computer
Win7 or Win2k8
64bit only
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Building a New SolutionCreating a new solution
Open VS2010
Building a New SolutionCreating a new solution
Click on new project. Go to:C# -> SharePoint -> 2010
templates
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Building a New SolutionChoose a project template
There are a lot of new project templates to choose from!
But fear not – You can easily add any component to any project later
Introducing
Visual Web Part
Building a New SolutionChoose a project template – Visual web part
This project template cannot be sandboxed
Building a New SolutionChoose a project template – Visual web part
Project created with all web part files for you
Building a New SolutionChoose a project template – Visual web part
A feature will be created for you automatically
Building a New SolutionChoose a project template – Visual web part
A package will be created for you automatically
Building a New SolutionChoose a project template – Event receiver
This project template can be sandboxed
Building a New SolutionChoose a project template – Event receiver“Create
project” Wizard
New types of receiver
s
New events
to handle!
Building a New SolutionChoose a project template – Event receiver
Adds all needed files for you
Introducing
Business Data Catalogue Tools
Building a New SolutionChoose a project template – Business Data Catalogue Model
This project template can be sandboxed
Building a New SolutionChoose a project template – Business Data Catalogue Model
BCS editing tools
Building a New SolutionChoose a project template – Business Data Catalogue Model
Packaged and deployed as a farm level feature
Building a New SolutionChoose a project template – Content type
This project template can be sandboxed
Building a New SolutionChoose a project template – Content type“Create
content type”
Wizard
More work
needed on the wizard though
…
Building a New SolutionChoose a project template – List definition
This project template cannot be sandboxed
Building a New SolutionChoose a project template – Content type“Create
List Def.”
Wizard
Building a New SolutionChoose a project template – Content typeSchema
File
Create Elements file
for featureOptiona
l: Create
list instance XML
Building a New SolutionChoose a project template – Content typePackaged and deployed as a web
feature
Building a New SolutionChoose a project template – Workflow
This project template cannot be sandboxed
Building a New SolutionChoose a project template – Workflow
Sequential workflow is designed to execute a series of predefined steps to accomplish a certain taskState machine workflows are designed to work in event-driven scenarios. A state machine workflow contains two or more states, with one state being the active state at any given time
Building a New SolutionChoose a project template – Workflow
“State machine” wizard
Choose history
and tasks lists.* Also
choose a list if you selected
a list workflow
type
Workflow initiation options
Building a New SolutionChoose a project template – Workflow
Designer has different options for site and list workflows
Building a New SolutionChoose a project template – Workflow
Add sequential workflow, with its own designer
Building a New SolutionChoose a project template – Workflow
Creates separate elements file for each workflow
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Introducing
Your very own sandbox!
Building a New SolutionSetup trust level
Choose your destiny
Building a New SolutionSetup trust level
To trust, or not to trust?Sandbox solutions is a way for you to deploy a set of features and components to your SharePoint site collection that will have no effect on other site collectionsSandbox solutions have limited support for extensibility and not all SharePoint customizations are allowedSandboxed solutions can be installed and deployed by site owner from site settings
Building a New SolutionSetup trust level
What does this setting change?This setting does not get written to WSP package, but will allow VS to validate your content is supported within a sandboxes solutionSolution assemblies within a sandboxed solution are not installed to GAC/Bin, and not running on W3WP process. Instead they run under SPUCWorkerProcessSandboxed solutions can be deployed as a full-trusted solution as well
Building a New SolutionSetup trust level
What is supported within a sandbox solution?
List Definitions, List Instances, Content Types/FieldsWeb Parts (non visual)Event receivers: Item, List or WebDeclarative workflows, Custom Actions (Ribbon)Onet.xml, WebTemplate feature element (instead of Webtemp.xml) allows for site collection level site definitions!More…
Building a New SolutionSetup trust level
What is not supported within a sandbox solution?
Mapped folders (14 hive)Some API will not work in sandboxed modeVisual Web PartsApplication PagesCustom Action GroupHideCustomAction elementWeb Application/Farm-scoped featuresWorkflows with code
Building a New SolutionSetup trust level
How do I deploy a sandbox solution?
Upload to Solutions gallery
Activate
Building a New SolutionSetup trust level
Cannot activate solution?
Go to central administration and make sure windows SharePoint user code service is started
Building a New SolutionSetup trust level
Keep in mind:Deploying a sandbox solution automatically activates features within (unless specifically specified not to in the feature)To disable support for sandbox solutions simply stop the user code serviceUpgrading sandbox solutions are done manually site collection at a time
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Building a New SolutionAdding new components
It is extremely easy to add any component to any project you likeThis allows you to easily create more complex solutions that includes several types of customizations such as:
Feature – for activationWeb parts – for visual UILists and list definitions for storing dataField types, event handlers, workflows and much more!
Building a New SolutionAdding new components
Add mapped folder
Building a New SolutionAdding new components
Add other components
Content
Building a new solutionCreating a new solutionChoose a project templateSetup trust levelAdding new componentsOne-click deploy or package
Upgrading an existing solutionVersion management
Building a New SolutionOne-click deploy or package
Feature and Package editors available
Building a New SolutionOne-click deploy or package
Project menu allows you to build, deploy to development server, and to package using a WSP
Build – compile code onlyPackage – compiles and builds the WSP packageDeploy – compile, package anddeploy the packageRetract – removes the solutionpackage from server
Content
Building a new solutionUpgrading an existing solution
Upgrading a non-VSeWSS solutionUpgrading a 2005/2008 VSeWSS solutionUpgrading a WSP package
Version management
Upgrading an Existing SolutionUpgrading an existing solutionGeneral upgrading concerns• Old API (Microsoft.SharePoint.dll)• New API (Microsoft.SharePoint.Linq.dll,
Microsoft.SharePoint.Client.dll, Microsoft.SharePoint.Taxonomy.dll )
What’s new?• New technologies available: Silverlight, AJAX, JSON• New UI: Ribbon, pop ups
Important! Tips for safer upgrade• Keep the same namespaces and assembly evidence• Keep elements GUID (Features, List/Site Definitions, Etc.)• Existing web parts – Keep same base class!
Content
Building a new solutionUpgrading an existing solution
Upgrading a non-VSeWSS solutionUpgrading a 2005/2008 VSeWSS solutionUpgrading a WSP package
Version management
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
Case study: Upgrading KWizCom SharePoint List Forms ExtensionsWhat we had in 2007:
controltemplates ASCX files. New control templates and updating existing ones*Application settings pagesList settings linkFeature activated, MSI installerExternal references to utilities/shared resources
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
SLFE version 1.*.*
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
What we added in 2010:
List settings ribbon buttonsAdd CSS file using DelegateWSP packaging
SLFE Project
Live demo of SLFE in Visual Studio
demo
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
2010 New UIRibbon (resizable)Using image store filesand CSS class
SLFE Solution
Live demo of SLFE in SharePoint
demo
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
ConclusionIn order to make the most of VS2010 and VS2010 extensions for WSS its best to build a new project skeleton and import existing code into it.If you already have a WSP package you can use it to build your project skeleton from it (reverse engineer) but your .NET code will not be included!
Upgrading an Existing SolutionUpgrading a non-VSeWSS solution
Open VS2010 and Create empty project
Build the skeleton of the project
Set namespace and assembly evidence to the same as in your pre-upgrade
Manually import your code to the new project
Estimated time: 1 hour to 4 hours of 1 developer to have the solution ready for packaging.
Steps for upgrading a project
Content
Building a new solutionUpgrading an existing solution
Upgrading a non-VSeWSS solutionUpgrading a 2005/2008 VSeWSS solutionUpgrading a WSP package
Version management
Upgrading an Existing SolutionUpgrading a 2005/2008 VSeWSS solutionUnfortunately, you cannot convert
VS2005/2008 projects using visual studio aloneTrying to do so will invoke this error:“The project type is not supported by this installation.”
Upgrading an Existing SolutionUpgrading a 2005/2008 VSeWSS solutionBut fear not! VSeWSS2010 comes with
a conversion tool from VSeWSS2008 only.
For all other projects that used WSP for deployment - This next option might be what you are looking for!
Content
Building a new solutionUpgrading an existing solution
Upgrading a non-VSeWSS solutionUpgrading a 2005/2008 VSeWSS solutionUpgrading a WSP package
Version management
Upgrading an Existing SolutionUpgrading a WSP package
If you have a WSP packaged solution, you can import it into 2010!
Upgrading an Existing SolutionUpgrading a WSP package
Import wizard
Your code doesnot get
imported!
Upgrading an Existing SolutionUpgrading a WSP package
The import process will build your skeleton for you
After the import is done, some work is needed
SLFE Solution
Importing WSP package
demo
Content
Building a new solutionUpgrading an existing solutionVersion management
How can I mark versionsShared resourcesUpgrade / downgrade solution version
Version ManagementVersion management
Why do we need version management?
Tractability of bugs or changesPerform upgrade operations on existing installations (add a field, create hidden list etc.)Monitor Dev, Staging and production deployment running code
Not for ISV only!In house development team? Get used to working with versioned packages!
Content
Building a new solutionUpgrading an existing solutionVersion management
How can I mark versionsShared resourcesUpgrade / downgrade solution version
Version ManagementHow can I mark versions
Cannot change assembly version!Currently no supportfor marking package,but you can markfeatures:
Mark versionnumber in yourcode:
Content
Building a new solutionUpgrading an existing solutionVersion management
How can I mark versionsShared resourcesUpgrade / downgrade solution version
Version ManagementShared resources
You may need to add shared resources to your projects
DLL’s (utility classes, base classes)Sandbox – no problemGAC – no problemBIN deployment – version collisions may occur.
Shared resources (Images/CSS files)Use sub folders with utilities version number.For example:/_layouts/KWizCom_Shared_2.0.01
Content
Building a new solutionUpgrading an existing solutionVersion management
How can I mark versionsShared resourcesUpgrade / downgrade solution version
Version ManagementUpgrade / downgrade solution version
Built in support for upgrade operations!SharePoint will allow mark if feature requires upgradeMany upgrade operations supported, and custom upgrade handlers can be coded
Version ManagementUpgrade / downgrade solution version
Upgrading / downgrading is easy!Once you deploy several versions of same solution you will be able to upgrade instead of activate!
Content
Building a new solutionUpgrading an existing solutionVersion management
Summary
You now have real-world experience in upgrading components into 2010
There is a lot more to see
Come visit us at our booth to get the complete presentation and for 1 on 1 talks!
Overall, It’s been a pleasure!
Contact Us
For more information on SharePoint 2010 please don’t hesitate to contact us!
• At our booth out side• Email: [email protected]• Online: http://www.kwizcom.com• Blog: http://kwizcom.blogspot.com
* Learn * Plan * Deploy * Build *
Call to learn how KWizCom can assist you!
Remember to fill out your evaluations on MySPC for your
chance to win two HD web cams and a designer mouse
(3 prizes awarded daily)
Learn More about SharePoint 2010
Information forIT Prosat TechNet
http://MSSharePointITPro.com
Information forDevelopers
at MSDNhttp://MSSharePointDeveloper.com
Information forEveryone
http://SharePoint.Microsoft.com
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.