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

Posts Tagged ‘Microsoft’

A recurring question among my students and some of my clients is the mysterious relationship between WSS 3.0 and MOSS 2007: when might you choose one product over the other?

Popular Misconception #1: “I can’t have MOSS and WSS. They’re mutually exclusive.”

Simply put, MOSS is a superset of WSS.

WSS 3.0 – Windows SharePoint Server – is the core site provisioning engine and development framework which is licensed at no further cost if you have Windows Server 2003/2008.

WSS provides the main site provisioning functionality – the engine for turning templates and definitions into a new instance of a site. This allows you as an administrator to download, design or buy a site definition or template, and then create sites based on those on demand.

WSS also provides the feature framework. This allows developers to package up reusable components as units called Features. As an administrator, you can once again download, design or buy suitable Features from various different vendors. Features wrap up things such as Web Parts – the composable on-screen unit of functionality that you can rearrange and place on different WSS pages within a site.

There are a number of brilliant features that WSS has out of the box. Wiki, Blog, Document Libraries, Calendars, Tasks and Lists to name but a few.

From a developer perspective, WSS is ASP.NET with a whole load of useful framework add-ons (such as being able to create Lists and Libraries without writing code) that enables me to deliver useful collaborative web applications quicker and more reliably.

Microsoft Office SharePoint Server 2007 – MOSS – on the other hand, is the product with a separate SKU and price tag. It can cost a few thousand per server for minimal functionality, all the way up to £30K and above for other features such as an public-facing Internet site.

MOSS, at its heart, is just a collection of really cool features. Some more valuable than others:

Business Data Catalog – this allows a “zero coding” solution to republish existing line of business apps (Siebel, SAP, etc – or even any home-grown app) and expose it in new ways through SharePoint. It also allows you to configure how you’d like to make that data searchable.

Excel Services – everything from Excel Web Access :- server controlled, HTML only, browser friendly, read only access to your Document Library of corporate spreadsheets; through to Excel Web Services:- a fantastic way of scalably running business logic tied up in spreadsheets on the server, even using “grid” computing (the HPC initiative from Microsoft).

InfoPath Forms Server – InfoPath forms rendered as ASPX (HTML) in the browser with pretty high fidelity. InfoPath is a great environment for less technical users to create extremely functional forms using the InfoPath Office 2007 client. It’s also a great platform for developers to use to via Visual Studio 2008. These can be used for data capture, interacting with workflow and driving business processes.

Records Center – a fully featured records management server complete with a routing engine for documents. You only need one of these in your organisation (unless your taxonomy demands different) but documents can be sent to it from an WSS/MOSS server on your estate.

My Sites – Web 2.0 features for the Enterprise; lets users create a profile page for themselves that can make visible a user’s colleagues, documents they’ve created, free-busy information and a whole load more.

Audiences – You can also target content to specific audiences, showing different content for different types of user. An audience is a set of rules that define things like “member of the Sales group in AD” or “users with ‘Marketing’ in their job title”. A timed job turns these rules into lists of real people, and the Web Part framework allows you to specify target audiences for content.

The list of features goes on…

Popular Misconception #2: “I only need one feature from MOSS, so I need to buy it all.”

Only some of these features are so ground breaking that you couldn’t build them yourself. In theory, you could write them as Features yourself on top of WSS 3.0 – but I find that Microsoft has more Research & Development dollars than I have, so it often makes sense to go with MOSS features where appropriate.

If you genuinely only require a subset of these features, then it comes down to a cost-benefit analysis. If you could write a feature yourself for substantially less than the cost of MOSS, it may be worthwhile to build the functionality you require as a bespoke, custom software development.

Popular Misconception #3: “If I need any degree of functionality out of the box, I’ve got to go with MOSS.”

While you’re investigating, it’s worth checking out a few giveaways from Microsoft:

The Core Application templates from Microsoft -
http://www.microsoft.com/downloads/details.aspx?familyid=C1039E13-94DA-4D7D-8CAE-3B96FA5A4045&displaylang=en

The “Fantastic Forty” / “Fantastic 40” WSS templates from Microsoft -
http://technet.microsoft.com/en-us/windowsserver/sharepoint/bb407286.aspx

The “Splendid Seven” / “Splendid 7” MOSS templates from Microsoft -

http://office.microsoft.com/en-us/sharepointserver/HA102147321033.aspx

These give you a lot of functionality; some require WSS only, some require MOSS. A couple of screenshots follow.

WSS Business Performance Reporting Site Template - Click to Zoom!MOSS Sales Account Manager Template - Click to Zoom!
Business Performance Reporting template in WSSSales Account Manager My Site Template in MOSS

If you’d like to see some of these in action, the Fantastic Forty are installed live at www.wssdemo.com for you to play with.

Technorati Tags: Fantastic 40, Fantastic Forty, Features, Microsoft, MOSS, SharePoint, SharePoint Architecture, Splendid 7, Splendid Seven, WSS

SharePoint 2007 Experiences from the Field

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

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

Mon, 12 Nov 2007 18:22:35 GMT

It’s been a while since I last saw Pat presenting on SOA. He hasn’t lost the magic. But he has lost a ton of weight. Or gained a lot of height or something! Pat – well done mate!

Continuing his Metropolis series of SOA talks, Pat’s theme this time is around composability and interchangeability of Services.

A Short History Lesson

The European System of Manufacturing – before 1800s

The build of complicated objects required each part to be manually lathed or turned in such a way that no two craftsmen produced the same precise part; no two (otherwise identical) parts produced by the same craftsmen were identical enough to be interchanged. To scale up, more craftsmen were required. When things broke down with the goods being built, replacement parts would require "manual fitting" to make them work. Variance in the manufacture of parts caused unscalable systems.

The American System of Manufacturing – circa 1800s

Due to a lack of manual labour and engineers, the Americans adopted a mechanised approach of manufacture. Heavy (steam) power tooling was used, which saved labour. However, these were not automated, and variation in parts produced during manufacture was inevitable. Manual fitting was still required; machinery just got us to that point quicker.

The US Armoury System of Manufacturing – mid 1800s

Le Blanc, Jefferson, Whitney hypothesised a system of interchangeable parts, which depended upon the manufacture of specific parts being reproducible, predictable, and with tight tolerances to variation. Notably, Whitney won a contract with the US military to manufacture arms using this method; he failed because he was unable to eliminate the requirement for manual fitting – i.e. the methods were too hard to produce identical, interchangeable parts to their rifles.

John H. Hall, circa 1820s

John H. Hall developed accurate machines to build interchangeable parts in gun manufacture. His machines were expensively hand crafted to accurately reproduce, time and again, the same parts down to a very fine tolerance in variation. Ultimately Hall was to fail as he lacked the funds to realise economies of scale.

Sewing Machines – circa 1870s

Wheeler and Wheeler sewing machines produced 25,000 machines in 1860. By 1876 this figure rose to 108,000. They achieved this by using machines to make their products. Brown and Sharp also adopted this method.

The Pope Bicycle – circa 1890

Parts built by Sharps Rifle Company using machines that worked from reusable, accurate templates.

Why is this important?

This takes the narrative from European, hand-finished manufacture, all the way through to the Model T Ford, via the US Armoury and the Pope bicycle.

Model T Ford

Ford was inspired by mass production of meat. Butchers – working in what Pat calls "disassembly plants" – would stand in front of a conveyor of meat carcasses, and apply the meat cleaver to each one without having to move from carcass to carcass. What impressed Ford was the efficiency with which the production line operated. The "operator" never had to move; the parts were brought to the operator. From this, it’s a relatively short journey to Ford’s Assembly Line of Model Ts.

The Assembly Line’s purpose was to eliminate custom fitting altogether. From this he derived the ability to repeatedly, repeatably, indefinitely minimise variation and produce tens of thousands of identical parts. Ford’s machines and buildings were tailor made to the design of a specific car. To change the design required buildings to be dramatically changed, and machines to be retooled. For 20 years the Model T Ford did not change at all in design. A new one was virtually indistinguishable from one 10 years its senior.

General Motors

GM introduced the concept of the recurring annual new model. Arguably the first concrete example of agile manufacturing. GM provided heavy duty, multi-puropse, multi-site production processes and equipment, taking the assembly line approach from Ford and extending to allow reuse of key components – engine, chassis, transmission, etc – whilst allowing evolution of other components – e.g. bodywork, gearing.

This first example of flexible mass production owes everything to mechanised production and complete interchangeability of parts. This allowed GM to rapidly (over a number of years) change to new models.

From History to Transactions

American System of Transaction Processing

Pat then draws the comparison between early American manufacture to traditional transactional processing.

Any two appilcations performing similar tasks are allowed by the technology an immense amount of flexibility and variance in implementation. Consider the operation to update an accounting and an invoicing system. This could be implemented in a massive variety of different ways; at the simplest level, updating accounting tables first, and invoicing tables last. Alternatively the other way round is equally logical.

It is precisely this flexibility of the toolset – in the case of manufacture we’re talking about lathes, planes and so on; in the case of transactions we’re talking about software languages, programming environments, etc – which gives the problem. Of course, this is only a problem when you come to a point that you need to swap out the accounting or invoicing system for a new one.

So – flexiblity of this scale is a problem when we cross boundaries of trust or service. Instead, we should try and aim for a more appropriate model of…

Transactional Machine Tools

Applying the General Motors model to application development, we need to consider:

  • Applications are Independent, Standalone – although no program is an island, eh Don?
  • Interconnectivity with Independent Services – services share Schema (format), Contract (sequence) and VERSIONED Reference Data.
  • Optimistic Concurrency does not stretch across Trust Boundaries – Interactions should be based on business functionality, not data exchanges!

That last point is particularly poignent. Consider, if you will, Optimistic Concurrency and your bank. You can’t just give your bank a set of new values you’d like your balance to be. You have to invoke business operations; Deposit, Withdraw. Incidentally, banks do not do atomic transactions as such. Deposit and Withdraw are examples of potentially long running, cancellable transactions; which brings us to….

Armoury System of Transactions

We can go one better right now. If the US Armoury had been building transactional systems, they would have probably built them to use:

  • Compensating Operations
  • Tentative Operations
  • No Transactions Shared Across Boundaries

Pat then quoted one of his previous discourses. "Two phase commit is the anti-availability protocol." Which makes a lot of sense. 2 Phase Commit locks resources; the more contention, the worse the locking. For services, that should be composable, this is not acceptable.

Key to deriving the same economies of scale with services are Tentative Operations (Cancellability), Composability and Nesting of Cancellation. At all costs, avoid Variance, Option and Choice. These are bad for interchangeability.

A Word about Data

Consider two kinds of data – Activity Data and Resource Data. These data have very different requirements during transactional handling.

Activity data, is what you might find in activity-related operations. Your Amazon shopping basket; deposits to your bank balance. These are things t
hat can be rolled back very easily if anything should go awry. Compensating actions are easy to devise and apply.

Resource data is altogether more complex. Consider booking hotel rooms for your stay during Tech Ed. If the conference were cancelled before the event, each night of your potential stay would have to be compensated. The night of Nov 5th. The night of Nov 6th etc. All get one extra spare hotel room added back to the appropriate bucket. Back to the "Reservation Pool" if you will.

Essential in the handling of resource data – in Reservation Pool Management – is that all access and changes should be contained within, encapsulated in, a suitable Reservation business operation.

To handle these various scenarios, your operations need to be able to cope with

  • Long Running Transactions
  • The Ability to Place the Same Order Again
  • Tentative Operations

In order to achieve these behaviours, remember: Specificity GOOD, Variety BAD.

Domain Specific Languages

DSLs are the heavy duty, multi-purpose machine tools of the General Motors model. Just as GM was able to swap out chassis, transmission, engine parts, DSLs let you swap out logon services, retrieve customer services, accounting services.

DSLs get us close to flexible mass production. Harping back to the World of Warcraft in Visual Studio demo of the Keynote – wasn’t that an example of a Domain Specific Language that churned out Lua code? Retooling made easy, without having to restructure your factory (your IDE) or your craftsmen (your dev team).

Finish on  a Song

OK. He didn’t. Not this time, anyway.

But he did finish with some philosophy.

Atomic Transactions are like Singularities. Singular points in space and time. Two phase commit makes time problems go away. Changes in our industry, moving away from mainframes to minis, from monoliths to services, introduce distance into the equation. Interchangeability of parts makes space and time effects surmountable.

Summary

Services offer us a different paradigm to traditional transactional processing. Always consider:

  • Explicit Boundaries – autonomy of services
  • Acceptance is Different – Confirm and Cancel, not Commit
  • Semantics – Intricacies should be avoided
  • Interchangeability – Variance prevents interchangeable operations

TechEd-Developers

Technorati Profile

Technorati Tags: Microsoft, SOA, TechEd 2007