Force Left Nav To at least 200 Pixels wide
Force Body To at least 500 Pixels high
SharePoint MindsharpBlogs > Todd Bleeker
Are you pondering what I'm pondering?

 Last 10 Posts

Jun 01
Published: June 01, 2011 09:06 AM by  Todd Bleeker

Wednesday, June 1

8:30-5:00: SharePoint 101 The Developer (W-2 in Back Bay A)

This session is a day-long overview of development on the SharePoint 2010 platform. Increasingly, organizations are developing SharePoint based solutions. This workshop is designed to give developers basic and intermediate information about how to leverage the SharePoint platform to create enterprise SharePoint applications. Ideally, attendees will already have some SharePoint end user experience, be familiar with Visual Studio, and possess some knowledge of .NET programming language.

Thursday, June 2

1:15-2:30: Developer's Intro to Imperative Workflow in SharePoint 2010 (301 in Commonwealth Ballroom)

Visual Studio 2010 SharePoint Project Items for Workflow, Workflow State (Declarative properties, Imperative properties, Bind to existing property, and Bind to new property), Fault Handling, Start to Stop > Remove to Allow, Creating a SharePoint Task, Stop for Green Activities: OnTaskChanged, Correlation Tokens, Guid.NewGuid() not new Guid(), Property Bags, CodeDOM and Code Conditions, If/Then/Else Activity, While Activity, Send Email Activity, and Association/Initiation Forms. Hold on to your hats for this supercharged introduction to Workflow.
TECHNICAL LEVEL: Intermediate

Friday, June 3

10:00-11:15: Creating Custom Service Applications (601 in Back Bay D)

SharePoint 2010 includes a new facility for moving intensive processing from the Web Front End servers and onto load-balanced application servers. A Service Application Farm can even be configured to allow other Farms to offload their processes to a centralized and/or dedicated set of application servers.

However, with over a dozen moving parts, Service Applications can be quite overwhelming to create. In this session, Todd will simplify the process so that everyone can be successful implementing a Service Application.
TECHNICAL LEVEL: Expert

11:30-12:45: PowerShell - The Power of the Pipe (708 in Back Bay D)

Windows, Active Directory, SQL Server, Exchange and now SharePoint use a common administrative environment called PowerShell. This session will cover the constructs of the new language, explore some of its nuances, and demonstrate how to use it to query and manipulate a SharePoint environment. Come see what PowerShell has over a traditional Console Application or VBScript. If there's time, we'll end with details on creating a simple custom PowerShell cmdlet.
TECHNICAL LEVEL: Intermediate

<Todd />



May 16
Published: May 16, 2011 12:05 PM by  Todd Bleeker

TechEd Come find me at any of the
7 sessions I'm doing this year at Tech Ed 2011.

Monday 6:45-7:05PM (Microsoft SharePoint Best Practices Booth)
Using Training for SharePoint Adoption

Monday 7:15-7:35PM (Microsoft SharePoint Best Practices Booth)
SharePoint Adoption for Devs

Tuesday 8:30-9:45AM  (Room B203)
Windows PowerShell, the Power of the Pipe: OSP382-INT (Interactive Discussion)
Windows, Microsoft Active Directory, SQL Server, Exchange and now SharePoint use a common administrative environment called PowerShell. This session covers the constructs of the new language, explores some of its nuances, and demonstrates how to use it to query and manipulate a SharePoint environment. Come see what PowerShell has over a traditional Console Application or VBScript. If there's time, we'll end with details on creating a simple custom PowerShell cmdlet.

Tuesday 10:45-11:05AM (Microsoft SharePoint Best Practices Booth)
Using Training for SharePoint Adoption

Tuesday 11:15-11:35AM (Microsoft SharePoint Best Practices Booth)
SharePoint Adoption for Devs

Repeated Wednesday 12:00-1:15PM (Tentative - Room B306)
Windows PowerShell, the Power of the Pipe OSP382-INT-R (Interactive Discussion)
Windows, Microsoft Active Directory, SQL Server, Exchange and now SharePoint use a common administrative environment called PowerShell. This session covers the constructs of the new language, explores some of its nuances, and demonstrates how to use it to query and manipulate a SharePoint environment. Come see what PowerShell has over a traditional Console Application or VBScript. If there's time, we'll end with details on creating a simple custom PowerShell cmdlet.

Wednesday 3:15-4:30PM (Room B211)
Creating Custom SharePoint Service Applications 101: OSP402 (Breakout Session)
Microsoft SharePoint 2010 includes a new facility for moving intensive processing from the Web Front End servers and onto load balanced application servers. A Service Application Farm can even be configured to allow other Farms to offload their process to a centralized and/or dedicated set of application servers. However, with over a dozen moving parts, Service Applications can be quite overwhelming to create. In this session, Todd simplifies the process so that everyone can be successful implementing a Service Application.

ToddThumb

<Todd />



Nov 07
Published: November 07, 2010 20:11 PM by  Todd Bleeker

A lot of software must be run from the context of a VM's local drive. For instance, Microsoft Office, SharePoint 2010 (including many of the pre-requisites), SharePoint Designer, SharePoint Workspace all require a local extraction just to name a few . That often means copying very large EXEs to the VM that subsequently extract to very large folders on the virtualized C: drive of the VM. After the install is complete, these large folders can be cleaned up to recoup the space but the entire process is time consuming and avoidable.

An alternative is to extract these EXEs on the physical drive of the parent operating system using the command syntax:
xxx.exe /extract:c:\NewFolder

Where xxx is the name of the executable and NewFolder is the destination for the extracted files (no spaces allowed).

Then download and install an ISO creating software like ISO Recorder v3.1 (http://isorecorder.alexfeinman.com/isorecorder.htm). Right-click the NewFolder containing the extracted content and create an ISO file. Using this technique, an entire media directory of ISOs can be created and used for each new VM.

To use the extracted EXE's ISO in the VM, just "insert" the ISO into the virtual DVD drive. Choose Media > DVD Drive > Insert Disk in Hyper-V VMs. The VM then treats the contents of the ISO as local files.

<Todd />



Aug 24
Published: August 24, 2010 14:08 PM by  Todd Bleeker

SharePoint Project Items (SPIs) are new to Visual Studio 2010.

Historically, organizing projects into folders containing files with a type affinity for one another was common. For example, developers often organize disparate CSS files into a styles folder; GIFs, JPGs, and PNGs into an images folder; and disparate JavaScript files into a scripts directory. The benefit is that, if another developer had to support someone else's work, he or she would be able to anticipate where assets of a common type would be found.

SPIs are effectively folders that hold a motley collection of files with a common purpose, rather than a common type. Each file may have a unique deployment location and a unique purpose, but they are organized into the SPI folder because they work together for a common purpose—typically to create some type of SharePoint platform extension. This would be akin to keeping the CSS, images, and JavaScript in a folder along with the .aspx page that consumes them. The SPI model definitely takes some getting used to, but it isn’t going to change any time soon—if ever. "Embrace and extend" is my motto.

The chart below lists all the SPIs along with the ways that they can be created. The first column shows the SPIs that can be created at the same time that a new SharePoint Project is created (along with the four SharePoint Projects that are not also SPIs). The second column shows the SPIs that can be added from the {ProjectRoot} of any SharePoint Project. The third column shows the SPIs that can be added from the context of another SPI; that doesn't imply that they will be created within the SPI folder, just that they are available in that context.

New SharePoint Project Item

Enjoy!

<Todd />



Aug 01

CKS_logo

The latest version of CKSDev includes:

  • Improved SPMetal SPI
  • Improved Full Trust Proxy SPI
  • New grouped content types and import function
  • New site columns and import function
  • New Fluent UI Visual web part SPI
  • Improvements to quick deploy
  • Under the cover code improvements
  • Improved import content type
  • Powershell added to the references tab

SharePoint Developer must have!

<Todd />



Jul 07
Published: July 07, 2010 07:07 AM by  Todd Bleeker

For years now I've used a simple technique for identifying public facing SharePoint 2003/2007 sites. I type http://[domain]/_layouts/images/CPVW.GIF into my browser which displays the Lorem ipsum image by default when SharePoint is installed:

CPVW Image to Detect a SharePoint Site

Since most people allow anonymous access to the images in the 60 Hive/12 Hive and there really isn't any reason to remove the default images (in fact it probably isn't supported), it is an easy litmus test to detect SharePoint.

However, I recently wanted to determine whether a site was SharePoint 2010 or not, but since visual upgrade is now a viable upgrade scenario and CPVW.GIF is not unique to the SharePoint 2010 I needed something new to look for. So, I poked around a bit and found that /_layouts/images/FGIMG.PNG isn't too hard to remember and it shows an equally unlikely image to be in a non-SharePoint 2010 site:

FGIMG[1]

Of course, if people block access to the images in the {SharePointRoot}, the image won't be found. However, SharePoint relies heavily on many of the sub-images in this particular PNG to display many of the out-of-the-box pages. The good news is that while this method isn't very sophisticated, it is super easy ("no assembly required") and it rarely turns up false positives.  ; )

Ian Morrish maintains a list of SharePoint Sites you can try it out on. Happy hunting!

<Todd />



Jul 02
Published: July 02, 2010 17:07 PM by  Todd Bleeker
The following was written in response to Andreas' post here:
http://blog.dynatrace.com/2009/01/11/the-wrong-way-to-iterate-through-sharepoint-splist-items/

Performant[1]

However, my comment on his post didn't come thru very well so I’m posting my response here instead.

Very rarely use a for index to iterate any collection in SharePoint. The SharePoint API will "do the right thing" (including using cache when appropriate, using good SQL query techniques, and the pre-creation of the next object in anticipation of the likely continued loop) in most circumstances when you use foreach for iteration instead. So, the code above would better be written as follows:

SPListItemCollection items =
  SPContext.Current.List.Items;
foreach(SPListItem item in items)
{
  htmlWriter.Write(item["Title"]);
}

Not only is this more performant but it is easier to read so general supportability will improve too. I'll leave the suspicious SPContext.Current.List and htmlWriter for someone else to take issue with.

Also retrieving the entire SPListItemCollection into memory can have it's own set of problems. Consider the situation where there are thousands of list items with dozens of columns. That will produce quite a memory footprint just to write out the title of each SPListItem.

I would highly recommend that you consider a CAML query (or LINQ to SharePoint which will generate a CAML query if using SharePoint 2010) and the GetItems method. The following example code will run in a Console App and it reads the SPListItem with a Title of "One" from the Tasks list in a Site Collection found at http://localhost. Even though this includes a sort, it is far more performant than the iteration originally demonstrated in this blog post.

using (SPSite siteCollection =
  new SPSite("
http://intranet"))
{
  SPWeb web = siteCollection.RootWeb;
  SPList list = web.Lists["Tasks"];

  if (null != list)
  {
    StringBuilder sb = new StringBuilder();

    sb.Append("<Where>")
      .Append("  <Eq>")
      .Append("    <FieldRef Name='Title' />")
      .Append("    <Value Type='Text'>One</Value>")
      .Append("  </Eq>")
      .Append("</Where>")
      .Append("<OrderBy>")
      .Append("  <FieldRef Name='Title' Ascending='TRUE' />")
      .Append("</OrderBy>");

    SPQuery qry = new SPQuery();
    qry.ViewFields = "<FieldRef Name='Title' />";
    qry.Query = sb.ToString();
    qry.ViewFieldsOnly = true;

    SPListItemCollection items = list.GetItems(qry);
    foreach (SPListItem item in items)
    {
      Console.WriteLine(item["Title"]);
    }
  }

  Console.WriteLine("---Done");
  Console.ReadLine();
}

For even more robust sample code, see the ViewFields entry in the SDK:
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spquery.viewfields.aspx

HTH,

<Todd />



Mar 18
Published: March 18, 2010 09:03 AM by  Todd Bleeker

My home town. Yeah!  : )

Let's talk about the SharePoint 2010 Ribbon...

SharePoint Saturday Twin Cities

Read the details on the SharePoint Saturday site.

<Todd />



Jan 26

SharePoint 2010 Logo This rocks! Microsoft has released a SharePoint 2010 Beta 2 evaluation VHD complete with everything including Visual Studio 2010 and Office 2010 installed and ready to go. Download this excellent developer resource here:

http://www.microsoft.com/downloads/details.aspx?FamilyID=0c51819b-3d40-435c-a103-a5481fe0a0d2

However, the post says that you'll need 50GB to install the two Hyper-V VMs. 50GB, Yikes! That said, my developer VM running Windows 7, SPF 2010 only, non-domain, non-standalone on top of a full SQL Server 2008 install is nearly 30GB.

Thank God for large external 2.5" drives.

<Todd />



Jan 17

CKS_logo[2]
Announcing CKS:DEV at http://cksdev.CodePlex.com

As you may know, Visual Studio 2010 has enhanced our ability to extend its functionality. Several SharePoint developer productivity extension projects have been merged into a single uber SharePoint Development Tools Edition of the Community Kit for SharePoint.

This excellent work is the collective effort of the following brilliant guys:

Matt Smith

Waldek Mastykarz

Wesley Hackett

Wouter van Vugt

While we have more ideas in the works, this initial release is already huge. It includes the following productivity aids (and more) categorized as follows...

Environment

  • SharePoint References - Adds a SharePoint tab to the Add Reference dialog.
  • Copy Assembly Name - Copies the assembly name of a SharePoint project onto the clipboard.
  • Sandbox Compile - Compiles the project against the SharePoint subset object model to ensure the code only uses subset OM features.

Exploration

  • View Feature Dependencies - Adds subnodes to the Feature node to drill down into feature dependencies.
  • View Feature Elements - Adds subnodes to the Feature node to drill down into feature element definitions. Also allows to open the XML definition of each element.
  • Activate / Deactivate Feature - Adds a content menu item to each feature node to enable and disable the feature on the current site, site collection, web application or farm.
  • List Site Columns - Browse site columns and view their properties.
  • List Themes - Browse themes and view their properties.
  • View Master Page and Page Layout Gallery - Adds the Master Page Gallery node which allows you to browse through Master Pages and Page Layouts. Additionally it allows you to view and edit the contents of the files from the Master Page Gallery.
  • List Web Parts - Browse Web Parts and view their properties.
  • Copy ID - Adds context menu items to various nodes to quick copy the unique ID value, for instance for features or content types.
  • Copy Web Part - Copies the .webpart definition to the clipboard to quickly paste a Web Part into a <AllUsersWebPart> node.
  • View List Event Receivers - Adds a subnode to the List node to drill down into Event Receivers associated with the List.
  • View Style Library - Adds the Style Library node which allows you to browse through the contents of the Style Library. Additionally it allows you to view and edit the contents of the files from the Style Library.
  • Get SPMetal Definition - Adds a menu item to lists and sites that allows you to generate the SPMetal definition for the given object.
  • Create Page Layout from Content Type - Adds a menu to content types that allows you to generate the contents of a Page Layout for the given Content Type.

Content

  • Sandboxed Visual Web Part - A visual Web Part that can be deployed as part of a sandboxed solution.
  • SP Metal Definition - Adds an SPMetal parameter XML file to the project and auto-generates the code based on that configuration using a Visual Studio Custom Tool (like resx files).
  • Custom Action Group - Simple XML based custom action group project item SPI.
  • Custom Action - Simple XML based custom action project item SPI.
  • Hide Custom Action - Simple XML based hide custom action project item SPI.
  • Delegate Control - Simple XML based delegate control project item SPI.
  • Console Application - A SharePoint Console Application template to easily create scratch applications.

Deployment

  • Quick Deploy Commands - Adds a submenu to the context menu of SharePoint projects that allow you to quickly deploy using any deployment configuration.
  • Auto Quick Deploy - If project-level properties are set, automatically copies deployed files into the SharePoint installation folder whenever a file is saved, or automatically copies deployed assemblies if the project is built.
  • Copy Assemblies - Copies all deployed assemblies to the relevant BIN folders and the Global Assembly Cache, for use as part of an X-Copy quick deploy.
  • Copy Files - Copies all deployed files into the SharePoint installation folder, for use as part of an X-Copy quick deploy.
  • Install Features - Installs the feature into the SharePoint feature storage, for use as part of an X-Copy quick deploy.
  • Upgrade Solution - Performs a solution upgrade instead of a retract / deploy combination.
  • Recreate Site - Deletes the site collection and recreates it with the same name, type and settings. Used to quickly create a new greenfield for testing.
  • Reset IIS - Resets the Internet Information Server which can be useful during testing of site definitions.
  • Reset Timer Service - Resets the SharePoint timer service.
  • Warm-up Site - Executes a HTTP request to the root of the current deployment site to warm it up after a IIS recycle.
  • Install Web Application Content - Copies Web Application specific content from the SharePoint installation folder into the IIS web application folders.
  • Run PowerShell Script - Executes PowerShell script(s)

Of course, we'd love to hear what you'd like to see us include in the next release.

<Todd />

PS: This is so big, I thought it was worthy of an inaugural tweet!



 ‭(Hidden)‬ Style and Script

 ‭(Hidden)‬ Admin Links