SharePoint architects and developers often wonder how best to design solution packages for long-term ease of use, especially through upgrade cycles. In a survey of SharePoint developers I found a range of strategies from one monolithic WSP to hold everything, up to practically one per feature which resulted in as many as 50 WSPs for a project.  The variance depended on the developer's goals for maintenance. Application vendors want to keep things simple for admins, so a single solution per product makes sense. When downtime needs to be absolutely minimized and you need absolute granular control over each and every feature, maybe you want to maintain dozens of packages so that upgrading one will minimally affect the others.

But what I wanted was a strategy that recognized the average case rather than the extremes. From there, as with any taxonomy, specific implementations can either generalize up to the monolithic, or specialize down to the highly granular. Reza's strategy used 5 packages (follow the link for details), so I started there and through several trials arrived at the recommendations found here. Along the way, principles emerged to guide a general strategy.


Principles of SharePoint Development Structures and Packaging

- You need naming standards. Plan your .NET namespaces, feature names, content types, list ID numbers, internal names for site columns, custom field types, and every other possible element so that related work sorts together in the \bin, the Global Assembly Cache (GAC), the \TEMPLATE\FEATURES subtree, and any other folder, and is easily differentiated from other work as you walk through elements in code. Across projects you need to maintain a central index of List Type IDs (starting from 10000) to avoid collisions.

- Think of your source control as a series of snapshots kept in step with your WSP packages. If you need to roll back to a previous version, that means going back to a previous set of WSPs, and that means being able to compare that complete working code set with the broken one. More often you'll see the benefit in code reviews, during which any decent differencing utility will help you review the sections that changed from the old to current version.

- It is preferable to have more (not fewer) Visual Studio projects and assemblies (DLLs) packaged as more (not fewer) Features. The benefit is that it is often (though not always) sufficient to only regression-test the assemblies that changed from version-to-version, rather than to build do-it-all assemblies [of course this depends on how specialized or loosely-coupled your assemblies are in the first place]. When the changes of many developers need to be tested in a release, it is harder to isolate the work of each in monolithic projects and assemblies. If your namespaces are consistent so your project assemblies are easily identifiable, then server administrators should prefer this selective strategy too; it's when dozens of assemblies with random names are scattered across the GAC that people justifiably complain.

- It is preferable to package your VS projects and features as fewer (not more) WSPs. The more WSP packages you have, the longer they take to install, and the more complicated your deployment scripts. That said, smaller teams will tend towards fewer WSPs, and larger teams will have more. But keep it within reason. Each developer will own different areas of functionality, and people "get in each other's way" less often when team roles map to distinct solutions.

- You do not need to create WSPs to develop, you do need WSPs to deploy. It takes a long time to retract, delete, add, and deploy a solution, and the cycle provides no benefits in a dev environment. Obviously, this applies until it's time to test packaging and deployment. If you only need to test a code change then copy the updated assembly to the GAC and recycle the Application Pool. If deploying to the \bin, you can even skip the recycle. You do not need to redeploy an entire solution to test discrete changes to code or ghosted aspx files.

- When deploying solutions with STSADM you have the option of going through the full retract, delete, add, and deploy cycle or to use the "-o upgradesolution" switch. While upgradesolution is faster than going through the complete cycle, it does only upgrade existing features. Any new features in the solution will need to then be installed individually to each Web Front End (WFE) in the farm. Only the complete cycle ensures that new features will be installed automatically to every WFE in the farm.

- It ain't easy to version Content Types. Your options are to a) once deployed, never upgrade a content type; b) only update content types through the UI; or c) update content types in code. I prefer to upgrade content types in code, albeit through a generic tool (based on code by Søren Nielsen  wrapped in an STSADM extension by Gary Lapointe) that propagates the content type schema down ot existing instances. John Holliday  also described an iterative approach to content type updates in chapter 11 of Professional SharePoint 2007 Development.

 

Standard Operations
There are four installation and upgrade operations to plan for:

1.    Installing and activating features (packaged as WSPs),
2.    Creating content with features (e.g. site provisioning and list instances),
3.    Deactivating and removing features, and
4.    Removing the content created by features.


During an upgrade you normally don’t want to alter existing content, you want to remove current functionality and replace it with a newer version. If you keep these four operations in distinct packages, it’s easy. When you start mixing list definitions with list instances, or mixing deactivation with cleanup, you can no longer manage these as distinct operations. Therefore guidance to "always clean up after yourself in the feature deactivated receiver" is wrong if your goal is to update functionality without affecting existing content.

Recommended solution packages (WSPs)

1.    Global (assemblies and server controls)
2.    SP Administration features (e.g. Central Admin features, web services, and STSADM extensions)
3.    SP Base Features (elements re-used among projects and site types)
4.    SP Site Features (e.g. stapled features or site definitions)
5.    Chrome and Branding (e.g. gallery content including master pages, style sheets, and layout pages)
6.    Instances (e.g. site-provisioning feature receivers, features containing list instances, and cleanup receivers)


Notice the narrowing trend in this order from farm-wide down down to specific instances. Another way to see it is as a layering of features from a foundational base up through presentation. Any of these packages can be divided further. For example you may want to manage separate solutions for instance creation vs. instance cleanup. Or you may want to maintain different site definitions and their constituent features (or stapled feature sets) in separate packages. Also, any of the elements can move around where it makes sense. For example, if you prefer to put list instance features (usually in #6) in the same solution as their list definitions (in #3 or 4), do it. Just be sure you don't reactivate your instance features (and create new redundant lists) every time you upgrade your list definitions. The decision is whether to simplify the maintenance of code, or maintenance of your deployment scripts.

When creating the actual Visual Studio Solutions to support each of these packages, it helps to name the folders to sort in a natural order, for example:

MyCompany1Global,
MyCompany2SPAdmin,
MyCompany3SPBase,
MyCompany4SiteTypeThis,
MyCompany4SiteTypeThat,
MyCompany5ChromeDefault,
MyCompany5ChromeHalloween,
MyCompany6InstancePortal,
MyCompany6InstancePersonalSites.


I hope you find this to be a useful strategy for organizing your own solutions and packages. As always I'd love to hear feedback about other approaches, exceptions to the rules, and other thoughts on the topic. Another time we'll dig into sample solutions to further explore namespace structures and automated build strategies.

Acknowledgements
Thank-you to Reza Alirezaei, Jake Dan Attis, and Dan Larson who shared their strategies on solution design. Also thanks to Robert Bogue for reminding me of the weaknesses of upgradesolution and Brendon Schwartz for rekindling the whole topic, that was the kick I needed to finally commit these ideas to a post.

This is a heads-up about two exciting TSPUG sessions coming soon: next week on May 27 and next month on June 17.

Next Wednesday Bill Brockbank (Navantis) is leading a set of "Quick Hits"- these are 15 minute presentations by members on a variety of topics. Details of these micro-sessions will follow on the recently relaunched (and not entirely complete) TSPUG.com. While we're on the topic, kudos to Bill and his team for relaunching our site!

Then in June we're exciting to have Max Yermakhanov (ObjectSharp) do a session on end-to-end Web Content Management (WCM) with MOSS 2007: "Using SharePoint for Public-facing Websites."

Your planning committee (Bill, Susie and I) are up in the air about whether to hold a July meeting. Normally we take the summer off, but momentum and attendance has been great this year, so based on your feedback we will make a decision before or at next week's meeting. Please speak up! We do have a speaker waiting in the wings, so the question is, "will we have an audience?"

I'm in Montreal for SharePoint Summit 2009, thinking about the session I'm delivering on Tuesday afternoon. The goal is to distill all the useful knowledge that you won't learn anywhere else, or at the very least, not all in one place. And none of it is in existing SharePoint books or articles. At least none that I know of, but I'd love to be surprised.

The abstract (Ctrl-End to the bottom of this page) follows the conventional Problem, Opportunity, Solution, Benefits, Agenda model, but it's probably better to lay the cards out and say "here's what you're going to learn" and the best way to do that is to give you all of my sources here, before the start of the session and long before the final slide cleverly titled "References." And the deck too so you can make notes right on it if you're there. And if you're not here in la belle Provence, well, some of it will make sense without a tour guide but I'll be honest, you'll be missing at least a third of the lesson.

Parts

  • Sense-making: How to differentiate between and design appropriate action for the simple, the complicated, and the chaotic.We start with David Snowden's Cynefin Analysis and then improve upon it for practical use.
  • The practical limits of people: Learn the sizes of effective teams, offices and lives, and because of Dunbar's number and related research, why those are the right sizes. 
  • The practical limits of SharePoint: Evolution and sense-making determine how we work. If you accept the premise that IT solutions support people processes through simulation, then it is now important to explore the constraints of the platform we're using to simulate and support the work of people.

References

My related blog posts

Download

Architecture into Implementation - The practical limits of people and SharePoint (PowerPoint)

With only 15 to 20 minutes to cover each of the three parts, I'm tempted, but will ultimately reject an urge to completely reverse the session and cover the hard limits of SharePoint first. The numbers, the risks and their mitigation are simple, they're what many are coming to see, so we can cover them and move on. From these we can move into the limits and work styles of people, which may seem complex but given the research, we people fit into surprisingly simple buckets for the purpose of solution design. And finally the star of the show, an improved model for sense-making. What is it? It's one of those things where you'll never see the world or its problems quite the same way again. Is 10 to 15 minutes enough to get it? Like anything worth knowing, that should be plenty.


Attendees of the Wednesday March 25 edition of the Toronto SharePoint User Group will navigate the wonders of Document Life Cycle in SharePoint using K2 BlackPearl.  Our own Bill Brockbank will verily demonstrate how K2 can be used to manage the governance, authoring and editing of a document library with nothing up his sleeves except K2's BlackPearl. From there Bill will reveal the magic of multi-level approval before deeming a work as final and published. Magical stuff indeed.

Bill Brockbank is a Microsoft SharePoint Server MVP and an experienced Solutions Architect with over 25 years of experience in software and hardware design.  With such a wealth of industry knowledge, Bill is adept at envisioning practical solution architectures, problem-solving diagnostics and peer mentoring.  At Navantis, Bill focuses on the development of custom applications using the Microsoft .NET framework.   Specifically, Bill works in the workflow and Enterprise Content Management space with Microsoft Technologies, Captaris Workflow, K2.NET and SharePoint 2007 (MOSS and WSS).

The opening act tonight pairs Ruven Gotz and Kanwal Khipple in a public demonstration of Twitter, mercifully not entitled SP'itter (yes, the front row will be safe).

Note: The TSPUG website is down for the moment as we continue its migration and rebuilding.In the meantime, you can check here and at the NLC Blog for monthly meeting updates.

We will resume the meetings in April on the 3rd Wednesday of the month.

If you can make it to tonight’s session, please RSVP asap, so that I can determine how much pizza to order.

Where
2 Bloor Street West on the 12th Floor.

Whence
6:00 to 8:30pm

Whats
6:00pm – Pizza
6:30pm – Q&A
6:50pm – Ruven and Kanwal on Twitter
7:00pm – Bill's Feature Presentation: Manage Document Life Cycle in SharePoint using K2 BlackPearl
8:30pm – Closing and Prizes

To RSVP, please email sibbotson@nonlinear.ca

*Pizza will be provided by our very generous sponsor, Non Linear Creations (NLC)

Via Soma: Sharepoint tools support in Visual Studio
http://blogs.msdn.com/somasegar/archive/2009/02/19/sharepoint-tools-support-in-visual-studio.aspx

In the screenshots, note the .package and .feature files, as well as the Packaging Explorer tab on the right. In the example a feature is displayed where there are several elements available in the solution (left), with just the workflow features being selected into “Workflows.feature” (right).


The topic for tonight was suggested during the most recent Toronto SharePoint camp - How to structure SharePoint solutions in Visual Studio, and automate the build and WSP generation. Building SharePoint Solutions (WSP) is the most painful part of the development process. In this session attendees will learn how to take the pain away for SharePoint 2007 by structuring Visual Studio Solutions for easy management, and by automating the build and WSP creation.

Presented by me, Eli Robillard with corrections, improvements and miscellaneous heckling by Bill Brockbank and you. See you there!

If you can make it tonight, please RSVP (just a formality), so that Susie can determine how much pizza to order.

Location: Nexient Learning @ 2 Bloor Street West on the 12th Floor.

6:00pm to 6:30 - Pizza and people arrive

6:30pm - Q&A

7:00pm – Presentation

8:30pm – Done

To RSVP, please email sibbotson@nonlinear.ca

* Pizza will be provided by our very generous sponsor, Non Linear Creations - non-linear creations (NLC) is a leading web development and IT integrator, helping clients leverage the business benefits of Internet technology to drive traffic, support sales, and achieve a strong return on online investments.

This came through internally on Friday from fellow Infusionite Kartik Subramani. Congrats to everyone involved!

About three weeks ago, Infusion was asked to produce a demo of a security application for managing security at SuperBowl XLIII in Tampa Bay this Sunday.  Although originally intended as a demo to gain some press for both Infusion and E-Sponder (the solution that Tampa Police uses in their day to day operations), it was such a hit, that the Incident Commander requested that it be brought into the Joint Operation Center, where every security organization from the local police to the [deleted in case this would get anyone in trouble. -Eli] were gathered to monitor the event.  The app allowed for real time visualization of incidents as they were reported to 911 and filed by police officers.  While I was down there, everything from loose dogs and lost children, to grand theft auto and bomb sweeps were showing up on the map.  In addition to having all that information at his fingertips, the Incident Commander was also able to listen to and speak out on to their various radio networks from the Surface [unit].

You can read full details at the following links:

http://www.microsoft.com/industry/government/news/e_sponder_super_bowl.mspx
http://www.engadget.com/2009/01/29/microsoft-surface-being-used-to-coordinate-super-bowl-security/

There were film crews from NBC and CBS filming the Incident Commander using the application.  I believe the NBC clip was to air this morning [Friday, Jan 30] on the Today Show, or the morning news, but I’m not sure when the CBS clip is going to air.

Big shout out to Lan Nguyen, for his help with developing the application, and to Alex Preston and Trevor Hunter for their guidance during the architecture and design phase.

And while everyone inside Infusion knows that Kurt Guenther is the "godfather of Falcon Eye," now you know too.If you have want to learn more about Surface or have questions about how we did it, you can reach Kartik and the team through the alias: surface@infusion.com.

 

Read more about Falcon Eye at the Superbowl

Read more about Falcon Eye and Surface

Read more about Surface Development at Infusion

 

Posted by erobillard | with no comments

A giant shout-out to the organizing committee, volunteers, sponsors and attendees of this year’s Toronto SharePoint Camp, what a great day! Chairman Bill Brockbank was pretty raspy (and full of Buckley’s), so I was the “voice” for the opening, and facilitator of the speaker round-table and raffle, but these things don’t happen without great people and planning. Everyone did a great job to be proud of.

We had well over 200 attendees for 20 sessions delivered by 19 speakers including 5 MVPs representing a variety of specialties. Feedback was phenomenal (here's the first review from the wild) with a lot of comments like “greatly exceeded expectations” and “I can’t believe you guys can offer this for free.”

There were a few benefits we didn’t expect. A Mississauga SharePoint user group has a strong chance of launching with its first meeting in the next 2-3 months. Just as Toronto supports downtown and suburban .NET user groups, I’ve long thought a suburban SharePoint UG would do well. Three people stepped up to lead it, and about a half-dozen people have already volunteered to get involved (comment here or contact me if you want to get involved too). Fantastic!

Several people suggested adding end-user content in either next year's Camp or in our monthly meetings. After a little probing, it seems there are existing Knowledge Management interest groups in Toronto, for example in the public service and among law offices. The best way to get end-users involved will be to “go where they are.” So to meet the need, our user group will start offering a list of speakers and topics geared to end-users and knowledge management.

And there is interest in holding a local SharePoint Saturday. Unlike a mini-conference format these are (near as I can tell) hands-on day-long projects where people show up with their laptops, get assigned to a task and then go off to develop in hives. It sounds like a great idea and even though I’m not fully up to speed on the format, I wouldn’t be surprised to see one spring up in Toronto this year. One again, if you're interested in coordinating or volunteering, comment or contact me and I'll facilitate.

The presentations and sample code are being posted to the site as we receive it. As a bonus, last year's content is still there for the browsing.

One of the topics requested will be delivered at our very next TSPUG meeting on Feb 18: How to structure solutions, and automate the build and WSP generation. Building SharePoint Solutions (WSP) is the most painful part of the development process. In this session attendees will learn how to take the pain away for SharePoint 2007 by structuring Visual Studio Solutions for easy management, and by automating the build and WSP creation. As always you can RSVP by sending a message to Susie. See you there!

 

http://weblogs.asp.net/erobillard/archive/2008/12/13/the-best-free-sharepoint-downloads.aspx

I've added full descriptions to this living post to explain why these are the greatest downloads since O12 itself, it's starting to look like a real resource.

Philosophical question - do you love or hate these posts about such changes (posts about posts)? Are they as annoying as blog spam? Do you visit these pages on a regular basis anyway? 

See you all at Toronto SharePoint Camp tomorrow!

Come out and warm up with the Toronto SharePoint User Group tonight at Yonge and Bloor from 6 to 8pm, as we hold a Volunteer Night to prepare for the Toronto SharePoint Camp coming up this Saturday. Whether you're a member eager to give a couple hours back to your community, a new member  looking for a bunch of great people to bounce ideas off of, a first-time speaker looking for some tips, a seasoned speaker with stories learned the hard way from conferences past, or just in it for the free pizza, come on out! 

We know you want to see sessions too, so by coming out and planning the day tonight, we can be sure to accommodate everyone's schedule. Unless your name is Eli or Bill, it won't be an all-day commitment, but we do need your help. If you can't make it to Volunteer Night tonight but want to help out on Saturday, there are spots available for greeters, hallway traffic directors, speaker introductions, and more. Hit the link below to send a quick e-mail to volunteer some time.

And whether your work touches SharePoint or you're just curious, the Toronto SharePoint Camp this weekend will be one of the best SharePoint and knowledge management events ever held in Toronto. We have it on a Saturday so it never interferes with work, and whether you can spend a few hours or the day, you want to be there. Who will you see? We have five, count'em, five Microsoft MVPs speaking, a former member of the SharePoint product team in Redmond, a speaker from the popular Best Practices Conference, and hundreds of years of expertise in twenty sessions on five stages. Developers will go deep on topics like Silverlight, web parts, workflow, and search. Managers and architects will go deep on governance, cultural change, and mind-mapping.

Be a part of it! Lunch will be provided, registration is free, and there is a giant stack of prizes to give away. 

[Volunteer for SharePoint Camp!] Tonight, Wednesday, January 21 at Nexient, 2 Bloor West (north-west corner of Yonge and Bloor), 6 to 8pm.

[Register for SharePoint Camp!] Saturday, January 24 at Manulife Financial, 200 Bloor East (north side of Bloor, between Church and Jarvis), 9am to 5pm.

More Posts Next page »