Bill Clementson's Blog

Bits and pieces (mostly Lisp-related) that I collect from the ether.

September 2005
Sun Mon Tue Wed Thu Fri Sat
1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30
Aug  Oct

The Holy Grail of Business App Development

Tuesday, September 13, 2005

The Holy Grail of business application development is to be able to develop application code once and reuse it for many different vertical (or customer-specific) applications (some would say that "making lots of money" is the Holy Grail of business application development ;-) however, it is really just a by-product). There are different driving forces here:

  1. The developer wants to be able to create a generic business application that can be customized for different businesses by adding on "layers" or "contexts" of functionality that are specific to the requirements of the business or vertical industry that needs them (e.g. - one could develop a sales management system that had different "layers" of functionality for different industry verticals so that there might be "base" sales order functionality as well as functionality specific to the High-tech Electronics industry and other functionality that was specific to the Consumer Packaged Goods industry). This allows the developer to target a wider potential customer base with his product while minimizing the amount of code duplication that needs to be done for different customers/verticals. At the same time, the developer wants his application code to be clean and "targeted".
  2. The customer wants to be able to have a product that is custom-suited to his requirements but also wants to be able to take advantage of standard upgrades to the base code without having to retrofit them to his custom code.
  3. The application marketer wants to be able to sell to multiple markets but to have a product that looks and feels like it has been custom-written for each specific market.
To date, traditional object-oriented approaches have been found wanting for this type of customized development work. Many companies have found that a metadata-based approach to application development can work better when creating dynamic and adaptive applications than O-O techniques. However, a metadata-based approach often leads to application code that looks like a giant finite state machine. This can be cumbersome and difficult to maintain and also means that developers can not use O-O tools and approaches in their development of the code. I was recently intrigued to see that Pascal Costanza and Robert Hirschfeld had jointly conceived a different approach that utilizes extensions to O-O technology to help the developer to achieve the same end result. Their approach, which Pascal has implemented for CL in the form of a package called ContextL (and which Robert will be providing for Smalltalk as ContextS), extends CLOS in an implementation-neutral manner and is conceptually, quite elegant. The package provides the facility to add object-specific "layers" of slots and methods that apply to the object only when it is being used in a particular "context". Pascal and Robert have written a very good overview and it is worthwhile to read their paper if you're interested in the approach. However, it is probably easier to get a feel for ContextL by seeing it demo'ed. So, here is an annotated example (adapted from the demo included with the package and with some output snipped for clarity): Congratulations to Pascal and Robert for creating a very useful additon to CLOS!

emacs Copyright © 2005 by Bill Clementson