Joel's SharePoint Architect Blog

SharePoint 2010, MOSS & WSS Tips and Consultancy Tales

Subscribe Subscribe  View Joel Jeffery's profile on LinkedIn
joelblogs.co.uk | joelj.co.uk | joeljeffery.co.uk | jfdiphoenix.co.uk

Archive for October, 2008

Colour Picker Vista Sidebar Gadget

If you develop web applications chances are you spend some of your time hunting for hex values of colours to use in your pages. There are two gadgets for the Vista Sidebar that make this task a lot easier.

Colour Picker Gadget from Microsoft LabsFirst, we have the visually easy-on-the-eye Colour Picker from Microsoft Live Labs.

Colour Picker lets you key in a variety of hex values for your palette, or search for published ones online on the Colour Lovers community website – without leaving the pretty Gadget UI. Very nice 3D effects as you use a colour pipette tool to select the colour you want to work with.

However, Colour Picker gives you no way of mixing your own shades of Red, Blue and Green together. Seems like an odd omission.

Colour Picker Gadget from Mike Holden

A delegate from one of the SharePoint classes I run, Mike Holden from Cardium Systems, came up with his own Vista Gadget, spookily enough also called “Colour Picker.”

Mike’s offering – not yet on the Windows Live Gallery, but available here. Simply adjust the sliders ‘til you get your perfect colour, then you can copy the hex value either straight into your HTML code, or why not use it in conjunction with Microsoft’s Colour Picker to make the perfect colour palette?

If you’re particularly proud of your colour combinations, I guess you could then go as far as to manually upload them to the Colour Lovers community.

So, thanks Mike for making this useful Sidebar Gadget freely available!

*** UPDATE ***

Mike’s Colour Picker SideBar gadget is now available from the Windows Live Gallery

Technorati Tags: Colour Picker, Gadget, Palette, Sidebar, Vista

My good friend and colleague Cédric Oster has an excellent blog on his experiences with SharePoint 2007, InfoPath 2007 and more. Cédric is a SharePoint consultant of quite some standing.

You can read Cédric’s SharePoint Blog for his latest writing. I’ve just read his piece on SharePoint database growth rates, and how to deal with them. Very sound advice – Cédric writes:

“To free up space manually: after a full backup you can shrink and truncate the log file to any size you need by doing the following:

  • Open SQL Server Management Studio
  • Select the database you want to shrink the log file (e.g. MOSS_Intranet_Content)
  • Click the “New Query” button
  • and run the following command:
    dbcc shrinkfile (<LOGICAL LOG FILE NAME>,<SIZE IN MB>,truncateonly)

for example: dbcc shrinkfile (MOSS_Intranet_Content,2,truncateonly)

This applies to the Content Databases but also the Configuration and Search Databases.”

I should point out that this principle also applies to SQL Server development in general. If you’re developing using SQL Server, very often backup, restore and maintenance can be all too easily forgotten. The best side effect of which is that you end up with an enormous log file, or performance would eventually be degraded. The worst side effect could be that you might not have a database backup and maintenance schedule, which could put your data at risk.

Microsoft System Center Data Protection ManagerHere’s what MSDN has to say about DBCC SHRINKFILE. Similarly, I should point you at Joel Oleson’s Blog – another noteworthy SharePoint blogger. He has an excellent article on Best Practice for SharePoint Backups.

I would side with Joel here, not just because we share a name, but because I, too, really rate Microsoft System Center Data Protection Manager as the best mechanism for WSS and MOSS backups. Here’s an informative webcast from Microsoft on backing up MOSS with DPM. This may well become a topic for a future blog entry for me.

Technorati Tags: Backup, DBCC, DPM, Microsoft, MOSS, SharePoint, SharePoint Administration, SHRINKFILE, SQL Server, System Center, WSS

Here is the second in a series of impromptu hints and pointers for Microsoft Office SharePoint Server 2007.

InfoPath 2007InfoPath. Have you used it? You’re not still using Microsoft Word and form fields, are you? In addition to being a great alternative to locked Word documents for departmental form filling, InfoPath is a great development platform.

You can use InfoPath forms for a number of tasks: capturing form data and saving it as a document (of course); uploading into SharePoint to start a workflow; using custom InfoPath forms to allow admins to configure reusable workflows; rendering in a browser via ASP.NET.

Which brings us to:

Popular Misconception #1 – “InfoPath forms need InfoPath installed on the desktop. We don’t have control over what’s installed on our users’ PCs, so we can’t use InfoPath.”

Admittedly, the user experience is better when InfoPath forms are opened in InfoPath Client 2007, but you can publish a form with a high degree of fidelity either through a browser-enabled SharePoint Document Library, or on a custom ASP.NET page in MOSS using the <XmlFormView /> control.

[Gotcha: the Document Library containing the browser-enabled form and your custom ASP.NET page have to live within the same Site Collection! Here is a great article on the MSDN site detailing the steps to use the XmlFormView control.]

Popular Misconception #2 - “I can publish an InfoPath form as browser-enabled, and it will look and feel just like InfoPath Client.”

Well, no. It’s good, but it’s not *that* good. The rendering is pretty faithful, but there are some features that are just incompatible. There are others features that behave quite differently in the browser-enabled version.

The images below show how the a simple for can render in both a browser and the Office Client, left and right respectively.

InfoPath Form in a Browser - Click to zoom!InfoPath Form in a Office Client - Click to zoom!

Some field types available in the Office Client just aren’t available in (this release) of the browser-enabled forms. For instance, instead of Combo Box fields, you have to use List Box fields. Instead of Rich Text fields, you have to use multi-line text boxes. It can’t be long before this gap is closed. With the current crop of AJAX frameworks (Microsoft, ExtJS, others) these controls should be able to be represented. Maybe next version.

There are other differences too: browser-enabled forms with complex logic, multiple data sources, business logic events and a raft of other conditions can cause your form to require a postback during editing. This is all handled automatically, but it can still cause a downgraded user experience, and increased server load.

[Gotcha: You can’t publish InfoPath 2003 forms as a browser-enabled, Office Forms Server form! InfoPath 2003 uses a COM APIs, whereas InfoPath 2007 and Office Forms Server 2007 use .NET APIs.]

Xsn file opened as a Cab - Click to zoom!Popular Misconception #3 - “InfoPath forms are just Xml. I can create them in Notepad if I wanted to.”

“Close,” as Roy Walker would say, “but not right.” The principle is that InfoPath forms are defined as Xml. When you create one and save it, you get an .xsn file. As with much in the world of WSS and MOSS, these files are re-purposed and re-named .cab files. Here’s something you can do: create a simple InfoPath form, save it as an .xsn file and rename it – changing the extension to .cab.

When you double click it, Windows Explorer should open up the .cab and show you the contents.

Typically, an .xsn file you create will contain by default a few different Xml files:

File TypePurpose
manifest.xsfThe core InfoPath form definition file. Defines the fields, repeating blocks and controls used in your form.
myschema.xsdXml Schema Definition file that defines the shape of your Xml data. In the case of InfoPath forms that consume web services, this is generated from the WSDL.
sampledata.xmlSpecifies what the default values should be for each of the fields on your form.
template.xmlThe Xml document that InfoPath will populate with data and submit.
view1.xslAn Xslt file describing how to render the form. Incidentally, forms are rendered, even in the InfoPath Client, as Html.

It will also contain any media files that you embed in your form, such as images and logos, and any further view*.xsl files specifying additional views on your form. If you have .NET business logic in your form, the resulting .NET assemblies will also be included in the archive.

Popular Misconception #4 - “I can only create InfoPath forms in the designer of Office InfoPath Client.”

Visual Studio Tools for Office 2005 and Visual Studio 2008 form a great environment for developing InfoPath forms. This gives us two choices:

  • A combination of InfoPath Client 2007 designer to design the form and Visual Studio Tools for Applications (VSTA) to create .NET business logic
  • Visual Studio 2005/8 with Visual Studio Tools for
    Office (VSTO)

The picture below shows the a similar form being designed in both environments.

InfoPath Forms development environments - Click to zoom!

There are pros and cons with each method.

  • Visual Studio 2005/8 requires a license! If you aren’t developing other .NET projects, VSTA and InfoPath Client provide a robust and flexible development experience.
  • Visual Studio 2005/8 with VSTO uses its own rendering engine in the designer – there are some discrepancies between what gets rendered in each. The InfoPath Client offers the more faithful reproduction during design.
  • The premium development environment is still Visual Studio 2005/8. VSTO and Visual Studio integration is very close indeed. With InfoPath Client and VSTA you are using two separate applications.

For the hardened developer, Visual Studio 2005/8 will be the better of the two choices.

Here you can read Microsoft’s Andy Whitechapel discussing the differences between VSTA and VSTO.

Happy coding!

Technorati Tags: InfoPath, Microsoft, MOSS, SharePoint Architecture, VSTA, VSTO, XSN

Software Development – Pragmatic Agility

I’ve been thinking about what makes JFDI Phoenix different from other Microsoft Custom Software Development houses. We tend to be a bunch of guys who have been around the block a few times, seen some front-line action, so to speak. Between us we must have in depth experience of all of the mainstream, and some of the not-so-mainstream software development methodologies.

When a project is going swimmingly, it’s easy for our industry to say “that’s methodology X” or “that’s process Y” making the difference. The unifying fact between all these ways of working – agile, Scrum, XP, Rational Unified Process (RUP), Prince or even Waterfall, is that when the process breaks down – when the project deviates from the straight and narrow – we have recourse to one thing: send in the paratroopers. Parachute in the IT heroes to bring the project back on track.

If you’ve been in the industry long enough, chances are you’ve worked on a project where that’s happened. Where the IT flying squad has saved your bacon. Or even where you’ve been that paratrooper. Well, I can honestly say, to work at JFDI Phoenix you have to have done that tour of duty, earned those stripes.

You can read more about our application development philosophy here.

Technorati Tags: Agile, Methodology, Microsoft Application Development, Microsoft Architecture, Process

Microsoft Technical Due Diligence

One of the things I keep getting involved with over the years is Technical Due Diligence on the Microsoft stack – although never exclusively Microsoft.

One thing that I keep being reminded of is a key difference in how I do it to how some of the other firms do it.

When you’re asked by a Venture Capitalist firm to perform a technical audit on a prospective merger or acquisition, and kick the tyres of any software products written, I always find the best source of information is the people who wrote it. Go and ask, but be nice!

You’re going to be asking people who really care about their software to tell you where the weaknesses lie. If you want to do this successfully, you need to be nice. Personable. Humble. At previous jobs, I’ve been brought in after other consultants trampled over people in their size 12s. This is a tough position to recover from.

Anyway – I’ve jotted down what I think makes us different at JFDI Phoenix. You can see our Technical Due Diligence and IT Advisory Services, and hopefully see what I mean.

Technorati Tags: IT Advisory Service, ITAS, Microsoft, Technical Due Diligence, Technical Quality Assurance