Saturday 28 February 2009

Windows Live Writer for Blogger Rocks!

Thanks to the Mossman (Randy Drisgill) for testing and recommending Windows Live Writer for posting to your blog. After a few years of using the Blogger editor with it’s tiny editor window, limited functionality, and ever-changing formatting, I'm a complete Live Writer convert after two posts. 

Live Writer initially set me up with a new Live Spaces account so once I figured out how to point it at Blogger instead I was rolling. First point of joy: a big, resizable editor! I love how easy it is insert tables and save a draft locally or to your blogging engine of choice. It even sucks down your existing Blogger labels, making the transition that much easier.

I publish using the Arial font and normally change that manually in the Blogger editor. Live Writer defaulted me to Verdana but the font didn’t make its way across to my first draft post. For this post, I changed the font first before my first publish action the font change was propagated. 

I also used to have a footer inserted automatically into each of my blog posts—the Blogger editor would do this for me when I created a new post. Live Writer misses that but a minor complaint; it would be nice if Live Writer offered a template function or something but I see there is an Add a plug-in link so maybe someone’s writing/has written something like that. I could probably also hack my blog template.

Live Writer’s preview function is better than Blogger’s by a mile: it actually previews the post in the blog instead of in some half-way viewer. The source view is also surprisingly clean and readable for a Microsoft product.

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?!?

 

Sunday 22 February 2009

Copying Hyper-V Disks

Copying virtual disks is something I do quite a lot of: I start with a base VM and then build out from there on distinct copies. Snapshots and differencing disks are supposed do this but my trust level isn't quite there yet ;-)
VPC 2007 makes it easy to find out where your disks live, pick them up, shift them around, and build new virtual machines around them. For some reason this doesn't seem like it's quite that simple with Hyper-V. Maybe that's because I was copying too much stuff (the snapshots folder and the Virtual Machines folder) and then creating a new VM pointing at the same location... dunno but it got messy yesterday with the copied disk and new VM never getting to the POST stage.

In an effort to remember how I got it right today, here's the very simple deal:
  • Locate the .vhd file to be copied
  • Create a new folder to contain the copy
  • Copy the .vhd file to the new folder
  • Create a new virtual machine that also lives in the same new folder and point it to the copied disk
Hmm... seems just like it used to with VPC!!!


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Localizing MOSS Webparts Alternative

In the past I've blogged about one way to localize your web parts using really cool and surprisingly simple ASP.NET 2.0 localization techniques. 

Today I stumbled across an old but extremely thorough post on the same subject by Mikhail Dikov; Mikhail's approach deploys .resx files directly to the file system instead of satellite assemblies and lets the platform handle the bulk of the work involved--until you've stepped in to create a custom job definition. 

While my solution isn't necessarily the correct SharePoint way of handling resources I still think it's beautiful in its simplicity and will be familiar to any ASP.NET developer crossing the line into WSS/MOSS. The application of my suggested approach will depend somewhat on your solution structure but I'll always believe less code to build and maintain is a good thing.


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Saturday 21 February 2009

SharePoint User Group Presentation Web Cast Now Online!

If you weren't able to make it to part one of the presentation I gave at last week's Perth SharePoint User Group meeting, a web cast is now showing on a web tube near you. The subject matter is all about how we build internet-facing web sites on the MOSS platform at Tourism Western Australia and some of the big lessons we've learned along the way.
If you were able to attend I'd love to get your feedback--feel free to post a comment below.

Stay tuned for part two--all about the environment bits--next month!!


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Wednesday 18 February 2009

IE8 Browser Share

With the IE8 launch pending, here are our latest (Q4 2008) IE8 stats from the Tourism WA eMarkeplace sites. 

I'm curious to see how quickly users adopt the next Internet Explorer  release and how it affects the current IE browser share breakdown. The number of visitors on IE5.x, for instance, is negligible; should we expect IE6 to be squeezed out as well or is it more sensible to think IE6 users aren't using Windows Update and current IE7 users will end up on IE8 before we see any drops in the IE6 share? Who knows--should be interesting though!



Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Tuesday 17 February 2009

Silverlight vs Flash Penetration

Following on from the previous Silverlight penetration stats I posted last year, the latest (Q4 2008) figures are now in! 
15% of our visitors across all of the Tourism eMarketplace sites have some version of the Silverlight plugin installed (Omniture doesn't say which version). The internet average has increased since October and is now sitting at 21.5%--a reasonable gain. 

The ultimate contest is with Flash, however, and our stats are still telling us all site visitors have a version of the Flash player installed.



Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Wednesday 11 February 2009

Pinstripes don't go with pinstripes

Hey dudes--I'm not sure what sort of misguided, fading star of a metro sexual dreamt this one up but a vast number of you are committing a huge fashion faux pas. I'm no fashionista, actually I'm a computer geek, but I know a problem when I see a problem and this one's right up there with pink men's shirts. Let's admit it, if we don't get this sorted out internally, the women will sort it for us and that's rarely helpful. 

So, pinstripes: two simple rules apply. 

Rule # 1 is simple: pinstripe suits (or pants and jackets) are for sales dicks and aspirational middle managers. Only. Don't wear pinstripes unless you want the world to know you're a wanker.

Rule # 2 is a bit tougher to grasp but it's the most important of the two rules: never, ever (ever!!!) wear pinstriped pants and a pinstriped shirt, it just doesn't work unless you're going for the clown look. 

Now let's say you've recognised the error of your ways re. rule # 1 but you unknowingly invested in a wardrobe of pinstriped pants and suits and whatnot; men aren't women--there's no point in throwing away good clothes so you'll need to wind down slowly and rebuild. That's perfectly okay but in this case it becomes all the more important to heed rule # 2. Go for your life with the pinstripes in the jacket and pants department but ease back with the shirt pinstripes--don't go for the striped shirt at all, actually. Solid, bright colours on top are your only option--even pink is preferable. If you're still feeling a bit lost, go for the french cuffs and a good tie (with stripes, even). Sales dicks, you're okay in pinstripes but the same applies as far as rule # 2 goes.

By the way, in addition to the ladies, you've also really got to watch mothers and epileptics with this one. The root of the problem lies in the repetition and balance of it all. Stripes with unmatched stripes (or checks or a stripey weave--think herringbone) are too busy. Varying stripe width or direction is no excuse. And no, this is not about matching--think more about contrast when it comes to textures.

I'm hoping this is an isolated Perth thing and the men of this city somehow mixed up jacket vs shirt concepts. Either way, let's get you guys sorted out and move on.


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Tuesday 10 February 2009

How to Clear Your Browser Cache 101

If you're a web developer you should really know how to do this by now; if not, I'll let you off the hook...

Quick and easy--always try this first:
CTRL-F5 (note, I didn't say SHIFT-F5 and I didn't say F5 all by all itself). If this doesn't work, proceed.

Internet Explorer 7 & 8
  1. Tools -> Internet Options
  2. General tab, Browsing history section, Delete... button
  3. Temporary Internet Files button or Delete all... button
While you're in here, you may also want to consider changing your browser's caching behaviour. To do so, progress to step 2, above, but instead of clicking the Delete... button, click the Settings button. Change the 'Check for newer versions of stored pages' to 'Every time I visit the web page'. Note this may affect the time it takes to load web pages initially.

Clearing your cache this way clears content for all sites you've visited, which can be a hassle if you're only having problems with a site in development or a single site and you use this browser for day-to-day browsing. If you want a more refined, more accessible mechanism for clearing your browser cache, install the free IE Developer Toolbar. Last I heard, the next version will be built in to IE8 but, meanwhile, it Firebug's poor, uneducated, inbred third cousin for IE6/7 and it generally does the trick. High, high hopes for the IE8 version...

To clear your cache using the IE Developer Toolbar, follow these steps:
  1. Install the toolbar and make it visible using the little arrow icon
  2. Browse to the site you're struggling with
  3. From the toolbar menu, select Cache -> Clear Browser Cache for This Domain... and say yes
You can also toggle the Always Refresh from Server option from this menu and clear session cookies for the current domain.

Firefox
  1. Tools -> Options
  2. Network tab, cache section, Clear Now button
Alternatively, install the free Firefox Web Developer Toolbar and follow these steps:
  1. Make sure the toolbar is displayed (View -> Toolbars -> Web Developer Toolbar)
  2. Click the Miscellaneous button
  3. Clear Private Data -> Cache
Or, after completing step 2, select Clear Private Data -> All Private Data and include cookies and authenticated sessions (session cookies).

[Update: don't forget to also clear your Flash local storage cache.]


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com
 

How We Do WCM at Tourism WA: I'm Speaking at the Perth SharePoint Users Group Meeting this Month!

I'll be speaking at the Perth SharePoint User Group this month on the subject of all things westernaustralia.com (as far as MOSS 2007 and WCM go). I know a fair number of you out there but if you're in Perth and have a chance to come along, I'd love to meeting you in person. This is the first of two presentations (it's also my first ever user group presentation...) and will be somewhat dev focused with a lot of explanation around how we things and why we do them the way we do. If you're considering a move to MOSS for your internet site (or an intranet), this session is for you.

My official description of the presentation goes a little something like this:

"westernaustralia.com was one of the first public-facing MOSS 2007-based internet sites launched in Australia and is billed as the Western Australia Tourism Commission’s flagship web site. Two years on and thirty MCMS 2002-based tourism sites are now being migrated to the MOSS 2007 platform. In the first segment of this two part presentation, Michael Hanes, the Development Coordinator/Tech Lead at Tourism WA, talks about how wa.com was built in 2006 and how that experience is contributing to the way the remaining sites are being rolled out today. In addition to touching on the MCMS migration process and the MOSS 2007 beta program, Michael will also present a whirlwind tour of the team structure in place at Tourism, the Sharepoint solution structure, deployment, configuration control, custom user controls/web controls and web parts vs OOB, the software side to performance, search and SEO."

You can find out more and download the presentation after the event here. We may also be podcasting the event but let's wait and see how that goes ;-)


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Friday 6 February 2009

SQL Server Results to CSV

I'm sure all you DBA types out there have an elegant, simple mechanism for saving results to a .csv file but I'm not a DBA and get frustrated trying to find the best way to do this every time I'm faced with a "reporting" task. I normally run my query as text, save the results as a .csv and then File->Open in Excel before trying to tell Excel how the data is delimited. This works well in some cases but it's long winded and the bugly .csv wizard thing always seems to split on commas even when I tell it not to (that's .csv for you, I guess!).

Well, no more! I found a gem of a little tool today for doing exactly what I need and it's simple and doesn't get in the way. The UI even works the way I'd write a UI for this kind of tool!

http://codecorner.tigernews.co.uk/codecorner/SQL2000selecttocsvutility.html

There's no installer so run the .exe and from there in it's just like a normal Visual Studio database connection picker thing: specify the server name, the database name, supply your credentials. Once that's done, paste in a query, and specify the output file and you're done! It even converts bit fields to true/false strings!


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com

Sharepoint Administration Toolkit 3.0 and spdiag now available

The Sharepoint Administration Toolkit 3.0 is now available in 32-bit and 64-bit flavours. This release add the Sharepoint Diagnostics Tool (spdiag) for collecting performance stats from disparate sources and helping out with the troubleshooting process. An spdiag user guide has also been made available.


Custom-Built Microsoft Office SharePoint Server 2007 Branded Sites and Webpart Development - info@mediawole.com