Saturday 28 February 2009

SPSite vs SPWeb, Site Collection vs Site

Moving from the (generally) well-named, well-structured, and well-documented ASP.NET world to SharePoint is daunting on many levels and the terminology differences as you drill down into SharePoint can be confusing. Quite often the SharePoint UI will label a concept one way while the API refers to the same concept with an entirely different term. Unfortunately a lot of this stems from the v2 to v3 transition.

Cory Roth has started putting together a list of these differences but if you’re just starting out there are two very important items worth highlighting:

UI Term API Class Name
Site Collection SPSite
Site SPWeb

My own personal trick to remember this is “a site contains webs”… and really MS, WTF is a web if it’s not the web?!?

 

3 comments:

  1. It does make sense, because an SPsite is a location (like being "on site", or going to the Portland site). In sharepoint, your site collection is associated with the database location and root url that hosts you. Your SPweb on the other hand is what hold the actual web content. Pages full of stuff, web parts and what not.

    ReplyDelete
  2. it makes sense because microsoft is a shit company and to have a sensible naming convention would make no sense for them

    ReplyDelete
  3. I find the terminology annoying because who other than Microsoft uses the "web[s]" terminology? We normally use both words together to refer to a "web site" and terminology like directory or folder instead of "web".

    ReplyDelete

Spam comments will be deleted

Note: only a member of this blog may post a comment.