Stephen Cohen's thoughts on Enterprise Architecture

Choose carefully when representing the enterprise

Just as the selection of materials has a substantive impact on the form and function of a structure, the concrete choices made by an enterprise have undeniable impacts on the form and function of the enterprise architecture.  Creating products without regard to the tools and material in play as well as the characteristics of the business, results in a near continuous struggle to “over-come deficiencies”.  Designs become complex, usually evidenced by a greater percentage of code gluing things together than code performing tasks required by the enterprise.

As an example, consider the inclusion of a null date in the account_opened_date column of a banks accounts main account table.  The business, in this example a bank, might see a null account open date as an indication of an instance of account which has not yet been assigned to a customer.  Or maybe a null integer in the account_balance column is used similarly.  The account has been assigned but not yet received its initial deposit.  Neither seems particularly harmful.  Alas the danger lay just below the seemingly reasonable surface.

On a simple logical level, having a null integer or date is just wrong.  A null account value is really an account worth zero dollars.  The number zero equally represents the absence of value.  The difference seems to be in the use of a null value to imply a state of the account.  A null value is being equated with an unassigned account while a zero balance must have been assign to a customer.  Combining the accounts value with the state of the account is at best ineffectual and at worst fails to provide a means to handle more than 2 states.  How would the account value manage to represent suspended, closed, or transferred states?

From a design perspective, null values are appropriate for simple attributes but are unacceptable for important concepts or entities within a domain.  While one might argue that the account balance is merely an attribute of the account, within the context of a banking application the account value is a primary concept of the business.  The banks mission is to manage their customers monies … to track, charge, and (if you will forgive me the pun) account for the value entrusted to them.  Allowing the account value to be null betrays the enterprises’ priorities.

Implementation carries similar symptoms.  A banking institution is like to have multiple locations, departments, and security boundaries creating a complex distributed environment.  Creating an account object which is serialized and marshaled across boundaries will fail if it implements non-null-able types with null values.  Strongly typed systems, such as .Net, can be tricked into supporting this but it is difficult.  Creating such an unnatural implementation tends to signal the beginning of a series battles between the tool and the enterprise.  Instead, you can solve the root problem by;

·        Creating an account with a default value of zero

·        Separating state management from account value using a non null state attribute on the account object paired with an appropriately non-null column in the database.

·        Implementing and defensive coding before and exception handlers after business logic to ensure safe, predicable access to calling code.

In the end, if it feels wrong or unbalanced.  If it smells wrong, look for another way.  Look to your tools and their most natural implementation and adjust your approach to leverage their inherent capabilities.

Published Thursday, April 08, 2004 1:10 AM by Stcohen
Filed under:

Comments

 

Darrell said:

This type of reasoning is what "Enterprise Architects" are supposed to do. Unfortunately, most EAs I have come into contact with want to either:

a) specify individual application architectures, going too deep and neglecting enterprise-wide issues, or
b) specify guidelines without meeting/helping application developers, going way too shallow and neglecting the actual implementation and buy-in from the developers doing real work.

When I was an application developer, if an architect had actually explained something like this, I would have gladly done it. Most of the time, though, the architects would make pronouncements like "We will always impersonate the user and we will always use connection pooling!" With SQL Server, it's impossible to do both, so I gave them little respect and tech-talked around them. Which reveals another weakness, EAs should actually be fairly technical, enough to understand when a developer is fleecing them.
April 8, 2004 11:18 AM
 

Stephen Cohen said:

Thanks for complement.

There is no doubt that an architect is supposed to be a trusted advisor to management on technical issues AND a trusted advisor to the technical team on implementing business issues. Unfortunately that trust must be earned by providing repeated, successful, and correct, aid over time.

Far too many architects are given the role to grow into not because they are capable and there simply are not enough experienced architects to mentor those new to it.
April 9, 2004 8:10 AM
 

Stephen Cohen s thoughts on Enterprise Architecture Choose carefully | My Site said:

June 1, 2009 12:01 AM
 

Stephen Cohen s thoughts on Enterprise Architecture Choose carefully | fix my credit said:

June 16, 2009 9:59 PM
Anonymous comments are disabled

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker