James 的个人资料James's Space照片日志网络更多 工具 帮助

日志


12月13日

The importance of e-mail in the enterprise

Will anything ever replace e-mail?
 
A lot of things are trying.  Look at Facebook and it's ilk for social networking and ad-hoc communication.  Look at SharePoint in the enterprise.  There's plenty of good collaboration, social networking, and content management platforms out there.  But somehow, I still can't spot how, for work, any of these things are more effective than Outlook.  Useful supplements yes, and I do think that the value is Outlook not Exchange (and that MS should create a proper MAPI provider for SharePoint to replace it), but fundamentally the e-mail based approach of all of Outlook's functionality is still the best mix of flexibility and semi-structured information sharing for most office workers (and for a wider set of roles than sometimes targetted under the 'Information Worker' concept MS use).
 
Here's a few reasons why:
  1. It's simple.  One (fairly small) set of concepts apply to all communication, through one UI.
  2. It puts users in control.  By and large (and barring mistakes), it is clear to them what they are doing, and with who.
  3. It's pervasive and available anywhere and offline.  Web access, blackberries and other interfaces make it easy to access a consistently rich level of functionality from anywhere.
  4. It's mature, robust and changes slowly.  As a result, people trust it as a reliable way to communicate, and as an information repository (rightly or wrongly).
  5. It's multi-platform and highly compatible.
Why am I interested in this?  At work, we frequently talk about, think about and advise companies on making best use of Microsoft collaborative technologies and I personally have watched them evolve over the last 8 years or so from a relatively expert (developer, architect or consultant) perspective.  E-mail is fascinating because it's so essential to how many businesses work, and often there's a dichotomy between wanting to take advantage of new technologies that seem great (discussion boards for discussions, document libraries for document storage) from an organisational management perspective but that are less flexible or usable for end-users and suffer from low adoption without staff being 'incentivised' to use them (e.g. by locking down e-mail systems with quotas and policies).
 
Generally speaking, there is a tension between improving structured, centrally driven information management and and improving delegated, empowered end-user productivtiy.  One wants to use technologies that improve information sharing and the collaboration around it, while allowing decisions to be made around the balance between centralised and end-user control of information.  I am not a specialist in the theory of this area but I like to think about how the technologies enable the capture, promotion, discovery, retrieval and control of information (probably, some of my staff will now start correcting me on my lack of knowledge of information theory :)).
 
From that perspective It's interesting to compare e-mail (in usage and capability) to the following things:
  • Blogs
  • Wikis
  • Discussion Boards
  • Lists and Libraries
  • RSS
  • Social networking portals

In my opinion, e-mail, as exposed through modern business solutions, still represents an incredible breadth of capabilities for information sharing, collaboration and control and adds more value by deploying it to an organisation than any of the above (yes, I think for most businesses probably deploying only e-mail adds more value than deploying all of the above without e-mail).  For now I'm out of energy and dislike 'thinking out loud' as I'll make foolish errors, so I'll elaborate at some point in the future when I've thought some more :).

However I will add that for me, the latest social networking portals such as Facebook are doing an excellent job of combining and relating different sources of information to improve the richness and relevance of information presented to users.  Rather than competing with e-mail as a communication format, they really show where e-mail and e-mail clients such as Outlook need to go next.  Please, please combine content analysis, content metadata with (evolving) social networks and user behaviour to improve the richness and relevance of the information presented.  Microsoft, Presence is not enough.

5月29日

Why it _is_ possible to be a programming expert

I thought this article was quite interesting: http://blogs.techrepublic.com.com/programming-and-development/?p=673
 
Essentially the article argues you can't be a programming expert any more because of the pace of change of prorgamming languages and the variety of them out there on the internet.  I disagree!
 
I agree the sentiment of the article, but I would differentiate between specific API knowledge and an understanding of how to design and write good software, and of the programming 'memes' over the last 20 years.  I would argue that the real pace of innovation is not that fast, if you have sufficient expertise & experience to distinguish between a new concept, and merely a new implementation of one.  AJAX was around for 5 years before the term became widely used, and is actually a simple use of DHTML, HTTP and XML, though some of the abstraction frameworks around it are great for productivity.  SOA is an attempt to describe ideas 10 years older in a more cohesive, and more standardised way.  An expert programmer sees Ruby and thinks 'cool implementation', not 'OMG I need to go buy a book'.
 
The .NET / J2EE APIs are very different (e.g. swing vs. WinForms) and you certainly can't hold all of their details at the forefront of your mind.  However, the principles of being able to code well in either, and make good decisions about approach and API selection, are almost identical - not surprising because both are OO imperative languages with a JIT compilation, GC'd runtime.  People I know who are expert in one learn the other very, very quickly - and that's down to their programming expertise and experience.
 
I don't think the problem is so new either, I think it's just that the bar has been raised significantly in the last 10 years with more competition to be productive, and hence to use higher level languages with rich, abstracted and large APIs.  You used to be able to get away in the early 90s with writing everything from scratch and still be perceived as competitive - now you can't.
 
An expert programmer nowadays is someone with experience of multiple programming paradigms in a mixture of contexts.  e.g. imperative (C++/C#/Java), functional (ML/Scheme), who has worked at a systems level and business application level.  I know quite a few people like that.  They still pick up APIs and frameworks as the article describes, but they have the knowledge and experience that gives them a deeper understanding of why and how an approach should be taken.  If you're stuck with a complex technical problem, or a load of bugs, then someone like will solve it for quickly regardless of whether they know the API you're using or not.
 
They know the relationship between a semaphore and a mutex, they know that the network is expensive and they should go for coarser grained messaging, they know the pros and cons of ATL vs. MFC, and are comfortable with regular expressions, SQL injection, transaction isolation levels and probably wrote their own equivalents of AJAX back before everyone called it that.  By my definition of expert programmer, there's still just as many as there ever were out there.
5月14日

I'm married

Well, as you may notice from my photos, I just got married!  Well actually it was on the 11th April - but I think I have my priorities right in only just blogging about it.
 
Many thanks to my friends and family who made the day so special - our faces ached from smiling and if we could we'd do it again!  All the presents were greatly appreciated and we're sailing through the thank you letters at the moment Wink.
 
People keep asking me "how are you finding married life"... well, much the same as before; we have lived together for 8 years after all Open-mouthed.
 
The honeymoon in Morroco didn't quite match the wedding but it was great fun - we feel like we saw everything in Morroco - starting in Casablanca and travelling via Rabat, Meknes, Fez, Todra Gorge, the Sahara, High Atlas, Essaouira and Marrakech.  We even bought a rug :)... photos to follow shortly when we get them off the camera (now broken due to sand in the Sahara).
 
See you all soon!
9月6日

Toyota Production System - lessons for IT services suppliers

I like reading about Toyota and the ideas that have grown out of their systems and processes (lean, agile etc.).  There's so many articles out there that there's never a shortage of material to give another perspective on why Toyota has been so successful.  Though not a new article, I just came across http://hbswk.hbs.edu/item/0869.html and http://hbswk.hbs.edu/item/3512.html and they've really made me excited wondering how to map those ideas onto not just software development (XP, SCRUM etc.), but other types of process within IT services organisations.
 
The key ideas of assessing the need for improvement / problem solving by Failure to meet a customer need; Failure to do work as designed; and Failure to do work in an IDEAL fashion could obviously easily be applied to many organisations.  However to take action against these as described in those articles, the culture change needed in terms of management and employee behaviour is an interesting challenge.  I think there's obvious parallels with these ideas in parts of our business already and I for one will definitely be discussing this with other senior managers at some point.  For any Trinity employees reading this, I'd love to hear your thoughts.
8月23日

Bug-fixed version of Xsltx

I've uploaded a newer, less buggy build of Xsltx to Skydrive that also has built in support for compiling different 'views' for a control, set at design time.  There's a simple use of views in the samples if you want to have a look.
 
8月17日

Xsltx - bugs and plans

We've found quite a few bugs in the last build of Xsltx and we're busy fixing them - having an increasing number of uses and test cases for this is helping drive out the errors and omissions as well as the plain simple stupid bugs :).  I'll post another build next week when it seems more stable.  In the meantime, if you use it don't trust it - just for playing and feedback atm. 
8月14日

Update to Xsltx

I had feedback recently from a few people I know who are interested in Xsltx, e.g. 'The Kid' and Rich Kennedy.  Two big things they wanted adding were:
  1. The ability to override and change the rendering at runtime, e.g. by setting a control property.  To be used typically in webpart scenarios where solution designers want to easily prototype changes and minor improvements to the UX etc. without needing any recompilation.
  2. The ability to update the original XML without having to write any code, e.g. by declaratively relating a control property to an XML node described by an XPath expression.
I've now done both of these and they make it a lot more useful - (2) in particular is really cool as you can now build a form using Xsltx and server controls without needing to write any code apart from to load and save the XML.  Looking forwards other changes that may get done include:
  • Optional validation of the source data and any updates to it against a schema.
  • Some kind of (extensible / replaceable) hash based check on the XML data when updating it to ensure it hasn't changed since the data was rendered.
  • A provider / datasource model for the loading and saving of the data to avoid needing to code this.  Obvious data sources are databases (via DataSets and SqlAdapters or similar), web services and XML files stored in SharePoint libraries.
  • Integration with SharePoint for the InfoPath style scenario of creating, storing and editing XML forms in SharePoint.  We love InfoPath for this scenario but sometimes as developers it just doesn't give us the control we'd like.  Xsltx gives us an option where we don't have to go fully bespoke if InfoPath doesn't fit.
  • A wizard to convert an InfoPath form to Xsltx.  This would probably be lossy as script and code behind forms wouldn't migrate easily, but it would give you a quick design surface with InfoPath to accelerate initially building some of the Xsl(tx).
  • Finally finishing the VS integration to support new file wizards, etc.  If only VS was easier to customise...

Files posted on skydrive.  Let me know if you want any other features or want some help.

12月13日

MOSS licensing

By and large MOSS licensing was pretty much what we all expected in terms of options around SKUs like search and forms, and processor vs. server/CAL licensing.  Many Microsoft customers looking to upgrade from the 2003 wave of SharePoint / MCMS to Microsoft Office SharePoint Server 2007 should not find anything unduly expensive or difficult in the updated licensing model - and hey, if it's a bit more expensive then believe me it's worth it in functionality enhancements.  However, one group of existing Microsoft customers may face a massive license pain point... those that were using MCMS 2002 as an intranet, or more accurately, to host content for internal users only.
 
The reasons for this being a pain?
  • MCMS 2002 was processor licensed only.  It didn't matter how many end-users you had, the cost remained the same.
  • SharePoint 2007 can only be server licensed (instead of processor licensed) for 'internet sites'.  Specifically, that option does not allow you to create content that will only be accessed and used by internal users.
  • The 2 points just listed mean that you will now have to buy CALs for all your users!  If you have a few thousand users, your costs may only increase by double or similar (depends on your MCMS architecture).  If you have tens of thousands of users, that will probably represent an increase by typically one or more orders of magnitude.

This is a BIG DEAL.  We have at least one customer who may consider moving off the MS stack as regards web content management as a result.  Why, oh why, couldn't Microsoft just let organisations make the choice, as they do today with SQL Server, between CAL and processor licensing?  It just starts to look like a device to squeeze more money out of medium -> large customers... or maybe a less cynical take would be that it's to up the profile of MOSS in line with the cost and so force businesses to realise the potential value in the product?  Who knows, but there are alternative approaches that would have made my life easier :).

Incidentally, if you have Software Assurance on MCMS and you're in an intranet scenario, you may be okay.  This page mentions an upgrade option for this scenario that translates a MCMS processor license into a MOSS server / CAL license(s): http://office.microsoft.com/en-us/sharepointserver/HA101655351033.aspx (look under upgrades).  However, I can't find any information on the detail of this yet, but if I do then I'll post it here.

Update: Apparently for customers with MCMS Enterprise Edition and Software Assurance, 1 processor licence equates to 250 SharePoint Enterprise CALs - if this isn't enough then you'd need to have further discussions with Microsoft.  If you don't have SA, there's no upgrade option.

11月24日

BDC is not SO (I think)

I was having a small debate recently about whether BDC (Business Data Catalog in MOSS - SharePoint 2007) can be considered part of a SOA... he mentioned BDC as being related to SOA and something inside me kind of twinged in response.  To me, BDC breaks various SO concepts and implies a tight dependency between the integration with SharePoint and the implementation of the line of business app.
 
If you retrieve directly from a database using BDC, then obviously the integration is tightly coupled to the line of business application implementation + there's no service, obviously not SO.  On the other hand, even if you retrieve the information from a Web Service, what I've seen of the way in which BDC is implemented suggests to me that you would normally end up having to write the Web Service in a way that directly exposes information about the implementation of the application, and that is designed to support SharePoint's use of BDC.  So this seems to me to be not autonomous nor, again, loosely coupled.  This doesn't surprise me though given what BDC is designed to achieve.  It's one integration mechanism designed for a particular set of SharePoint functionality - hence you will end up writing web services purely to support BDC.  Nothign wrong with that, it just doesn't seem SO to me.
 
But maybe I'm wrong or need to look at the web services support more closely.  Anyone want to comment?
11月22日

Updated Trinity.Xsltx

I've updated my Trinity.Xsltx framework, primarily to fix a few bugs.  Other changes:
  • The default execution behaviour is now 'DataBindAndRender' rather than 'SinglePass', which although slightly slower is much easier to work with, fits with the normal ASP.NET page rendering lifecycle and should work in all scenarios.
  • Embedding user controls in xsltx files is now possible (there's examples in the updated sample project) by using xsltx:use-control.
  • xsltx:register is now a synonym for xsltx:register-namespace.  I just felt it was more concise and more similar to the equivalent Aspx directive.  You can use either - I haven't decided whether to deprecate the longer one.
  • I've removed all use of reflection at execution time, which should make it faster in some scenarios.  There wasn't much use of reflection before (just OnInit during postbacks I think) but there is none whatsoever now.
  • The xsltx controls serialise some data on child controls created, which allows the control hierarchy to be recreated on postback, and hence events handled.  Previously, the serialised data included all variable parameters and data used to intialise all the controls created, so could be quite large.  This was/is essential when using the 'SinglePass' approach as the controls weren't created until the Render method was called, so viewstate had already been saved and without outputting my own equivalent of viewstate after rendering, the controls couldn't have been recreated and appropriately initialised.

    However, for 'DataBindAndRender', the control hierarchy exists and is initialised before SaveViewState is called, so I'm making an assumption that controls will save any information that needs to be saved in there.  As a result I've changed the serialisation of control information for that scenario, so that the only data serialised is (more or less) the control type and id, i.e. the basic information I need to re-create the controls and their ids appropriately, to allow ViewState and events to work.  There's a chance I've got this slightly wrong and may need to serialise more info than I am doing, but in my own testing it seems to work.  Let me know about this.  FYI I am planning in future releases to change the format of the serialised information to make it more compact again (same info, but probably not serialised as B64 encoded XML ).  I might also need to consider signing the serialised data and may just (for DataBindAndRender anyway) move it into the viewstate... more thought needed by me here.

The updated version is available at the same link as before, at http://www.tesl.com/NR/rdonlyres/10DFD5E6-2D28-4F8B-A468-AA71E85A1684/0/TrinityXsltx.zip.

11月17日

Exception Handling

Exception handling is an interesting topic... even though the topic has been known about by most OO developers for 10-15+ years, and most MS developers have been using it now in some form for 5 years, I always seem to end up reviewing code with excessive or inappropriate exception handling and that happened to me again recently.
 
Personally I like this article: http://www.codeproject.com/dotnet/exceptionbestpractices.asp which I think is fairly complete and easy to understand.  FxCop also does a reasonable job of picking up some common exception handling misuse (e.g. 'catch (Exception ex) {...}') so keep that turned on to remind you when you are being lazy :).
 
One thing I think people often do badly beyond the core practices mentioned in that article is making decisions on where to put exception handling in scenarios such as reusable class libraries, and/or with respect to the different tiers in an n-tier application.  A common decision that I think is wrong in most cases, and certainly wrong as a principle to apply to all .NET development, is that 'all public methods should have exception handling', the factors driving the decision this week  being that each component should be treated as autonomous and hence considered independently.  Hence for that component, its public interface was the system boundary so if no exception handling happened there, that component 'wasn't doing exception handling' and hence would be a 'bad component'.  I think this is very obviously flawed but I've seen this reasoning before.
 
It boils down to the basic principle of "don't handle exceptions unless you can do something about them to enable the system to behave as expected" - which of course also means that user interfaces should tell the user if they are unable to do as requested, rather than just sit there and pretend nothing has happened (hide the problem) or totally fall over (meaningless error messages and terrified users).  A way I like to think of it is that normally, unless you can recover transparently to the caller (e.g. wait for the database cluster to fail over and then reconnect/re-run the transaction as if nothing has happened), you shouldn't handle exceptions - i.e. only code that understands the overall context of its use, input and output as relevant to the complete solution should handle exceptions and log/report them.  In general it means that class libraries should never implement exception handling and that user interfaces and (typically web) services written with SO in mind should always implement some form of exception handling.  Have I said that wrong?  If so tell me ... but hopefully you can see what I mean.  This is all really a corollary of the principles and recommendations espoused in that article but I think that's useful in helping people better understand how to apply them.
 
When these decisions about where to handle exceptions are made wrongly, then they often go hand in hand with other bad practice, such as not re-throwing exceptions and instead returning empty collections / empty XML etc.  Obviously that would mean that calling code (and therefore end-users of the system) would potentially be unable to distinguish between no data being stored / available and a fundamental system malfunction such as a database being offline.  This kind of thing is however sufficiently covered by the article above, so I'm not going to discuss those in any more depth... READ THAT ARTICLE .

EVO platform appears bit by bit...

In case not everyone's already noticed, many of the core components of the new releases of Exchange, Vista and Office ('EVO') are now becoming available:

 

11月5日

Fascinating article on manufacturing and agile processes

Today I came across a link on Martin Fowlers site to the text of a talk by Enrico Zaninotto, an economics professor, discussing the differences and similarities between what happened in manufacturing to improve their processes, and what's been happening lately with the shift from waterfall to agile processes.  As Martin Fowler points out this has been discussed before by Mary Poppendieck, but this adds additional insights to that same topic.  Very interesting...
 
10月31日

XSLTX v1 available

I've spent the last two days tidying up my 'XSLTX' framework for using xslt with embedded server controls, postback event handling etc. which I originally mentioned in my previous blog entry.
 
A 'v1' release of the framework is up on the web and you can download it at http://www.tesl.com/NR/rdonlyres/10DFD5E6-2D28-4F8B-A468-AA71E85A1684/0/TrinityXsltx.zip.  It's an installer which will do the following:
  • Copy the Trinity.Xsltx.dll assembly and accompanying CHM file into c:\Program Files\Trinity Expert Systems\Trinity.Xsltx.
  • Copies two sample projects and a solution file into c:\Program Files\Trinity Expert Systems\Samples.
  • Copy the Trinity.Xsltx.dll assembly into the GAC.
  • Backup and modify C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Microsoft.CSharp.targets to add a build task into the C# compilation process.  If you don't want this, just copy the backup back over the modified version.
  • Backup and modify C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG\web.config to add support for the new build provider and handler factory.  Again, if you don't want this, just copy the backup back over the modified version.

Uninstalling from add/remove programs will undo all the above steps - with the config files it re-edits them to remove the relevant entries rather than just copying the backup back over the modified file, so if you (or Microsoft) make any further changes after installing this framework and then uninstall, you won't lose them.

I'm not going to blog extensively today about how to use it - the samples and CHM file should be enough to start having a play.  Let me know if there's any problems, with the installer or otherwise, and I'll try and sort them out.

Have fun!

10月29日

XSLT, ASP.NET Server Controls and ASP.NET 2 Build Providers

I don't get to do much development any more - too many solutions to design, bids to respond to and difficult projects to sort out.  But sometimes I get bored with all that and long for the fun life of .NET development .  And then sometimes I even have some spare time to go with that urge and get round to indulging myself...
 
That's pretty much what happened last Christmas, when work wound down temporarily for a couple of days.  I'd just been reading about ASP.NET 2 build providers at the time and it made me think about a long standing desire of mine: to merge the ease of data postback and event handling that you get with server controls with the elegance of XML data rendering that XSLT gives you.  I've always loved XSLT (sure if you're used to imperative API based programming it takes a while to get used to the more declarative approach of XSLT) because I find for most non-trivial XML transformations it is more concise and much more readable and maintainable than .NET code.  Even with a complex XSLT it's quick to work out what the target output is going to look like.  Contrast that with relatively simple XML processing written using XmlDocuments/XmlTextReaders + XmlTextWriters (etc.) and personally for me it's 'no contest'.
 
Of course with what you get out of the box today, using XSLT to produce forms that will postback data, and then handle that on the server, is a pain in the neck that quickly puts you off touching XSLT in those scenarios.  Solving this problem by giving XSLT developers the same control capabilities as ASPX developers is something I long for - if this worked and your data is in XML then this should be the only thing you'd use - far more appropriate than ASPX.  I'm sure someone will argue with me about that - a good discussion to have :).  Basically though my interpretation of XSLT + Server controls + postbacks makes it pretty much an improved superset of ASPX so I don't see that as a controversial statement.
 
There's lots of ways you could start to do that in ASP.NET 1.1 and much of the problem is the same.  Build Providers just add some new possibilities and makes adding processing of new file types into the ASP.NET build process much easier.  MSBuild potentially gives similar new opportunities for non-web projects as well (e.g. controls libraries).  Another great advantage of .NET 2 is partial classes - it makes any such solution of declarative UI + code-behind much neater.  Enthused by my new knowledge I set out to create the answer I wanted... XSLTX!   Yes that's right - XSLT with server controls, event wireup and codebehind!
 
This was, as I mentioned, 11 months ago... I finished a draft working solution in a couple of days but was too busy to fully test it and soon got busy again.  Since getting this space (mostly, I admit, to have somewhere to put my photos) I figured I might as well put a little effort into blogging stuff like that because otherwise it'll get lost and not used.  Maybe, just maybe, someone will find it useful.  Anyway, I'm going to tidy it up a bit and put it on gotdotnet or similar and then blog a bit more on what I've done and how to use it.  What I'd really like to do is use VS extensibility features to make the developer experience much more seamless and feel like working with ASPX but that's a project for another week .
 
I should mention that I'm not the only one to have had thoughts along these lines (though I didn't know that till today, when I bothered looking...).  Have a look at the article Creating Dynamic ASP.NET Server Controls Using XML - it's not quite the same as what I've done but it's similar in concept, though on .NET 1.1.  Back with .NET 1.1 XSLT was also significanly slower (XsltTransform has now been replaced by XsltCompiledTransform)... so maybe this is an idea who's time has come.
10月27日

Photo's ahoy!

Well, I thought I might as well start uploading some photos because otherwise I never get around to sending them to anyone - now I can put them in one place and it's everyone else's problem to get hold of them .  Some of these will probably make you laugh and I haven't checked them too closely - but hey what's the point of photos without the stupid ones .