Friday, October 23, 2009

[SPC09] Upgrading SharePoint 2007 Code to SharePoint 2010

This was my last session at the SharePoint Conference 2009 in Las Vegas. Tomorrow I fly back to the real world :-( At least, I splashed up a little at the Mandalay Bay Beach Wave Pool.

This session was very instructive, too. It versed about how to migrate existing SharePoint 2007 code and projects into SharePoint 2010 world. The presenter was a New Zealand guy called Chris JT Auld, from Intergen Limited. Here are my notes on that:

Upgrading existing VSeWSS projects

 

VS2010 template (a .VSIX file) allow import VSEWSS 1.1 and after into VS2010. It recreates the project structure only. You should do some refactoring around the solution structure, as VSEWSS had a 1:1 feature-artifact relation. New Feature Designer is more flexible that the VSEWSS, it now allows you to have more artifacts in a single feature.

 

There are several issues that may arise:

  • STP files are not supported anymore. You will have to vreate V3 site, upgrade to V4, fix issues and then save as template into WSP
  • UI Changes: the backwards-compatible UI (no ribbon, no in-place wiki edits, no interactive calendars). There are now "versioned controls" that are aware of the version-specific content. The UIVersionControl has an UIVersion attribute, and the version-specific content will honor the correct version and be shown. It allows to supress the rendering of a version-specific markup.
  • CSS has changed completely. Any customizations on CSS or master pages  will have to be redone. The new UI is fully XHTML and WCAG 2.0 AA level compliant.
  • No more toolbars in the new UI. All the custom toolbar actions go to "Custom commands" on the Ribbon
  • Actions with codebehind code are not migrated automatically, they will have to be redone.
  • Queries that return large number of results may fail. You might have to adjust the thresholds through the Central Application and catch the exception in the code and treat it. The limit applies only to the non-admin users, so tests should be done with a non-admin user. An index on the queries columns should be made to ensure that all items should not be scanned when executing the query. The query limit override can be done by code but it has to be allowed by the administrator.

 

Upgrading custom code for SharePoint

 

Any code that runs in IIS should need no recompilation. The code that runs in the Timer Service must be recompiled.  The code outside SharePoint will have to be recompiled or redirected using bindingAssembly declarations.

 

Many APIs have been deprecated. In most cases it will give you a warning during the recompilation but it should work. Examples: SPFarm.Create now uses SPFarm.Create(passphrase), SPVirtualServer is deprecated by SPWebApplication. A Reflector add-in will be made by Chris to scan an assembly for deprecated code.

 

Any hard-coded path to "12" hive must now point to the new "14" hive.

 

There have been numerous improvements in the WSP solution upgrade process:

  • BindingRedirects are now supported in the manifest file
  • Features can be upgraded declaratively and programmatically
  • You can query the farm (QueryFeatures method) to see what features are there and which version are they, so they can be upgraded by code (SPFeature.Upgrade method). The version range element in Feature.xml allows for upgrading from multiple versions.
  • STSADM command for solution upgrade (upgradesolution) is also available. For more granular upgrade, object model will have to be used.
  • In the object model, there's a FeatureUpgrading event where to add the upgrade code. Be careful to check for the right version-dependant upgrade action to be called.
  • To upgrade the feature for new instances, ,use STSADM -upgradesolution. For upgrading the instances already created , psconfig cmd  upgrade -inplace -b2b command should be run.
  • Sandboxed solutions can be upgraded by uploading a new versions and choosing "Upgrade" from the UI.

 

 

A complete whitepaper was released on Monday, called "Redeploying Customizations and Solutions in SharePoint Foundation 2010 and SharePoint Server 2010". It's avaliable on http://msdn.microsoft.com/en-us/library/ee662217%28office.14%29.aspx

Thursday, October 22, 2009

[SPC09] Driving End User Adoption

This session was dear to my heart, as the end-user adoption is really a tough thing to achieve. The session was presented by Scott Jamison of Jornata.

Here are my notes on the session:

  • Users don't "have" to use SharePoint to get their job done
  • Cultural changes (such as a SharePoint solution) take 18-36 months to stick

It's essential to have an adoption plan

  • That increase perceived value for the users
  • That increase users' skills and confidence
  • Should have progression from clueless to skeptic to productive to advocate

Take the "What's in it for me?" factor into account

  • Connect SharePoint to business goals
  • Elegant solution: don't make them go through five screens

Must-have elements in the adoption strategy

  • Communication Plan
    • Leverage power users and champions
    • Send CEO/HR/VP Memos
    • Prepare "Town Hall" meetings
    • Put Break Room posters
      • On WC backdoors ;-)
    • Prepare Scavenger Hunt (the pieces to find are on SharePoint: a concrete document, a user's favorite color) with small rewards (20-50 $)
    • Put "birth" announcements cards of a new portal on the desk
    • Keep continuous communication
  • Training Plan
    • Not only for developers or IT staff
    • But also Power users, visitors, members, content contributors, workflow approvers
    • "just in time" and "just enough" training
  • Content Conversion Plan
    • Three approaches
      • Clean and migrate everything
      • Migrate nothing, index old content, new content in new system
      • Clean and migrate recent content only
    • Don't migrate without cleaning!!
  • User Support Plan
    • Contact person for every page (with pictures and contact info). There's no global webmaster.
    • Form internal site owner user groups to help each other
    • IT Help Desk should prepare for more questions
    • Capture end-user feedback: with metrics or anecdotes (find a user that likes the solution and show him to the others)
    • Have some end-user resources ready (guides, help...)
  • Incentives and Reward Plan
    • Answer "What's in it for me" factor showing the usefulness of something with real data
    • Make it fun (posters, scavenger hunt...)
    • Provide recognitions for the content contribution users
    • Invest in information architecture to ensure fantastic user experience

Must Have Resources (free)

SharePoint Buzz Kit from Microsoft (will be updated for SharePoint 2010)
http://sharepoint.microsoft.com/rampup/sharepoint/Pages/buzzkit.aspx

SharePoint Training Kit (will be updated for SharePoint 2010)
http://www.microsoft.com/downloads/details.aspx?FamilyId=7BB3A2A3-6A9F-49F4-84E8-FF3FB71046DF&displaylang=en

Productivity Hub
http://www.microsoft.com/downloads/details.aspx?familyid=277fefca-d62f-41bc-943d-79002254cfee&displaylang=en

Get the Point Blog
http://sharepoint.microsoft.com/blogs/GetThePoint/default.aspx

Summary

  • Adoption won't happen by chance
  • Have a plan (better, have many plans)
  • Use the resources, lot of them are free

Wednesday, October 21, 2009

SharePoint Server 2010 Overview Available for Download

On Microsoft TechNet:
http://download.microsoft.com/download/8/C/6/8C65AC6A-C09A-4E47-B2AD-0719EAA062F9/EvaluateSharePointServer2010-IT%20Pro_v4.docx

It’s very comprehensive and outlines all the features that SharePoint Server 2010 includes.

[SPC09] Document Management Improvements

On this second day of SharePoint Conference in Las Vegas, I attended two sessions that were specific on document management improvements in SharePoint 2010:

  • “Growing SharePoint From Small Libraries to Large Scale Repositories and Archives” by Adam Harmetz (Microsoft)
  • “Document Management Deep Dive” by Ryan Duguid (Microsoft)

The main takeaways from these two session are these:

  • There are new SharePoint features that make it easier to manage and apply metadata to the content:
    • Unique Document Numbering
    • Metadata Service for centralized management of content types and metadata
    • Tagging and Rating
    • Taxonomy navigation based on the current metadata
  • There are also improvements on the file record / archive features, too:
    • Multiple “Send To” locations
    • Automatic routing of the documents, based on the metadata
    • Automatic document obsoletization and archiving

There are 4 main approaches on how to use these settings in Document Management, depending on the scale of the document repository that we need:

 

Document management approach

Number of documents stored

How SharePoint 2010 helps

Ad Hoc Team Library

Up to 200 documents

Focus on easy and lightweight features, while the metadata are centralized.

 

Content types are now centralized into Metadata Service, across the site collection boundary.

Taxonomy can be used in columns and is hierarchical and multi-lingual.

Default values for columns at document library level can be set. This allows document library to automatically populate the values of the content type that’s shared across the organization.

Managed Keywords are suggested as you are typing.

The tags are now surfaced in the “Save document” shell window.

The tags appear in tag cloud for the site. The tags can be further drilled down, subscribed to and filtered. Tag security: only private and public tags are covered.

Managed Library

Hundreds to thousands

More structured than the ad hoc library. (Document Center). The system should help the user to use and create metadata.

 

Unique document IDs for the enterprise can be generated. You can get the document by the ID using a “Get Document by ID” web part.

Metadata navigation can be used as a "virtual" folder structure. You can still use the static folders. Key Filters can be used to further slice the navigation result set. These settings are defined on the document library settings.

 

The taxonomy is defined by each user, but the structure is centralized. Metadata can be centrally managed or user-managed (“folksonomy”).

 

Document archiving can now be done directly in the library.

Repository / Archive

Millions to tens of millions

There should be a best-practice team that manages the metadata for the repository.

 

The users submit documents (finished ones) for broad consumption. The end users don't even know what are they looking for. For instance, a Knowledge Management Repository.

 

Content type and metadata classification is essential.  Additional filters are now indexed in the background, as compound indexes in SQL Server). 

 

The metadata navigation results are now shown in batches (and announced to the user), so not to hamper the performance when navigating huge archives. Furthermore, the navigation results are cached across users.

 

Search can be contextual to the navigation results. (very cool feature)

 

Content Organizer settings: content can be sent to the archive manually, by the workflow, uploaded etc. The document can be routed to the corresponding folder by Content Organizer component. Folders can be used to set permissions on a larger basis. The retention policy is also bound to the folder.

 

Content Query Web Part (CQWP) is now suited for document library results. The demo shows "Suzie recommends" and "Newest added biographies" CQWP results.

Massive, Distributed Archive

Hundreds of millions of documents

The documents are added automatically. High-volume back-end systems are involved instead of the end user. Logical organization and hierarchy are a key.

 

Content Organizer can route content to correct site collection in the archive. Content Type Syndication enables central management of distributed archive. FAST search is used to retrieve content.

 

 

There are several back-end optimizations that make these scale-out scenarios easier: database reorganization, compound indexing, remote BLOB storage in SQL Server 2008, per-item throughput maximization.

Office 2010 can interrogate SharePoint Metadata Service in background, which allows the user to create new document based on the latest content type document templates.

Word Automation Services are also available to automatize Office document conversion (into PDF, XPS and so on), printing and document composition.

SharePoint 2010: The New Pie Chart

image

Tuesday, October 20, 2009

[SPC09] SharePoint 2010 Administration Improvements

This afternoon, the sessions I attended were about SharePoint Administration improvements. The sessions (Part 1 and Part 2) were delivered by the comic duo made by Shane Young and Todd Klindt. They demonstrated the new shiny tools and features that will ease the life of a SharePoint Administrator.

New hierarchy containment objects:

  • Services (in a way of a modularized SSP: metadata service, search, profiles…)
  • Service applications
  • Service application databases (a LOT of them will be created by default)
  • Services can be linked to specific site collections ("multi-tenancy")

Requirements

  • Windows Server 2008 SP2 or later or Windows Server 2008 R2
  • SQL Server 2005 SP2 / SQL Server 2008 SP1 CU2 or later
  • “Geneva” Framework
  • Sync Framework
  • There's a prerequisite installer that will install the missing pieces

Install Process

  • Farm Passphrase, the master password to recreate the security key. It removes the dependency on the install account
  • GPO policies can restrict where can SharePoint be installed

  • Configuration Wizard (like SharePoint 2007 Setup has)
    • "14" hive instead of “12”
  • Farm Configuration
    • New wizard In Central Administration
    • It performs the common Farm configuration
    • Pops up on first Central Administration run
    • Gotcha: the browser must have Central Administration set to trusted zone
  • 4 GB limit in Basic Install (no more unlimited internal database :-( )

Managed Accounts

  • Manage password changes according to your AD policies
  • Automatic password changes performed by SharePoint

Other stuff

  • SharePoint 2010 is mirror-aware and failover-aware, you have to specify the failover SQL server
  • Claims Providers (Geneva Framework) now allow more than one authentication provider per web application

PowerShell

  • Default tool for administration
  • SharePoint Management Shell link or SharePoint Snap-in
  • Faster than STSADM (it doesn't unload from memory)

Backup and Restore

  • Farm backups are the same format as before, but they can make configuration-only backup and use multiple threads
  • Granular Backup is now supported for Site collections, webs and lists
  • Recover data from and unattached content database (the URL dropdown is broken but works)

Throttling

  • The performance is monitored and the users are kept from "shooting themselves in the foot"
    • No more 2000 items limit, now it’s 50 million items
    • The output is throttled in order not to overload the server
    • Can be overriden by Object Model, but the Admins can disable the override
    • “Happy Hour” Settings (Daily Time Windows for Large Queries): you can program when the result limit trimming is disabled
    • Admins and Users have different settings for throttling
    • HTTP Requests are monitored and 503 errors (Server busy) are launched for GET requests and timer jobs (PUT requests are still allowed)
      • Launched by 3 indicator peaks over limit
  • Developer Dashboard
    • It can be used to monitor page load and performance
    • It can be activated on demand

Logging

  • ULS logs now accept correlation ID for a specific request (shown at Developer Dashboard) and can trace a whole request from the beginning to the end
  • Event Log flood protection: it removes the duplicated error messages in Event Log (triggered by default when it’s repeated  times in a row)
  • “Set to default” option for ULS logging settings. The new UI shows the non-default settings in bold.
  • Logging can be exported to SQL Logging database (the schema will publicly be announced by MS)
  • Log Space can be restricted so not to overrun the disk space

Best Practices Analyzer

  • Health Rules that run periodically, integrated into SharePoint Central Administration
  • These rules are extensible
  • These rules can automatically repair some rule violations

Timer Jobs

  • Server Affinity: you can specify which server will run which timer job
  • “Run on demand” command
  • Progress bar for timer jobs
  • Report for the jobs that executed (with error messages and run details)

Patching and Upgrade

  • You can now have servers and database at different patch level
  • Database can be at lower version than the binaries that you have installed
  • Lowers the downtime of the farm

[SPC09] Overview of the SharePoint 2010 Development Platform

This session was delivered by Paul Andrews, Microsoft Technical Product Manager for SharePoint. It was really “techie” stuff, but summarized enough to squeeze into 75 minutes.

Here are my notes from the session:

Developer Productivity Improvements

  • SharePoint 2010 now runs on Windows 7 or Windows Vista SP1 (in 64 bits, standalone install only)
  • Visual Studio 2010 (Beta 2 now available for download) enhances development on SharePoint 2010
    • WSP packages import and export
    • Server Explorer now shows SharePoint artifacts
    • Full TFS Integration
    • Web Part, Business Data Connectivity entities and Workflow designer
    • Extensible, you can add your custom artifacts
    • Visual Web Part designer creates ASCX control that's loaded into the web part
    • LINQ-to-Sharepoint is now supported
      • SPMetal tool creates the LINQ entities from SharePoint lists
  • SharePoint Designer 2010 (still free)
    • Tool to create BDC entities, list schemas, custom actions, task and approval forms
    • Improved page editor and workflow designer
    • “Save Site as Template” action now saves into a WSP that you can import into VS2010
  • Developer Dashboard
    • Quick debug or page performance monitor
    • Has to be enabled with STSADM tool
    • Shows the detailed ASP.NET and back-end operations (event the SQL queries in full)
  • Web parts can be inserted into page content (it uses a hidden WebPartZone controls)

Platform Services Improvements

  • Business Connectivity Services (the new BDC)
    • Read/Write access to the LOB data
    • Available in SharePoint Foundation (new WSS name), too
    • BDC Entity Designer in VS2010
    • The data are surfaced as External Content Type in SharePoint list templates
    • Monitored by Service Applications option in Central Admin
  • List Improvements
    • Cascaded and Block Relationships in SharePoint lists (really good news)
    • Validation and uniqueness check on the list edit form
    • Lookup to multiple columns
    • Large lists are now possible (but you must limit the view elements)
    • CAML in views is now replaced by XSLT (CAML is still used for queries)
  • Data Retrieval
    • REST APIs
      • Built on ADO.NET Data Services
      • Visual Studio Data Source wizard now supports SharePoint as a data source
    • Client Object Model
      • ExecuteQuery() method must be called explicitly
      • Batched for performance reasons
      • Available from for NET, Silverlight and JavaScript CLR
    • LINQ with list joins and field projections without schema changes
  • Events
    • There are now event templates in VS2010
    • After-synchronous events (like the –ing events in SharePoint 2007 but for the –ed events)
    • New events such as workflow events or list creation events
    • Custom error pages for event validation errors
  • Workflows
    • There are now “Reusable declarative workflows” available (no code)
    • Site workflows (not bound to a list, they show in the Site Actions menu)
    • High privilege workflows (as opposed to normal user permission-limited workflows)
    • Pluggable WF services (can be triggered by external events)
    • VS2010 can make workflow form UI with code-behind
  • Service Applications
    • Improvement upon SSPs
    • Built on WCF
    • Sits on the Application Server machines
  • UI Ribbon and Dialog Framework
    • Status bar beneath the ribbon
    • Notification Area (balloon, like the GMail “Loading” notification)
    • Dialog box (in AJAX and JavaScript)

Deployment Improvements

  • Sandboxed Solutions
    • Balance between agility and stability
    • Limited API access, separated process and monitored resources
    • Uploaded into site Solution Gallery (in Site Settings)
    • SPUCWorkerProcess.exe executes the code, in proxy fashion
    • If too many resources have been consumed, the solution is shut down
    • There's a job that monitors the resource usage and shows it in the gallery
    • It will be used in SharePoint 2010 Online
  • Upgrade
    • Assembly Redirects for 2007 DLLs, so they will be running without recompilation
    • Upgrade mappings (not really clear on this one)
    • Feature upgrades with code
    • Visual Upgrade for SharePoint 2007 sites, on demand

I can’t wait to try these new improvements on my own!!! However, we will still have to wait until November to get our hands on the Beta version binaries.

DSC_0026
List Throttling for large lists

DSC_0027 
MOSS 2007 in SP2010, without running Visual Upgrade