in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

echef

From the cluttered (and clustered) brain of Josef Nielsen... A great place for Food, Friends, and... uh... SharePoint of course!

SharePoint Connections - The Real Day 2

I started off by trying out Veli-Matti Vanamo's Introduction to Web Part Development presentation.  He was actually a substitute for his co-worker, Emer McKenna.  The majority of the content was from their new book to be released in Dec, Microsoft SharePoint 2007 Technologies: Planning, Design and Implementation.

While the majority of the presentation was slide deck, there was still some good information to be had there.  A few notes from this session I took were as follows:

Web part management is almost identical between SharePoint and ASP.Net 2.0.  The two primary differences are that in SharePoint, you can add the Microsoft.SharePoint.dll reference to get additional functionality, and when using SharePoint, the webpartmanager is overridden by the spwebpartmanager, to apply SharePoint specific details to the rendering.

There are three acceptable types of web parts:

  1. The ASP.Net 2.0 Web part, which uses the System.Web.dll for it's inheritance, and is compatibility with both ASP.Net Web Part Zones, and SharePoint/WSS 3.0 Web Part Zones.  These web parts are usually labeled with a .webpart extension.
  2. The WSS 2.0 web part, which uses the Microsoft.SharePoint.dll library for its inheritance, and is a deprecated method for creating web parts.  The compatibility is still there for moving web parts from WSS 2.0 to WSS 3.0.  These web parts have a .dwp extension.
  3. The Hybrid web part, which uses both the above mentioned dll libraries for inheritance, and is specific to WSS 3.0/MOSS.  This allows for all the new ASP.Net 2.0 functionality, and provides access to the personalization objects, as well as the SharePoint Object model.  This is also required for creating asynchronous functionality in a web part.

There are three opportunities to execute code prior to the generally used "body" of a web part , which is the Render() method.  These are (in order): OnInit(), OnLoad(), and OnPreRender().  They can all be overridden to allow pre-execution code to be run.

The Visual Studio SDK (2005) contains a great tool for retrieveing Stong Names for assemblies, called sn.exe.  The usage is sn.exe -t mylibrary.dll, and the returned value is just the strong name of the library.

There are three things needed to debug web parts.  1) You must elevate your privileges above WSS_Minimal, as it does not allow debugging.  2) Set Debug = true in the Web.config.  3) Set CustomErrors = off in the Web.config.

The interesting thing I noticed was that the more slide deck there was in presentations, the more notes I took.  The more example/demo work that was done (and the more engaging a speaker was) the less notes I took. :)  My biggest wish (and comment on all my comment cards) is that there was a way to Webinar record the presentations, and pass those out, rather than just a slide deck.  A lot more value there , I think.

The next presentation I went to was Todd Baginski's SharePoint Object Model demo.  I got an opportunity to hang out with Todd for a bit at Andrew Connell's after hours party on Tuesday, and he's a great guy.  Comes across as very approachable and down to earth, yet is quite a smart guy.  This showed in his presentation too.

His presentation was really almost 100% demo... In fact I don't even remember what was on the slide or two he showed us early on, except maybe the title of his demo.  He used most of his time showing us various methods that expose and allow manipulation of SharePoint objects.  He's written a great little app called the MOSS 2007 Toolkit that he promised he'd hand out by USB to anyone who wanted a copy.  After about 15 minutes of the demo, he asked how many people were going to want a copy of the code, and a couple hundred hands went up.  He paused for a minute then decided that his poor USB key would probably get worn out from all those laptops, and announced that he'd make it available on his blog site soon (including the source code) instead.  UPDATE: He posted it this morning and it can be downloaded from here. (11/8/07//jn)

It is basically a winform app that you run on a SharePoint server that connects to the object model and allows you to both see and modify various settings and objects.  At a high level (there were TONS of actions and vies for each of these), these are the main areas the tool covers, and he showed:

  • Site Metadata
  • Site Details
  • Create/Delete a Site
  • Modify Top or Quick Navigation Bars
  • Modify USers and Groups
  • Add/Remove/Modify List items (including Document Libraries)

The funny part was that after ending with a few minutes for questions, a gaggle of guys surrounded Todd, and even when he was packing up so Dustin could set up Mac (yes, he presented from a Mac), he was still surrounded.  As he left the auditorium, he was followed by an entourage of guys still asking questions.  Definitely a popular presentation.

After that, I couldn't resist hanging around for Dustin Miller's SharePoint Designer, it's for Developers Too presentation.  This is very similar to the infamous "The Wave" presentation he gave at TechEd this year.  I was waiting to see if he'd go in to his pre-session warm up and get the crowd on their feet, but he had a bit of technical difficulty getting setup (he claims it was NOT the Mac), and didn't bother with it, although there was one guy up front who decided to do the wave anyways... A wave of 1 is not very impressive :)

Dustin is a very engaging speaker who never losses an opportunity to drop in a joke or a bad pun.  I think I counted at least three Ghostbusters quotes during the hour plus that his demo ran.  He also is always full of great advice on how to get things done, like how to get away with taking a nap in your office.  Apparently the trick is to drop a bunch of papers on the floor first, then rest you head in you arm over the edge of your desk.  That way if someone walks in, you can wake up and say "Oh, I was just picking up these papers".  Never a dull moment in this session :)

Seriously though, Dustin used the Data Viewer web part to show just how easy and powerful both it and SharePoint Designer could be.  He showed some list linking, which was fairly straight forward.  He then got in to some fun stuff... He grabbed the URL from a Google news search result and create a link to it from the web page in SPD, pushing values from the data viewer web part in to the web call parameters (specifically the "q" parameter) for Google to allow you to push a field value straight out to Google news for a search, dynamically.

He then showed a more complex example of the same thing, by deconstructing the results URL for Yahoo Weather, and showing how we could utilize it in SDP and push values out to it, returning an RSS feed result and displaying it exactly how we want to in a data viewer web part, without any manual XSLT work.  He even included a weather image from the feed.  Cool stuff.

He also showed how in todays high security, paranoid world, as a responsible technology expert, you must always click "yes" on those annoying security pop-ups "Are you sure you want to..." and "Warning...".  Definitely engaging.  I'll have to see if I can make it to his Data Viewer Deep dive... It's at the same time as about 3 other good one's I'd like to hit, so we'll see.

This ended up being a lot longer than I had anticipated, but then it is a whole days worth of information, jammed on to one blog entry ;)   

Comments

 

University Update-Yahoo-SharePoint Connections - The Real Day 2 said:

Pingback from  University Update-Yahoo-SharePoint Connections - The Real Day 2

November 8, 2007 1:57 PM

About josef.nielsen

I'm a long time computer nerd, living and loving technology wherever I can find it. I've recently shifted from a focus in MS SQL server, MSCS Clustering, and High Availability Engineering to focus on collaboration technologies, including SharePoint 2007. I recently moved from my long-time home in Seattle Washington to Salt Lake City.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts