A Question of Context

A couple of weeks ago, David Chappell posted a great article on SOA and the Reality of Reuse. When someone mentions the idea of using SOA for reuse, I cringe. David does a great job blowing the “SOA for Reuse” argument out of the water. In the future, I will just send that link rather than spending the time arguing out the point.

But something nagged at the back of my brain about that post. David starts by talking about object reuse before making the parallel to services. The problem with that comparison is that object reuse hasn’t been a failure. When was the last time you wrote a String class? A Linked List? A Button? There’s been support for Buttons in Windows since at least the 3.x days (probably longer, but that’s before my time). Whatever your OO language of choice, there’s a big collection of reusable objects to go with it.

Given his position as “famous technology author”, I’m assuming David is well aware of successes of object reuse. Furthermore, I doubt it was an accident that in his article he writes that “reuse of business objects failed” (emphasis added). While there has been success around object reuse, essentially none of those successes have been in a business scenario. In fact, there have been some high profile projects such as Microsoft’s Business Framework and IBM’s San Francisco Project that have crashed and burned been significantly less than successful.

So here’s the question: given that general object reuse has seen some success, what’s so different about business objects that causes reuse to fail utterly? Since we’re really interested in service reuse, knowing why some object reuse succeeds and other reuse fails will help us understand which services are likely to be reusable and which wont. I would say that success of object reuse hinges on context.

Wikipedia gives this definition of context: “The context of an event, word, paradigm, change or other reality includes the circumstances and conditions which surround it.” (emphasis in original) For example, the word “order” is ambiguous. If you’re using a procurement system for the military, you could conceivably be given an order to place an order. (OK, that’s silly. But you get the idea.) The word “order” has two different meanings. However, the words that surround the ambiguous term make the meaning clear. An order that you place is different that an order that you give. That’s context.

A string or a linked list or a button has very little in the way of contextual needs. That is to say you can use it the exact same way in a wide variety of environments. A business object on the other hand has significant contextual requirements, which makes reuse difficult or impossible. For example, a Purchase Order object from the above-mentioned military procurement system sounds like it might be reusable. At least until you take into account the differences between branches of the military, between ordering tanks and ordering uniforms, between active units and reserve units, etc. Once the generic Purchase Order has been specialized to the point of practical usability for a given scenario, it’s no longer reusable in the general case.

Taking this back to the service realm, likewise I figure the reusable services will be the ones with little or no contextual needs. A good example is the identity and directory services such as Active Directory and its competitors. Sure, you use LDAP not SOAP to access it, but AD is certainly both reusable and a service plus it’s in wide usage. Other candidates for reusable services my team is looking at are service directory, management and operations, business activity monitoring and provisioning.

I actually think there will be less reuse in services than there was with objects. The value of reuse of services has to exceed not only the contextual issues but also the overhead of distributed access. Calling across the network is an expensive operation – whatever’s on the other side better be worth the drive. I’m guessing for services, more often than not, reuse won’t be worth the trip (if it’s possible at all).

Update: David pointed out to me that the last paragraph of his article begins:

Object reuse has been successful in some areas. The large class libraries in J2EE and the .NET Framework are perhaps the most important examples of this.

Doh! I guess my “assumption” that David is aware of successful object reuse was correct.

Managed Lex and Yacc

Buried deep in the docs for v3 of the Visual Studio SDK is something called the Managed Babel System. Babel – in the context of Visual Studio – is the framework for creating language services for stuff like syntax highlighting, brace matching, and IntelliSense completion. As part of the Managed version of Babel, the VS SDK includes the Managed Package Lex Scanner Generator (MPLEX) and the Managed Package Parser Generator (MPPG). Online docs are pretty thin, but there are a few white papers in the additional documentation of the VS SDK install.

Interestingly enough, the white papers were written by John Gough of QUT’s Programming Languages and Systems group. John wrote Compiling for the .NET Common Language Runtime and PLAS has several interesting language projects including Metaphor and Ruby.NET. As you might expect for a group that focuses on languages on .NET, they have a managed version of YACC called GPPG available and John said at Lang.NET that they would be releasing a managed version of LEX “soon”. I’m thinking that QUT’s GPPG/GPLEX combo has been absorbed into the VS SDK and renamed MPPG/MPLEX. Unfortunately, my laptop power connector is broken, so I can’t verify this until Monday.

It’s not a Rosetta stone and the lex/yacc model is getting pretty long in the tooth, but I’m thinking at least Larry O’Brien will be interested in these tools.

Update: Apparently, this is somewhat old news, as per Aaron Marten:

The tools we’re including are called MPPG & MPLex (which stand for Managed Package Parser Generator and Managed Package Lexer). They are derivative works from the open-source GPPG/GPLex tools developed at the Queensland University of Technology.
[Managed Language Tools in Visual Studio 2005 SDK]

Gamer Card Plugin for WL Writer

In my last post, I wanted to include a link to my gamer card, showing the NHL 07 logo on it. It turns out that in addition to the “official” gamer card from Xbox.com, there’s also the MyGamerCard.net site which provides both image and flash versions of gamer cards. Since I’m using Windows Live Writer, and I hear it’s really easy to extend, I decided to throw together a plugin for inserting Gamer Cards. It was, as advertised, extremely easy. I spent more time laying out the dialog box than I did writing the code to interface with WL Writer.

The plug in provides basically five Gamer Card options:

  • Standard Xbox.com Gamer Card
  • MGC.net Gamer Card image with link to Xbox.com Profile
  • MGC.net Gamer Card image with link to MGC.net Profile
  • MGC.net Gamer Card image only
  • MGC.net Gamer Card flash movie

I’m interested in feedback and suggestions for future versions. MyGamerCard.net provides ten different Gamer Card styles (that’s my Gamer Card to the left) so that’s an obvious enhancement for another day. I’d also like to evolve the plugin into a “Smart Content Source”, which allows you to edit the content after it’s been created (like the default “Insert Map” option). Finally, I’m thinking of adding support for GamerScoreChart.com.

Download GamerCard.WriterPlugin.Setup.zip (142.41 KB) and enjoy. Let me know what you think.

Hawkeye on NHL 07

For those who don’t keep a close eye on my Xbox playing habits, I picked up NHL 07 last night. There are two hockey franchises for the Xbox 360: EA Sports and 2K Sports. I’ve been a 2K fan for several years, but I didn’t think much of their last effort on Xbox so I never bothered to pick the 360 version. Of course, EA Sports skipped the 360 last year so I’ve been without next-gen hockey since I bought my next-gen console.

Now there’s a new version of both major hockey franchises, just in time for the opening of training camps. Each has had an entire year to innovate, and it’s interesting to see where each title has spent that time. 2K Sports has created “Cinemotion”, which is an entirely new presentation system which is more like an “interactive hockey movie” than a TV broadcast.

NHL 07 Box

EA Sports spent their time on an entirely new control scheme called “Skill Stick”. Basically, while the left thumbstick still controls player movement, the right thumbstick controls the player’s stick. It’s taking time to get used to – hey I’ve only had the game a few hours – but so far I really like it. I was playing the XBLM Demo and scored on a sweet spinorama move with the skill stick. That pretty much hooked me on the spot. Most of the reviewers have singled out the skill stick as the reason for the generally favorable reviews.

Plus, EA picked Washington Capitals superstar Alex Ovechkin for their cover athlete. Barring awful reviews, I pretty much decided to pickup NHL 07 as soon as I heard that.

IDEA 2006

I saw from Bruce Sterling’s blog that he’s going to be at Idea 2006 next month in Seattle. Bruce is at or near the top of the list of “folks I’d like to chat with over a few good beers”. I saw him at ETech and have since read and thoroughly enjoyed both Shaping Things and Tomorrow Now. I wonder if I can make it to IDEA?