Life, the universe and whatever

Something to say about most things

Archive for the month “May, 2009”

VSeWSS v1.3 and source control

I have recently looked into using the Visual Studio extensions for Windows SharePoint Services (VSeWSS) that are currently at release version 1.3.  I evaluated the initial releases a couple of years ago and was completely underwhelmed; it was very buggy, very restrictive and, as far as my clients were concerned, I had to recommend an alternative approach to structuring Visual Studio solutions for deploying SharePoint solutions.  A few months ago I was challenged on this point by another experienced SharePoint development consultant and after reviewing Kirk Evans’ series of articles and webcasts I downloaded the March 2009 CTP and set about recreating a few existing solutions using the extensions.  I am very impressed with how far the extensions have advanced since those early releases and they are now supported by the Feedback and Feature Requests forum on MSDN.

The extensions are obviously a work-in-progress but my concerns lay with the upgrade path to Visual Studio 2010 and the indicated/anticipated increase in the level of integration for SharePoint as a development platform.  However, I quickly discovered there is an issue with the extensions when it comes to source control because the feature.xml files are dynamically generated.  This is all well and good except that there is no chance that the standard, minimal settings generated will be sufficient for a production release; the project assembly name is used for the feature title (I think), there is no description, the version number is always 1.0.0.0, the list goes on.  Using the WSP View it is possible to open feature.xml files and make any necessary updates but the problem is the extensions store the physical files in a sub-directory of the project named pkg.  When another developer opens the project from source control the pkg sub folder is not included and it is therefore auto-generated when they first package or deploy the solution. 

Richard Slater is one of many people who have already raised the issue of source control for VSeWSS 1.3 solutions.  As per the MSDN article How to: Create an Automated Build and Deployment Solution with Team Foundation Server Team Build (taken from the SharePoint Guidance on Codeplex) the recommended approach is to add the pkg folder to source control;

To permit team development, you must add this folder to the source control repository. This makes any WSP structure customizations that one developer performs available to the other developers on the team.

The guidance also says;

…the Setup.bat file must be placed under source control so that a build process can use these files to generate a .wsp file and deploy it.

Whether I am automating the build process or not, when the .wsp file is the output to a client I also want this under source control.

Okay, so it seems that we have everything we need in source control for team development and although it doesn’t exactly feel quite right we can live with it because we know this is a work-in-progress and an interim solution before we can get our hands on Visual Studio 2010.  Is it robust enough?  I’m not 100% convinced but I’ve now committed some current projects to the setup so time will tell and if I find more issues then I will report them to the Feedback and Feature Requests forum and blog them here.

Update: I should also have mentioned that when version 1.3 of the extensions is installed a help file is deployed to “[drive_letter]:\Program Files\Microsoft SharePoint Developer Tools 9.0\VSeWSS13.CHM”.  The “Application Lifecycle Management with VSeWSS” chapter should be considered essential reading when using the extensions and there is a section entitled “Source Control using TFS” which details a good demonstration of adding the necessary files and folders to source control.

Technorati Tags: ,,
 

SharePoint unit testing

My last post about ASP.NET unit testing was prompted by the offer that the guys at TypeMock were making for free licences to their new ASP.NET bundle.  I noticed that fellow SharePoint developer and all round top man Chris White was far quicker off the mark than I was!  Rather notably Andrew Woodward has joined the league of SharePoint bloggers willing to spread the word even though (like myself) I know Andrew is a fully licensed user already.  The reason for this?  In accordance with the spirit of my earlier SharePoint as a development platform post there has been a groundswell of activity by Microsoft and leading 3rd party development tools suppliers to support the platform.

If I get a free TypeMock license I will happily donate it as a prize for the 2nd Annual SUGUK Golf Day on 23 July at Ullesthorpe Court.  With any luck, Agile development and unit testing will be on the agenda for the evening user group meeting.

ASP.NET unit testing

Unit Testing ASP.NET? ASP.NET unit testing has never been this easy.
Typemock is launching a new product for ASP.NET developers – the ASP.NET Bundle – and for the launch will be giving out FREE licenses to bloggers and their readers.
The ASP.NET Bundle is the ultimate ASP.NET unit testing solution, and offers both Typemock Isolator, a unit test tool and Ivonna, the Isolator add-on for ASP.NET unit testing, for a bargain price.
Typemock Isolator is a leading .NET unit testing tool (C# and VB.NET) for many ‘hard to test’ technologies such as SharePoint, ASP.NET, MVC, WCF, WPF, Silverlight and more. Note that for unit testing Silverlight there is an open source Isolator add-on called SilverUnit.
The first 60 bloggers who will blog this text in their blog and tell us about it, will get a Free Isolator ASP.NET Bundle license (Typemock Isolator + Ivonna). If you post this in an ASP.NET dedicated blog, you’ll get a license automatically (even if more than 60 submit) during the first week of this announcement.
Also 8 bloggers will get an additional 2 licenses (each) to give away to their readers / friends.
Go ahead, click the following link for more information on how to get your free license.

Technorati Tags: ,

SharePoint as a development platform

Any developer who has interacted with SharePoint in any way, shape or form will surely have asked themselves the question, asked someone else the question or read or partook in at least one of the many debates that have raged over the years.  For me the question “is SharePoint a good development platform?” is pointlessly provocative so I would rather ask “can SharePoint be a good development platform?”.  Instead of giving my own answer to that question I will quote Kirk Evans reflecting on a 6 part series of articles and screen casts he authored entitled SharePoint for Developers:

This series has been building up to an application that provides the ability for an end user to pause a video (rendered through a Silverlight media player) and capture annotations about the video at a particular time segment.  You can imagine that, in a media company, there very well could be additional actions taken when someone creates an annotation such as automatically sending a formatted email to an advertiser (“The text formatting at time 00:00:28.4500000 does not comply with our standards for broadcast”).  This is the real power and benefit of leveraging SharePoint as an application platform: we can incrementally add value to our solution without requiring us to build that functionality into the service.  In a traditional ASP.NET application, you would likely add new functionality in a business logic layer, requiring a change in database storage, changes to the UI to display the new functionality, and changes to the service layer to expose the data to remote consumers.  With SharePoint, you could simply attach workflows to the content type, and any updates to the list via our web service will enjoy this new functionality without making any changes to the web service.  Or you might create a new content type and attach that to an existing list. 

This is a hugely powerful concept, and strongly demonstrates why you should consider using SharePoint as a development platform.  The separation of fields and content types and the ability to apply workflows to content types is huge.  This separation provides the framework for reusable components that can be easily assembled by end users through the web UI instead of requiring developers to code more functionality.  This lets you focus on creating the really cool building blocks and focusing on how to add value rather than writing monotonous forms code that performs CRUD operations against yet another custom database.  It provides a single, consistent platform that provides the web UI, services, and storage within a single platform.

The possibilities here are staggering, because it truly changes the way we think about building applications.

I certainly do not want to reignite any of those previous flame wars about SharePoint as a development platform, I simply saw Kirk’s excellent work which clearly articulates how the development story around SharePoint is continuing to gather pace, credibility and substance.

Please; anyone wishing to express their views on this subject (for or against), I am happy to moderate comments from the well reasoned voices of experience but I have no inclination to host yet another flame war on the subject.  I myself have struggled over the years with trying to build professional, robust systems on SharePoint but I would urge you to take the time to watch Kirk’s screen casts and read the wealth of information and resources he has taken considerable time to pull together.  Nobody can deny the additional overheads (time, experience, software, hardware) involved and it boils down to whether those overheads outweigh the benefits that Kirk succinctly sums up and that can only be done on a person-by-person, situation-by-situation basis.

SharePoint, Silverlight and WCF

These are interesting times in the SharePoint space, Microsoft SharePoint 2010 is on the horizon but as yet very few details have emerged.  As a freelance SharePoint developer and consultant I have for some time been carefully considering which “horses to back” in terms of the technologies to skill up on and introduce into my everyday work.  I believe that both Silverlight and Windows Communication Foundation (WCF) will play a significant and evolving role in the future of Microsoft Office and SharePoint so I have been tracking their evolution and have been slowly and selectively introducing them into my clients’ solutions.

Today I came across the article I have been waiting for: SharePoint 2007 with WCF and Silverlight.  For sometime I have been struggling to put all the pieces of the puzzle together in a deployable and supportable way and, even though this excellent article by Sahil Malik takes a bit of working through, I now have an end-to-end solution template for displaying rich UI with Silverlight interacting with the SharePoint object model through WCF services.  The benefits that make this worth while for me are;

  • a level of UI functionality, look and feel that users are coming to expect
  • the potential to develop far more efficient SharePoint pages that don’t round trip just to update a small area on a page (jQuery and AJAX are also very definitely on my radar)
  • free upgrades – Silverlight 3 is already in beta and promising even more new features, imagine the mouth watering possibilities of SharePoint with out-of-browser support!

Incidentally, I would strongly recommend that anyone interested in Silverlight for SharePoint should read Professional Microsoft SharePoint Development Using Microsoft Silverlight 2.

Post Navigation

Follow

Get every new post delivered to your Inbox.