Tuesday, February 27, 2007
Exporing Real Option-based Software Engineering
I’d like to follow up my post on why we aren’t ready for real option analysis based decision making in software engineering with an example. As a basis I’d like to use Stephen Palmer’s excellent article on modeling a library management application originally posted on The Coad Letter. If we look at the model (based on Peter Coad’s Domain Neutral Component pattern) we can see that it decouples and encapsulates many concepts.

Fig 1. Model of a Library Management Application (courtesy Stephen R. Palmer)
In his article, Stephen Palmer explores the requirements space and gradually narrows the possibilities and reduces options in the scope. As he does this, he removes classes from the domain model. This demonstrates the “modeling by taking away” approach of The Coad Method in its final 1999 version using colour archetypes and the DNC pattern. There are many options, for example, the AccountInApplication class decouples MembershipAccount from its role in a Registration. Do we need this class? What does it buy us? If we create this class what “option” is it buying us? We could say the same for the other (yellow) role classes, Library and Member. If we create role classes for Parties, Places or Things, what “option” does that buy us?
Roles classes decouple behavior associated with the transactional (pink) Moments or Intervals of time from the (green) Party, Place or Thing classes. With roles the model is more loosely coupled and more highly cohesive. The (green) PPT classes are more reusable and their responsibilities are more cohesive. If the (green) PPT class might be involved in another transactional (pink) Moment-Interval or even a whole other application then the (green) PPT class is not polluted with behavior associated with several applications on transactions. This makes the classes cleaner, simpler, of higher internal quality and probably easier to test, resulting in better external quality. But there is an even more useful purpose to separating out (yellow) role classes from (green) PPT. It allows postponement of component boundaries and separation of code into discreet coarse-grained components, packages or applications. I explained this in a later Coad Letter article.
So the real option theory question becomes a trade between the cost of creating the (yellow) role class - the price of the option - and the likelihood that (green) PPT will be involved in another (pink) Moment-Interval and that there will be a desire to separate out the different transactional application pieces from the reusable (green) PPT and (blue) Description classes. The likelihood will depend on the domain, the specific requirements and the direction of the business in future. As I described last week, assessing the cost of building the extra (yellow) role class is almost impossible, and assessing the probability of the need to decouple transactional behavior and/or partition in to discreet components is equally hard. Hence, the input data for the real option equation would be highly suspect at best.
Let us analyze another example using the same model from Figure 1. The (blue) Account Description class allows us to separate out meta-data describing types of accounts and associated behavior. For example, the maximum number of books that can be borrowed by any member registered with this type of account. Description classes are often implemented as database tables or as XML files that are loaded dynamically. Both approaches allow for the meta-data to be updated at runtime. In Lean terms, for the description definitions to be postponed until runtime. Building a (blue) description class using a table-driven or XML file-driven approach is buying an option to postpone description definition until runtime. To assess this option, we must again be able to account for the cost of building the table access or the dynamic XML file loading infrastructure. We must also be able to make an assessment of the likelihood that the description definitions will change and how often this is likely and with how much notice. Is it likely to happen more often and with sufficiently short notice that deploying a new version of the software would be undesirable? Would we prefer to have a system administrator or a “super” user update the definitions rather than involve the programming and testing team? If we can assess both the cost of buying the option and the likelihood of the option being exercised then we can use real option analysis to make a decision about the value of building the (blue) description class, and whether it would be better to build a table-driven implementation or an XML file-driven implementation.
If your organization is capable of making these kind of well informed, real option-based architectural and design decisions, please write to me or leave a comment. Equally, if you think we are years from having that kind of maturity, I’d like to hear from you too. Technorati tag: Agile, David+Anderson, Real+Option+Analysis, Software+Engineering, Stephen+Palmer


