Welcome to my blog on all things SharePoint. I have a range of articles that will interest you if you've made it as far as visiting my blog. I was awarded as an SharePoint MVP by Microsoft in July 2010. I currently live in New York and am an Enterprise Architect at AvePoint Inc.. I co founded www.NothingButSharePoint.com with Mark Miller in 2010.

MVP AwardJeremy Thake Profile Photo

Whitepapers

NBSP

Check out my articles on NothingButSharePoint.com

Solution Development in SharePoint 2007

This series was inspired by the chatter amongst SharePoint blogs on the best ways to approach customisations in SharePoint using Solutions.

Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6 - Part 7 - Part 8

Leveraging the SharePoint Platform

This series was inspired by a discussion had with Andrew Coates at a Perth SharePoint User Group meeting. This then turned into a 6 part series on Arno Nell's SharePointMagazine.net web site.

Initial post - Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6

Webcasts

I have recorded various web casts that I present at User Groups or just on a specific topic by request:
How ASP.NET Developers can leverage SharePoint webcast
SPSource Webcast: Reverse engineer Lists to ListTemplates and much more
SharePoint Development with Unit Testing webcast
Perth SharePoint UG Web Cast on approaches to deploying artefacts (SPSource)
More...


Podcasts

I have been interviewed about Leveraging the SharePoint Platform by the SharePoint Pod Show: listen here .

RSS Feed Feed your read!

Archives

January 2012 (5)
September 2011 (2)
August 2011 (1)
July 2011 (3)
June 2011 (7)
May 2011 (3)
April 2011 (3)
March 2011 (3)
February 2011 (2)
January 2011 (1)
December 2010 (4)
September 2010 (4)
July 2010 (5)
June 2010 (4)
May 2010 (6)
April 2010 (7)
March 2010 (5)
February 2010 (7)
January 2010 (3)
December 2009 (1)
November 2009 (6)
October 2009 (9)
September 2009 (7)
August 2009 (6)
July 2009 (13)
June 2009 (4)
May 2009 (12)
April 2009 (4)
March 2009 (4)
February 2009 (13)
January 2009 (4)
December 2008 (4)
November 2008 (11)
October 2008 (16)
September 2008 (4)
August 2008 (5)
July 2008 (4)
June 2008 (8)
May 2008 (5)
April 2008 (9)
March 2008 (5)
February 2008 (6)
January 2008 (1)
November 2007 (11)
October 2007 (8)
September 2007 (24)
August 2007 (5)
July 2007 (2)
May 2007 (1)
April 2007 (1)
March 2007 (1)
February 2007 (3)
January 2007 (4)
November 2006 (7)
October 2006 (7)
September 2006 (18)
August 2006 (14)
June 2006 (3)
May 2006 (8)
April 2006 (4)
March 2006 (38)
February 2006 (30)
January 2006 (2)
December 2005 (3)
November 2005 (28)
May 2005 (1)
April 2005 (5)
March 2005 (1)
November 2004 (1)
August 2004 (11)
July 2004 (1)
Failed to render control: An error occurred during a call to extension function 'createMonthUrl'. See InnerException for a complete description of the error.

Links

Tag Cloud

Ajax, Apple, DotNetNuke, Enterprise Content Management, Error Resolution, Gadgets, General, Governance, Microsoft .Net Development, Mobile, SharePoint, Sharepoint Business Forms, Sharepoint Business Intelligence, Sharepoint Collaboration, SharePoint Development, Sharepoint Enterprise Content Management, Sharepoint Enterprise Search, Sharepoint Portal, US Migration, Web 2.0, Workflow

Solution Development in SharePoint 2007   

Tags: SharePoint
Technorati Tags:

Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6 - Part 7 - Part 8

I was scouring over my feed reader this morning and came across this post on the MSDN forums asking:

"Any one please give me a step by step implementation of deploying a SharePoint application...(Modifying the SharePoint website content and deploying it to the SharePoint server)?"

Now, all platforms are tricky when it comes to development and deploying. I've worked with Interwoven, BEA and numerous other "Enterprise Level" platforms. I took some time to think how I would answer this guy entering this space.

I currently training a graduate programmer with no C#, ASP.NET or SharePoint experience from scratch and it has been a great experience for both of us. It's solidified my understanding of the platform and also challenged him to come up to speed and get as much out of the training as possible. He's come a long way in a short time, and this has a lot to do with me having already spent a lot of time overcoming the hurdles in the first few instances.

SharePoint's biggest problem is that it is so damn easy to be an Owner of a SharePoint Site (or Web if you're in the API) and go nuts creating SharePoint Lists, Content Types, Fields all from within the browser interfaces. Then give them SharePoint Designer and watch them go nuts with creating Workflows, Pages, Page Layouts, Style Sheets, Master Pages, Images etc. - I could go on. The problem with all this is that if all this is done in Development environment ... how do you deploy it to UAT and then through to Production?

Methods of deployment

    • Great for releasing v1.0, but will overwrite entire site if you release v2.0 so not a solution unless you copy items across and delete old site and rename new one to existing.
  • Solution Package
      • Solution Generator
      • VS Projects
      • Couldn't live without it for quick redeployments of solution packages and auto generation of ddf and wsp files!
      • Seems to have a current limitation to one Solution per project, but that's no big deal.
    • WSPBuilder
      • Alternative to STSDEV. Autogenerates manifests, ddf and wsp.
      • Great for grabbing ContentType and Custom Field schema xml – needs some modifying to get it to actually work but most is just removing bits
      • The only way to script BDC without going insane!
  • Third Party Product
      • Great for comparing and deploying Content from Site to Site (see backup/restore above)

Cleaning up

The biggest problem with all of these techniques is that this will get you from one environment to the other, but SharePoint's paradigm is that whatever is deployed and activated by default will not be removed when deactivated. So if you have a <ListInstance> element in your manifest in your solution package, if you deactivate the feature it WILL NOT delete this instance. You can add code into your Feature Event Receiver code behind which adds further complexities and duplication (interestingly Content Types do this OOTB).

Iterative Development

I've been putting together a Document Management solution on top of SharePoint (yes that's right folks, SharePoint isn't a Enterprise Document Management system without some development so please don't fall into that trap). I've built various Content Types (with Document Templates and Document Information Panels), Custom Fields Types and Custom Fields with all sorts of inheritance and furthermore created ListTemplate's to package instances up.

One thing I have found even in development is that deploying new versions of your scripted Solution packages is not straight forward. An example of this is typically you don't sit there and churn up your manifest file and schema files for all your lists and he-presto it all works first go when you deploy the solution – so you work iteratively one thing at a time to make finding the cause of the vague errors easier.

Versioning

If you have scripted up your ContentType up and deploy this once and it's all happy, then go back and add further elements to your manifest and some tweaks to your ContentType and "redeploy" this again (deactivate, delete, add, activate). You will notice that these changes are not taken on IF the ContentType was in use in a SharePoint List. So biggest hint, is when developing and deploying new versions...make sure you have full clean up scripts...otherwise you'll end up in a mess!

Change Sets

The other concern around this is obviously you can't simply clean up what's in your Production environment when you want to release the next version of your application. This seems to be the big show stopper for our team to date...what do you do? As motioned above you can:

  1. create a copy of the existing site,
  2. deactivate the feature which cleans everything up
  3. reactivate it with the new version of the Feature
  4. copy all the SharePoint List Items from old Site version to new Site version
    1. remembering that to get the metadata, versioning, security etc. you'll need to use API scripting OR a third party tool such as echoTechnology.

This obviously has serious overheads if you have an enormous site with say 20 lists with 2000 odd Items in each list and various versions. It also requires scripting the migration for every deployment to Production.

A simpler solution would be to do an incremental update to objects, a scenario for this would be adding a Workflow to a Content Type or switching on Versioning in a SharePoint List. So possibly you go towards scripting change sets and having new Features to move from each change sets. This in itself can get messy...I'm not even sure that SharePoint will be manageable with thousands of Features available in the Site Features collection. Then you find yourself permanently coding change set differences, rather than automatically generating schemas etc. using Solution Generator.

Continuous Integration

Before moving into the SharePoint development space I was a ASP.NET/WinForms C# developer. We were really into our VSTS Team development with Builder Server projects. Moving into a SharePoint environment where build servers really are making all this above seem incredibly more scary also needs to be resolved. It's not just being able to deploy one Solution Feature package to a build server, but also to have multiple interdependent ones to prove they all sing happily in tune together. A great example of this is ListTemplate Type IDs.

Nice to haves

  1. Further explanation of the uses of the Version Id in the Feature file and Solution File.
  2. The ability when defining objects in the solution manifest to have an attribute that states whether on deactivation that it is "undeployed" e.g. ListInstances
  3. A way of pointing at an entire Site and clicking a button and creating a whole Solution package similar to what STSDEV does but all for you.
  4. An interface to visually see the schema changes made for every operation done in the browser interface – this would be a great way to learn what's going on in the code!
  5. The ability to publish InfoPath forms via Solution package rather than directly in stsadm
  6. The ability to activate Features from within Feature files e.g. for standard things like Publishing Feature etc.
    1. <RANT> try finding out what Feature ID it is by scouring through 12 hive FEATURE folder feature.xml files...they left the Feature name to an existing name (most likely for backwards compatibility) but changed the Title the user sees in the interface and there's no easy way to guess what's what!</RANT>
  7. A Script engine which will generate a DIFF script for moving between one version of a Solution Feature package to another.
  8. Some more sample Solution packages for common things:
    1. Custom Field Types, Custom Fields, Content Types, SharePoint List
    2. Workflow (Content Types)
    3. Master Pages, Style Sheets, Images
    4. Navigation
    5. InfoPath Form Libraries, Content Types, InfoPath forms
  9. A solution for generating build scripts to test solutions and their interdependencies.
  10. Some simple ways of populating lists with test data intelligently by inspecting the List columns
  11. The ability to have VSeWSS in Visual Studio 2008 and on a 64 bit machine!
    1. Intellisense in VS2008 on Schema, Manifest, Feature and Solution files.

Talk in the paddock

There is a lot going on around this subject at the moment:

  • MSDN has come a long way since it first came out in November 2006, but there is still a long way to go. Re-skinning aside, it's gotten better. One tip, use Google to find anything on the site ;-)
  • Glenn Block over at CodePlex has a survey he's put together to collect other people's opinions on what are the big issues about development. The Questionnaire is a bit rigid and I think this is because he expected more people to answer, I think more open questions and some time processing these at the end may have got better results.
  • WCM Guru, Andrew Connell, has put some notes together around developing solutions too.
  • The SharePoint Team Blog has some great articles on it too.
  • ThorProjects got me thinking along these lines also
  • Joel Olsen also just posted on another product that packages up deployments.
  • Bill Simser has some radical thinking about using Nant with SharePoint
  • Bill Baer also does a good job of explaining Solution packages
  • Paul Andrew is also pushing the campaign to get ASP.NET devs to SharePoint devs.
  • Joris Poelmans also has a good post on getting started with Web Parts
  • Sahil Malik has some great articles around this also
  • Paul Culmsee has a good set of articles that use WSP Builder

"Do It and stop whinging Jeremy!"

Yes, and it has crossed my mind to start writing some of these things I've mentioned above...the problem is that I'm concerned that my efforts in spending so much time will be wasted when Microsoft release vNext of the development tools or vNext of the platform itself which makes my solution outdated. This again, comes back to Microsoft not keeping all their cards to their chest in terms of the direction they're going in. Fair play to echoTechnologies for taking the punt, risk and investment to come up with a product.

Next steps

I hope people find this informative and I hope I'm not the only one in the same boat...please feel free to leave comments and get a bit of a debate going!

Anyway, keep your eyes peeled as I'll be writing a series of posts now showing how to use these tools and best approaches...

 
Posted by  Jeremy Thake  on  5/26/2008
15  Comments  |  Trackback Url  | 63  Links to this post | Bookmark this post with:        
 

Comments


Ryan  commented on  Monday, May 26, 2008  7:56 AM 
Great work. Thanks Jeremy.


Sezai Komur  commented on  Monday, May 26, 2008  8:07 AM 
Excellent write up!

Especially the points on upgrading customisations on existing sites. Proper managed development with versioning and change sets is tough work and takes time.

At least over time development tools and resources are getting better for SharePoint developers, things have improved since the start of 2007.


Aaron Saikovski  commented on  Monday, May 26, 2008  8:01 PM 
Great post!
Hopefully people read this and follow the practices you outline.


Waldek Mastykarz  commented on  Monday, May 26, 2008  10:22 PM 
Nice aricle and definitely a great set of resources, Jeremy. Just like you have mentioned there is a lot going on about structured and repeatable deployment in SharePoint. Unfortunately, deploying the configuration remains a challenge. I have covered my approach to it on my blog (http://blog.mastykarz.nl/2008/05/06/structured-and-repeatable-configuration-deployment-in-sharepoint-2007-the-imtech-way/). Still, I'd rather have it supported by SharePoint self than leave it as a partner opportunity.


Martin Hinshelwood  commented on  Tuesday, May 27, 2008  3:43 AM 
If you are familiar with this I would be thankfull if you could look at my Solution for http://codeplex.com/mosstom

In it I am taking multiple features, multiple projects and compiling a WSP using WSP Builder and thenloading it into an MSI for install...

Martin


Paul Culmsee  commented on  Tuesday, May 27, 2008  8:41 AM 
Mate, great summary and I will be eagerly looking forward to the deep dive into this. You have hit on a topic area that needs some serious attention and really got me thinking...


  commented on  Monday, June 09, 2008  11:30 AM 


Craig  commented on  Tuesday, June 10, 2008  6:21 AM 
Great post. I certainly feel your pain, infact, working with SharePoint feels like utter agony sometimes.


Clint Simon  commented on  Sunday, July 27, 2008  10:53 PM 
Thanks for this Jeremy! I think this is a very important topic for custom application developers who are getting started with the SharePoint platform. I wanted to mention an alternate solution called SPDeploy.

SPDeploy solves this problem very well and is widely used and accepted. SPDeploy is a client side tool that extends MSBuild to include targets that allow you to create a SharePoint solution file (.wsp) from a standard C# class library project inside Visual Studio. SPDeploy includes a visual studio project template that is specifically designed to support SharePoint customizations. SPDeploy also allows you to deploy your compiled wsp file to a remote SharePoint server. This means that you can develop locally and deploy to remote SharePoint server, all directly from Visual Studio.

As a bonus SPDeploy generates both the ddf file and manifest.xml dynamically from the files that exist in your project. You can add files to under the SharePoint 12 hive, then those files are automatically included in the wsp file and deployed.

Read more here: http://code.google.com/p/rapid-tools/wiki/SPDeploy

Download here: http://rapid-tools.googlecode.com






sanjay  commented on  Monday, August 18, 2008  11:54 PM 
Do you have the posts for tools and best approaches?


  commented on  Wednesday, February 18, 2009  10:26 PM 


Neo  commented on  Thursday, April 02, 2009  8:14 AM 
I've been thinking to publish an step by step guide, I did it for the first part here :
http://www.sharepointsolutions.ir/blogs/farvashan/en/Lists/Posts/Post.aspx?ID=2

I would like to find some time for publishing the rest, your posts are really useful.


  commented on  Monday, June 22, 2009  6:45 PM 


Mobile based Embedded software’s  commented on  Thursday, September 24, 2009  10:42 PM 
Good post, but have you thought about Solution Development in SharePoint before?


Tyre  commented on  Thursday, November 12, 2009  3:00 AM 
Good post, but have you thought about Solution Development in SharePoint before?

blog comments powered by Disqus