Skip to content
magician and rabbit

Become a SharePoint Developer Instantly, If Not Before

With all of the interest in SharePoint I sometimes think that people walk up to me and want to know how to become a SharePoint developer instantly. (Just add water, as they say.) If you read my MSDN Magazine End Bracket article “You Should Learn SharePoint” you probably already realize that it’s not quite that simple. However, Paul Andrew has been leading a charge that Andrew Connell and I’ve been a part of to get a good primer for SharePoint developers out there so anyone who has the desire to learn will have all of the tools they need to get started with SharePoint development. The first part of the campaign is ten (!) hour long web casts where we cover the things you need to know about SharePoint and some of the cool things to learn about SharePoint that can make building your solutions easier. They are every Tuesday & Wednesday from 12p-1p EDT (GMT -0500) starting next week for the next five weeks. Here’s a break down of the schedule:

Date (all times EDT) Topic & Registration URL Presenter
Tues, May 20 : 12-1p Web Parts Rob Bogue
Wed, May 21 : 12-1p Data Lists Rob Bogue
Tues, May 27 : 12-1p Silverlight Andrew Connell
Wed, May 28 : 12-1p Event Handlers Andrew Connell
Tues, June 3 : 12-1p Site Branding Andrew Connell
Wed, June 4 : 12-1p Workflow Rob Bogue
Tues, June 10 : 12-1p Web Services Andrew Connell
Wed, June 11 : 12-1p Page Navigation Andrew Connell
Tues, June 17 : 12-1p User Management Rob Bogue
Wed, June 18 : 12-1p Content Types Rob Bogue

Special thanks to Paul for getting this ball rolling, and the awesome set of people participating both at Microsoft and external to Microsoft to make this happen. I’m excited to be a part of it.

Creating SharePoint Sites from Global Templates with the Object Model

I recently had the pleasure of delivering the first SharePoint Workshop for Bamboo Solutions in Chicago, IL. One of the cool things about the project was the ability to put together what I believe are some of the best workshop materials out there. I may be biased (and the pope may be catholic) but I believe that the common thread that runs between the labs can really help you understand how all of the pieces of SharePoint fit together.

One of the challenging parts of putting together the workshop was building a tool which could quickly create the individual user ids and site collections for each of the students. One particularly quirky part was creating the site from a global site template through the object model. You see when you upload a template to a site collection and you want to create an instance of it via code you use templatename.stp in your code to refer to the template. This is what most folks document when demonstrating how to do it. However, because I needed to create separate site collections for the students, I couldn’t upload the site template that way, I needed to use STSADM –o addtemplate to add the template globally.

When you upload a template globally, the template gets assigned an ID that starts with _GLOBAL_#0. The next template would be _GLOBAL_#1 and so on. None of this was new to me because I’ve used this format before. However, the interesting thing was that the code I wrote worked when I used one of the site definitions (STS#0) but not when I tried the template. In the end, I realized that the account I was using didn’t have access to the site. I had installed SharePoint with a service account and I was logged back in as the administrator. The administrator account didn’t have an entry in the Policy for Web Applications – once I put a policy entry in for the administrator the creation tool started working fine.

Instructional Design: One Quick Tip

I’ve received many comments about how easy the SharePoint Shepherd’s Guide for End Users is to use.  I was just editing some other material and I realized one of the reasons why.  It’s automatic for me but apparently not for everyone.
When doing step-by-step instructions you basically have two options for how to structure the step:
1) Select Option A in Field B
2) In Field B, select Option A
Any idea which one’s easier to read?  The second one.  Because you’re not forcing them to remember the value while locating the field.  It reduces what is called cognitive load.  In short, you’re requiring less brain power to be able to follow the steps.
If you’re thinking that it only applies to end user materials … um, no.  The less brain power consumed actually trying to follow the steps the more mental resources there are to be able to reach higher levels of understanding (see Bloom’s Taxonomy/Taxonomy of Educational Objectives)
The next time you’re putting together step-by-step instructions you may want to think about how you structure the steps.

SharePoint Workflows Preconference Session

Today I had the opportunity to spend some quality time with about 70 folks. We spent the day learning SharePoint workflow from the ground up. We started with what our workflow options were and moved on from there to walk through the out of the box workflows. Once we had seen the Three State and Approval workflows we quickly added in a SharePoint Designer workflow and talked about its limitations. The real fun didn’t start until we fired up Visual Studio and started creating workflows. We started through the packaging of the workflow to make it deployable to SharePoint. Once we had a workflow up and running we started adding log to history activities and send email activities to demonstrate some of the basic power of visual studio workflows. Without missing a beat we moved into custom task edit forms, a custom association edit form, and ended with some custom activities.

As I promised the attendees, the code is available at https://thorprojects.com/2023https://thorprojects.com/wp-content/uploads/2015/07/200804SPConn-Workflow.zip

I’m considering bundling up this content, and a few other things into a SharePoint Workflow course or DVD. I’d love to hear feedback on interest for such a product.

gun

Web Part Event Firings and Why You Shouldn’t Have Code in the Constructor

So I’m working on an end user focused blog post about the difference between closing (Close) and deleting (Delete) a web part. In the middle of that I realized that although we’ve been told that the web part still runs when you close a web part on a page, we’ve not been told what still runs in the web part. So I fire up Visual Studio and I create the world’s dumbest web part. (There should be a competition.) All this web part does is log each time any one of the methods that can be overridden is called. Essentially any time the web part receives any sort of action. I run the web part in WSS v3 and I get the following results:

Adding Regular Load Minimized Closing Closed
Constructor Constructor Constructor Constructor Constructor
Constructor ResolveAdapter ResolveAdapter ResolveAdapter Missing: Dispose
ResolveAdapter OnInit OnInit OnInit  
OnInit TrackViewState TrackViewState TrackViewState  
TrackViewState HasControls OnLoad HasControls  
OnLoad OnLoad EnsureChildControls OnUnload  
EnsureChildControls EnsureChildControls ResolveAdapter Missing: Dispose  
ResolveAdapter ResolveAdapter CreateChildControls    
CreateChildControls CreateChildControls OnPreRender    
OnPreRender OnPreRender SaveViewState    
SaveViewState SaveViewState HasControls    
HasControls HasControls RenderControl    
RenderControl RenderControl Render    
Render Render RenderBeginTag    
RenderBeginTag RenderBeginTag AddAttributesToRender    
AddAttributesToRender AddAttributesToRender RenderContents    
RenderContents RenderContents RenderChildren    
RenderChildren RenderChildren RenderEndTag    
RenderEndTag RenderEndTag OnUnload    
OnUnload OnUnload Dispose    
Dispose Dispose      

There are a couple of things to note here. First, in the Adding scenario – when the web part is being added to the page, two instances of the web part are created but only one of them has events fired against it. You’ll have to trust me that it’s only one instance that’s being used. This means we’ve got one Dispose method call that’s missing. i.e. Web Parts must implement IDisposable which is the Dispose method and the dispose method should be called every time the web part is created. When I get to the closed scenario is where it gets bad. When you’re closing the web part and when the web part is closed you only get one constructor – but never a dispose.

By the way, please don’t get too hung up on the order of events here. You’ll see that HasControls fired twice in the Regular Load scenario – that’s pretty normal to have some slight variations in timing that cause a few extra or fewer calls. This might serve as a rough framework but it’s not the final word on event firing. (You’ve been warned.)

Back to our story… what does all of this mean? Well, let me first say that I’ve had several folks who’ve asked me questions via email over the years and when it comes to be parts I always encourage them to move code out of the constructor and into OnInit or one of the other functions. In Web Part land there’s just not enough spun up at constructor time for things to work all the time. I’ve had more than a few folks say that their web parts magically started working once they moved code back into OnInit. So again, what does this mean?

Essentially, unless you’ve got a good reason, don’t use the Web Part’s constructor. I’ve seen problems with web parts that use it and this latest data seems to show that the dispose method doesn’t always get called – in some cases you’ll get a constructor call but no Dispose. However, in every case if OnInit is called there seems to be an Dispose call.

This blog is online with CKS:EBE

This is my first post from CKS:EBE v2.  It’s been a long journey.  For most of the last three years you’ve not been able to comment or track back to my blog posts.  That’s been because the tool I was using before didn’t have any sort of blog spam filtering and when blog spam started to become popular it became a problem to manage.
If you find anything that’s not working on the site please let me know.

Progress on “The SharePoint Shepherd’s Guide for End Users”

I wanted to provide a quick update on The SharePoint Shepherd’s Guide for End Users.  First, I have the blog’s branding (i.e. SharePoint Theme) deployed to the site.  Instead of looking like an out of the box SharePoint site it looks like a real branded site.  I’ve love to hear feedback on the branding — or on problems you’re having with it.

Second, I’ve been maintaining a list of links, reviews, and refrences on the site.  If you’re interested in what people have been saying about the book, please check it out.

Third, It looks like the book will be available in standard book distribution VERY soon.  Amazon.com already has a page for the book up.  It doens’t yet let you order it, it has no image, no description, etc., however, you can be alerted when it’s available from them.  I’ve signed up for an alert so hopefully I’ll be able to communicate availability here.

Finally, thank you to everyone who has been supporting the project.  I’ve been overwhelmed by the interest in the project.

SharePoint Site Collection Governance

While working with a client recently we came upon a seemingly simple question. How big, in terms of business scope, should a SharePoint site collection be? The question is a good one because it gets at the heart of how to architect your SharePoint Solution. You can decide on a model with only a few site collections — or one where there are a large number of site collections. In this article, I’ll take you through a process of evaluating the needs of your business units and how to design a strategy and make individual decisions.

http://www.intranetjournal.com/articles/200804/ij_04_07_08a.html

SharePoint is not Lotus Notes

I’m not the world’s biggest fans of so called “think tanks” and their reports.  While I have the deepest respect for some of the analysts I’ve met, I also know more than a few that truly miss the point.  They don’t get it.  They don’t understand the market they work in.

Recently one of the folks that I don’t think really understands the market – CMS Watch – started hocking their latest dribble about SharePoint in the CMS market.  One of the things in the report is a comparison of SharePoint to Lotus Notes. I don’t know for sure but this is apparently the case since several reporters – to whom I can only imagine a copy of the report was sent to – have posted articles making this comparison.  I can further only assume that this is a desperate attempt on CMS Watch’s part to sell a few copies of the report since the comparison doesn’t make sense.  I feel sorry for the reporters (who are overworked and underpaid) who fell into the trap of repeating this senseless comparison.

I think there are a ton of reasons why this comparison is silly.  Let me summarize the top few:

  1. One successful product is being compared to another from a different era  –  It’s sort of like comparing Lotus 1-2-3 against the current offering of MS Excel.  1-2-3 was, for its time, the best spreadsheet.  Similarly, Word Perfect 5.1 really hit the market the right way.  It was a really good word processor until the Windows GUI and WYSIWYG overtook character based word processing.  Both of these products (Lotus 1-2-3 and WordPerfect) were successful products.  The basic comparison is that SharePoint may become like Notes.  Notes was, for its time, the right product.  It is a good, money making product even today.
  2. Offline and the web – Notes is an offline database tool.  Call it groupware, a collaboration tool, or whatever you want.  It’s good at managing sparsely changing databases.  I know of several applications that Microsoft has failed to displace because they’re based on the rich replication that the tool has for offline access.  SharePoint, at least what we have today, is an online only tool.  Sure it’s got options for taking stuff offline – both from Microsoft and third parties – but we’re not there yet.  So we have a tool that from the start was designed to deal with the offline scenario – and one that was designed to deal with the online scenario.  They’re totally opposite design approaches.
  3. User Driven vs. Management Driven – It is a fallacy that Notes was driven by end users.  Notes utilization was driven by departmental IT.  Folks may believe I’m splitting hairs, but I don’t think so.  Notes was adopted because departmental IT (what some folks call Business Unit IT) needed solutions and central IT wouldn’t do them.  They could develop Notes applications and corporate IT would host them.  SharePoint is being driven in some cases literally by end users who need to share a spreadsheet or keep versions of a document.  It’s not the departmental IT manager.  It’s the administrative assistant or the business analyst or the chemist.  The adoption model isn’t the same.  Honestly, the adoption is much more akin to the MS Access adoption model.
  4. Users Hate Notes – As some have correctly pointed out, most folks who hate Lotus Notes hate it as a mail client – and well they should.  I’m a strong Outlook advocate.  Its issues pale in comparison to those of Notes.  I don’t have any particular malice towards Lotus Notes as a sparsely connected DB – it’s great at that.  The issue is trying to force it to be a mail client too.  SharePoint doesn’t do email.  Exchange and Outlook do Email.  SharePoint integrates with Exchange and Outlook.

So let’s follow the supposition that SharePoint will follow the lifecycle of Lotus Notes.  Where does that leave us?  With a product that has one of the longest lives of any product in PC history?  To a product that has 120M users?  I guess I don’t see that as a bad thing.

The implication is that SharePoint will someday become a legacy product for organizations as they seek to divest themselves from it.  Uh, duh.  That’s going to happen.  The trick is when and why?  I don’t know the when, but as for the why – it will be because MS doesn’t make the right investments in the product.  I think MS has a much better track record at making the right investments than IBM has.

I’m really waiting on someone to catch on that the MS Access comparison (which I made above) is a better comparison. MS Access adoption was driven by end users.  It was very easy to let MS Access databases get out of hand — just as it’s easy to let SharePoint sites to get out of hand.  However, what SharePoint has going for it is it’s still recoverable – where Access wasn’t.  Oh, yea, and you *CAN* throw hardware at a SharePoint performance problem (due to bad design) where with Access you really couldn’t.

Can you do bad designs with SharePoint?  Absolutely.  Is this any different than any other CMS (or collaboration) product?  No.  Well, why then, you might ask, are there so many screwed up SharePoint implementations and so few of the other products?  Let the other products do 1 Billion in sales – and 100 Million licensed users.  Take a look at the numbers again – you’ll probably find that the numbers aren’t that different as a percentage.  Everyone’s seeing more screwed up SharePoint implementations because there are more of them to be screwed up.

Recent Posts

Public Speaking