Upload
kwizcom-team
View
1.044
Download
0
Tags:
Embed Size (px)
Citation preview
Philadelphia SharePoint Community• SharePoint (2010 & 2007)
• Administrators
• Developers
• Architect Council after every meeting
• Free Training before every meeting
• www.TriStateSharePoint.com [coming in December]
• Hosted blogs for members
• Community Forums
• Exclusive content / pre-release content
• Meeting recordings
• Free training
• www.officegeeks.org/philly [until December]
CONTACT: [email protected]
TWITTER: @tristateSP
• Scheduled Speakers• Todd Bleeker• Rob Bogue• Eric Shupps• John Holliday• Ben Curry• Asif Rehmani• Paul Schaeflein• Brett Lonsdale• Nick Swan• (and more)
• Topics• Upgrade to 2010• SharePoint 2010 Development • No-Code Workflows• Client object model• Records Management• Business Connectivity Services• Sandbox Solutions• SharePoint Tools in Visual Studio 2010• Social Media• List Enhancements• Workflows• Database and Infrastructure
Case Study: Upgrading SLFE from 2007 to 2010
Shai Petel ([email protected])VP R&D, Microsoft Certified Trainer
KWizCom Corporation
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 solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version management
Building a New Solution Before you begin…
• Is your team ready for 2010?– Silverlight, Ajax, JSON– Visual web parts! (or is it?)
• Prepare to be hosted!– Limit customization to site collection level– Prefer to support sandboxed solutions*
Building a New Solution Before you begin…
• SharePoint web parts are still supported for backwards compatibility• Do not change base for existing web parts!!!
Creating a new web part?
Inherit from ASP.NET!
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 solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version management
Building a New SolutionCreating a new solution
Click on new project. Go to:C# -> SharePoint -> 2010 templates
Content• Building a new solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version 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
Building a New SolutionChoose template: visual web part
Project created with all web part files for you
Building a New SolutionChoose template: visual web part
A feature will be created for you automatically
Building a New SolutionChoose template: visual web part
A package will be created for you automatically
Building a New SolutionChoose template: event receiver
“Create project” Wizard
New types of receivers
New events to handle!
Building a New SolutionChoose template: content type
“Create content type”
Wizard
More work needed on the wizard though…
Building a New SolutionChoose template: content type
Schema File
Create Elements
file for feature
Optional: Create list instance
XML
Building a New SolutionChoose template: workflow
• Sequential workflow is designed to execute a series of predefined steps to accomplish a certain task
• State 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 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 template: workflow
Designer has different options for site and list workflows
Content• Building a new solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version management
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 collections
– Sandbox solutions have limited support for extensibility and not all SharePoint customizations are allowed
– Sandboxed 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 solution
– Solution assemblies within a sandboxed solution are not installed to GAC/Bin, and not running on W3WP process. Instead they run under SPUCWorkerProcess
– Sandboxed 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/Fields– Web Parts (non visual)– Event receivers: Item, List or Web– Declarative 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 mode– Visual Web Parts– Application Pages– Custom Action Group– HideCustomAction element– Web Application/Farm-scoped features– Workflows 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 service
– Upgrading sandbox solutions are done manually site collection at a time
Content• Building a new solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version management
Building a New SolutionAdding new components
• It is extremely easy to add any component to any project you like
• This allows you to easily create more complex solutions that includes several types of customizations such as:– Feature – for activation– Web parts – for visual UI– Lists and list definitions for storing data– Field types, event handlers, workflows and much more!
Content• Building a new solution
– Creating a new solution– Choose a project template– Setup trust level– Adding new components– One-click deploy or package
• Upgrading an existing solution• Version management
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 only– Package = compiles and builds the WSP package– Deploy = compile, package and
deploy the package (customizable!)– Retract = removes the solution
package from server
Content
• Building a new solution• Upgrading an existing solution
– Upgrading a non-VSeWSS solution– Upgrading a 2005/2008 VSeWSS
solution– Upgrading a WSP package
• Version management
Upgrading an Existing SolutionUpgrading an existing solution
General 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 solution• Upgrading an existing solution
– Upgrading a non-VSeWSS solution– Upgrading a 2005/2008 VSeWSS
solution– Upgrading a WSP package
• Version management
Upgrading an Existing SolutionUpgrading non-VSeWSS solution
• Case study: Upgrading KWizCom SharePoint List Forms Extensions
• What we had in 2007:– controltemplates ASCX files. New control templates
and updating existing ones*– Application settings pages– List settings link– Feature activated, MSI installer– External references to utilities/shared resources
Upgrading an Existing SolutionUpgrading non-VSeWSS solution
• What we added in 2010:– List settings ribbon buttons– Add CSS file using Delegate– WSP packaging
Upgrading an Existing SolutionUpgrading non-VSeWSS solution
• 2010 New UI– Ribbon (resizable)– Using image store files
and CSS class
Upgrading an Existing SolutionUpgrading non-VSeWSS solution
• Conclusion– In 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 non-VSeWSS solution
Open VS2010 and Create empty project
Re-set namespace and assembly evidence
Manually import your code to the new project
Estimated ~1 hour to 4 hours of 1 developer to have the solution ready for packaging.
Steps for upgrading a project
Content
• Building a new solution• Upgrading an existing solution
– Upgrading a non-VSeWSS solution– Upgrading a 2005/2008 VSeWSS
solution– Upgrading a WSP package
• Version management
Upgrading an Existing SolutionUpgrading 2005/2008 VSeWSS
• Unfortunately, you cannot convert VS2005/2008 projects using visual studio alone
• Trying to do so will invoke this error:“The project type is not supported by this installation.”
Upgrading an Existing SolutionUpgrading 2005/2008 VSeWSS
• But fear not! VSeWSS2010 comes with a conversion tool (VSeWSS 2008 only).
• For all other projects that used WSP for deployment - This next option might be what you are looking for!
Content
• Building a new solution• Upgrading an existing solution
– Upgrading a non-VSeWSS solution– Upgrading a 2005/2008 VSeWSS
solution– Upgrading 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
• The import process will build your skeleton for you
• After the import is done, some work is needed
Content
• Building a new solution• Upgrading an existing solution• Version management
– How can I mark versions– Shared resources– Upgrade / downgrade solution version
Version ManagementVersion management
• Why do we need version management?– Tractability of bugs or changes– Perform 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 solution• Upgrading an existing solution• Version management
– How can I mark versions– Shared resources– Upgrade / downgrade solution version
Version ManagementHow can I mark versions
• Cannot change assembly version!• Currently no support
for marking package,but you can markfeatures:
• Mark versionnumber in yourcode:
Content
• Building a new solution• Upgrading an existing solution• Version management
– How can I mark versions– Shared resources– Upgrade / downgrade solution version
Version ManagementShared resources
• You may need to add shared resources to your projects– DLL’s (utility classes, base classes)
• Sandbox – no problem• GAC – no problem• BIN 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 solution• Upgrading an existing solution• Version management
– How can I mark versions– Shared resources– Upgrade / downgrade solution version
Version ManagementUp/downgrade solution version
• Built in support for upgrade operations!• SharePoint will allow mark if feature
requires upgrade• Many upgrade operations supported, and
custom upgrade handlers can be coded
Version ManagementUp/downgrade solution version
• Upgrading / downgrading is easy!
• Once you deploy several versions of same solution you will be able to upgrade instead of activate!
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 for more information and for 1 on 1 talks!
Overall, It’s been a pleasure!
Contact UsFor 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!
Learn More about SharePoint 2010
Information forIT Prosat TechNet
http://MSSharePointITPro.com
Information forDevelopers
at MSDNhttp://MSSharePointDeveloper.com
Information forEveryone
http://SharePoint.Microsoft.com
KWizCom
Contact:Shai Petel ([email protected])
VP R&D, Microsoft Certified TrainerKWizCom Corporation