Skip to content

SPFile.Item == null and SPFolder.Item == null

This post requires a bit of explanation.  In SharePoint Folders and Files are really special items – well, most of the time, but I’ll get to that in a moment.  Many of the typical kinds of things that you want to do have to be done with the item object – for instance if you want to manage security.  So I was writing a tool the other day that went through and fixed up security a bit.  (Sort of like the Windows NT+ command line utility CACLS.)

Something happened that didn’t initially make any sense.  When I did an SPFolder.Item I would sometimes get null back as the result.  That’s not suppose to happen – or so I thought.  If I have a folder in a document library it has a corresponding item.  If I have a file in that library it has a corresponding item … most of the time.

The problem comes in when there are files which are necessary for the operation of the list or library which are ghosted (or uncustomized, if you prefer).  You see when a library is created the forms for displaying and item, creating a new item, and editing an item are all provisioned too.  The result is that the document library (or list) has a Forms folder and in that forms folder are created at least those three files.

So when you’re happily traversing down through a structure it’s more than possible that you’re going to encounter SPFolder and SPFile objects that have no corresponding SPListItem.  They don’t have one because they’re not an item in the list.  They’re special files and folders added to support the operation of the list.

Of course, that may not stop you from doing a double take when the SPFolder.Item call returns null.

Presentation: SharePoint for Developers

Last night I had the pleasure of speaking in front of the Indianapolis .NET Developers Association again.  It’s a great group and I always have a lot of fun.  The topic was SharePoint for Developers.  It’s something near and dear to my heart as I work with all sorts of organizations to help them build solutions to leverage SharePoint’s power.

If you want to see the slide deck (in PDF format) from the event you can go here.

Article: Understanding the SharePoint, ASP.NET Relationship

Unless you’ve been living under a very large rock you’ve probably heard about this thing called Microsoft SharePoint. And like Chicken Little, people in the SharePoint community are running around saying that the end is coming.

While there’s a great deal of power that SharePoint offers it doesn’t mean that you won’t be writing in ASP.NET any longer — quite the contrary, SharePoint is a fairly well behaved ASP.NET 2.0 application itself — at least in the Windows SharePoint Services 3.0/Microsoft Office SharePoint Server 2007 timeframe anyway. That being said, there are some differences when it comes to developing with SharePoint that the ASP.NET developer should be aware of. Here are some of them:

http://www.intranetjournal.com/articles/200708/ij_08_24_07a.html

Article: When you Need SharePoint Designer

There are some tools I don’t hand my son. He’s five and frankly there are reasons why I don’t want him working with chain saws. I occasionally need a chain saw to cut down a tree or cut up a fallen limb. But it’s not a tool I’d ask him to use.

I feel the same way about SharePoint Designer (SPD) — in the hands of some and in the right circumstances it can be a powerful tool capable of saving organizations money. However, in the hands of others, it can be a disruptive influence that makes it harder for organizations to have a well governed and used system.

In this article we’ll walk through a high-level summary of SPD’s features and how these features should and should not be used. At the end of this article you should be able to identify those situations where SPD can be helpful and identify situations where using SPD may be more of a hindrance than a help.

http://www.intranetjournal.com/articles/200708/ij_08_20_07a.html

Speaking at Advisor Summit on SharePoint, Miami, Sept 30-Oct 4

I’m pleased to announce that I’ll be delivering three sessions at Advisor Summit on SharePoint in Miami, FL.  The event is going on from September 30th – October 4th.  Specifically the three sessions I’m doing are:

  • Finding the Lost Information in Your Enterprise
    When you want to find an HR form do you look on the Web … or do you call your friend in HR? Have you ever needed to know what your organization knows about a topic, and you know the knowledge exists, but you can’t find it? In this session you’ll learn about the first step to getting a handle on data in your enterprise: getting people involved with SharePoint. You’ll then explore the crucial second step: preventing that interest from getting out of control. (Do you remember the proliferation of Access databases in the 1990s?) Don’t miss this session full of tips on how to promote SharePoint adoption — while setting up a taxonomy and structure to keep control.
  • SharePoint Workflow Out of the Box
    SharePoint 2007 provides many pre-built workflow solutions directly out-of-the-box. Learn what you can do with SharePoint and workflow — without being a developer. In this session, you’ll explore what options you have if you don’t like braces, brackets, and semicolons. MOSS includes workflows that may fit your needs and, even if they don’t, you might be able to create your own with SharePoint Designer.
  • SharePoint Workflow for the Developer
    SharePoint is a powerful platform for workflow, especially if you’re a developer. Learn how to build your own SharePoint Workflows in Visual Studio. Developed workflows can do almost anything from sending reminders, to creating tasks, and updating properties.

If you want to learn more about the event or register you can do so here.  I’ll see you in Miami, FL.

SharePoint Search Workshops from Mondosoft

I have the great pleasure of having been invited to help Mondosoft deliver its SharePoint Search Workshops in some cities across the US.  In fact, both Bob Mixon and I will be doing select events for Mondosoft.  We haven’t finalized which events Bob or I will be doing as of just yet, however, I can say that I’ll be attending (not presenting) in Chicago this Thursday August 16th.  It’s my opportunity to work with Mondosoft’s presenters to learn the content they’ve put together in order to help registrants better understand how Microsoft Office SharePoint Server (MOSS) Search works.

In my opinion, search is one of the misunderstood features of MOSS.  There’s so much power in the engine and relatively speaking very little of that power makes it to the surface in the user interface.  That is why these events are compelling.   You can learn more about how SharePoint works and what the out of box user interface doesn’t surface.

If you want to see if there’s an event coming to a city near you – or if you want to register for one of the events go to http://www.ontolica.com/Services/workshops.aspx

I look forward to meeting you at one of these events soon.

Real World SharePoint 2007: Indispensible Experiences from 16 MOSS and WSS MVPs

I’ve got a long history of publishing that spans editing over 100 titles and having author credit on 16 – now 17 books.  Most of the acquisition editors I know have long since heard me tell them that I’m not interested in another book project.  I’ve been there.  I’ve done that.  However, this project was different.  What do I mean by different?  Well, let me first explain the Microsoft MVP program.

The Microsoft MVP program recognizes individuals based on their technical contributions to the community.  Within the program you’re awarded into a category – in my case Microsoft Office SharePoint Server (MOSS).  In other words, someone at Microsoft believes I add value to the MOSS community.  There are similar awards for Windows SharePoint Services (WSS).

One of the interesting things about the group is that we each have our own more specialized areas.  I’ve spent good time with Windows Workflow in SharePoint.  Dustin Miller has spent good time with SharePoint Designer.  Andrew Connell knows Web Content Management (WCM) well… and so on.  The project was to bring together all of us – to take what we knew best – and write it down.  It’s intriguing to me since it would definitely push the value equation on the project.  It would mean gathering a set of knowledge that would have been impossible to get together any other way.

So I signed up to offer my experience with Workflow and SharePoint – but I went all in.  I also agreed to perform a technical edit on the chapters I didn’t write.  Why would I do that?  Well, because honestly it would mean that I could help make sure the book fit together.  So that despite the clear voice of each of the authors it would feel like you’re reading different perspectives from a choir – rather than a mob.  You can be the judge about whether we succeeded in this goal.

Obviously, I have an interest in the success of the book.  However, that aside, having read every chapter – I can honestly say you won’t find a book with more experience and more real world help anywhere in the market.  Sure you may only find one chapter that you need today.  However, it will be the best chapter you can read on the topic – and eventually you’ll need the other content.

So I heartily recommend that you pick up a copy of Real World SharePoint 2007: Indispensable Experiences from 16 MOSS and WSS MVPs – because it is indispensable.

It’s shipping now.  Order your copy today!

Stumbling on Happiness

Book Review-Stumbling on Happiness

What makes you happy?  Are you happy?  I’ve personally spent my life time trying to find “happy” much to my dismay it’s illusive like a pot of gold at the end of the rainbow.  (Hint: The rainbow moves.)  I certainly have a lot to be happy about – and I am generally speaking happy.

I have few regrets; I enjoy what I do for a living, and so on.  But to be honest, I don’t know why I’m happy.  Why do I care why I’m happy?  Well how do I remain happy?  How do I become happier?  How do I help my wife or my son become happier?  They are hard questions to answer if you can’t describe what makes you happy in the first place.

While I won’t say that Daniel Gilbert’s book Stumbling on Happiness has all the answers.  Clearly it doesn’t or everyone would have read it by now – while sitting next to their money tree and sipping their favorite beverage.  However, even without all of the answers there are more than a handful of salient points.

I knew my ability to estimate how happy I will be from something is bad but I didn’t know how bad – or why.  I have enough gadgets that I realize that gadgets don’t make you happy.  (I’m still going to get more.)  However, I didn’t realize that everyone else was equally bad at it.  (OK, most people are equally bad at it.)  Gilbert helps to enumerate some of the reasons why the estimating is so bad and offers a hint or two about what to do about it.  (It’s one hint and you likely won’t take his advice, but it’s there.)

It also crystallized for me the idea of a psychological immune system.  That is, succinctly, a psychological system that keeps us “ok.”  Perhaps better said in the context of the book, enables us to be more happy than not.  This is important in part because I picked up the book as my flight was cancelled in New York’s LaGuardia airport.  My rerouting will take more than 24 hours, involves me not getting enough sleep, and sitting in Regan National Airport in Washington, DC for more than 9 hours.

Yet, honestly, I’m not that miffed at the whole deal.  I suppose I should be but I’m not.  What I would call coping skills kicked in and coerced me into making the best of it.  It gave me time to read the book – which I wouldn’t have been able to do without the delay.  It also gave me time to work on some projects that were late (or almost late).   To be frank, I wouldn’t have traded the time with my family for these things – but all in all it wasn’t a total loss.

This is even more striking because I witnessed another passenger nearly “loose it” when her flight was cancelled.  I’m sorry that her psychological immune system was not stronger.  Whether I call it coping skills, adaptability (as I’m sometimes apt to do), or a psychological immune system – it’s interesting to better understand how to cope with disappointment.

I won’t say that Stumbling on Happiness will help you find happiness – however, it might make it a little easier to understand it when you do.  It’s more than worth a read.

Oh and “You’re fine, how am I?”

The Long Tail: Why the Future of Business is Selling Less of More

Book Review-The Long Tail

The world is changing.  That’s no news flash.  The real question is how is it changing and what do those changes mean for you?  One of the changes is a gradual migration away from runaway hits, blockbusters, and phenomena.  Instead lower cost to store, lower cost to distribute, and better findability are changing economy so that we can all have the individuality we crave.

A few centuries ago we as humans possessed relatively little.  The tables we owned were crude, the dishes in ornate, and our clothes drab and expressionless when compared to today.  We were in an age of craftsmen.  A craftsmen’s work took time and was therefore expensive.  As a result we couldn’t afford much.

We moved from there to assembly lines and mass production where you could have nicer things – as long as you were willing to have the same nicer things as your neighbor.  As a result of mass production, producers had to find the things that would sell well to a large number of people.  The more people you could convince to buy the product you were making the more money you made.

The problem with mass production is that it required that a few items be produced in large quantities.  We needed to have one kind of car (Ford’s Model T – in any color as long as it’s black).  The costs of producing, inventorying, and distributing variations were too expensive to be cost effective.  The economics of mass variation weren’t cost effective.

However, today we’re living in a different world.  We live in a world of electrons not protons (bits and atoms as the book would describe it.)  Electrons move from one spot to another at lightning speed thus eliminating distribution costs.   Electrons don’t take up nearly as much space as protons … the result is the virtual elimination of storage costs.  Electrons flow through computers in a seemingly infinite number of ways resulting in a lower cost to produce the variation that customers want.

We live in the world of $0.99 music downloads, print-on-demand books, and streaming video.  In short we already experience the ability to purchase bits not protons – or at least the electrons are converted to protons at the last moment.  We don’t buy tapes or CDs as often as we once did.  Instead we purchase the music – and occasionally convert the electrons into protons  when we burn a CD to play in the car.  We order books which exist solely electronically and they are converted into printed form without our even knowing.  Sometimes we don’t even bother to have them converted as we buy eBooks.  Instead of a single one-size-fits-all video from the network affiliate we are increasingly a society that watches our video from the Internet.  We watch 3-5 minute clips of the news stories that we want to watch rather than 30 minute news broadcasts.

The Long Tail explores this idea – the changes that have been happening – and what it means for you and me.  If you’re trying to understand how to make money in an increasingly competitive world, it’s worth a read.

Article: Customize a SharePoint Login Page

Go beyond the complexities of working with SharePoint, and discover how to create a custom login page that you can associate with unique code.

Working with SharePoint can get complicated. Even seemingly basic tasks are wrapped up in so many layers of automation and support that it can be hard to sort out what you need to do to accomplish your goals. Trying to determine how to change the login page in SharePoint is no exception. For this reason you’ll discover how you can modify an out-of-the-box login page to build your own, which you can customize as you desire—including associating it with custom code.

To be able to even see the login form you’ll need to turn on forms-based authentication. There are several good resources that address turning on this feature, including Steve Peschka’s post on the “SharePoint Products and Technologies Team Blog” and Andrew Connell’s blog post, “HOWTO: Configure a MOSS 2007 Publishing Site with Dual Authentication Providers and Anonymous Access.” These articles walk you through all of the details necessary to learn how to set up the secondary authentication (membership) providers and how to make them accessible. However, neither resource touches on how to modify the login page itself.

Layouts and Login
The out-of-the-box login page lives on the server as _layouts/login.aspx or on the file system in \Program Files\Common Files\Microsoft Shared\Web server extensions\12\TEMPLATE\LAYOUTS. This location makes the page an application page—one that lives outside of any single SharePoint site. This setup is both good and bad. It’s good in that it works no matter what the site is or how the site has been provisioned. It’s bad in that it doesn’t use the same process for modifying a page that a regular SharePoint site page may use.

http://www.devx.com/enterprise/Article/35068

Recent Posts

Public Speaking