September 2006
Monthly Archive
Monthly Archive
Posted by Chris Sterling on 29 Sep 2006 | Tagged as: Agile, Architecture
Comments Off on Consistent Architecture through Facilitation
Posted by Chris Sterling on 25 Sep 2006 | Tagged as: Agile, Architecture
As we develop software, it is common to design before we code. On average, I have found that the more time between when design occurs and the actual implementation is developed, the more unexpected detrimental effects surface. A common reason for design problems when integrating external dependencies into a project is that the project team was using what was available from the integration dependency instead of deciding on what they needed and mapping that to a solution. Design by contract made a step in this direction by supplying the idea of a contract between a supplier and client.
Over the past few years, we as an industry have started turning a corner towards a more business driven approach to software development through Agile values, principles, and methods. As we develop software we must take the same business driven approach to design. As anybody who has used Test-Driven Development (TDD) knows, design is a continual part of our development cycle. We design our software through the creation of well defined criteria (tests) and refactor our code mercilously to an acceptable design. Another interesting aspect to TDD is the YAGNI (You Ain’t Gonna Need It) principle which states that one should never add functionality until it is necessary. Instead of designing towards the use of an external dependency we should only integrate upon need. This is why I have coined Need-Driven Design as the business driven approach to software integration design. Need-Driven Design has the following steps:
An example of this approach to software design is a project which needs data from an exposed web service. In this example, the web service returns an XML represntation of a customer with the following information:
The business has informed us that this external system is the most up to date view of our customers and therefore must be used by the application. This satisfies step 1 of our Need-Driven Design approach. Next, we should develop enough code to know that we need to interact with the external system and where that interaction is going to occur in our application which satisfies step 2. The business case for this example is that our end users must see the customer name, company they work for, and a phone number to reach them at. For this business case, we define an interface that returns only the customer name, company, and phone number which as you can see is less information than the web service returns. After defining the interface to satisfy step 3, we should create executable criteria for interactions with the implementation of this interface and our application. We can use mock objects to do this through the setting of expectations across multiple tests with variable response message signatures. This may lead into the development of validation functions, exception handling, and defined results packaging. This executable criteria from step 4 can now be used as the intent for consuming the exposed web service. Automated integration tests should be developed as criteria for implementing the defined interface for external web service consumption. This will not be a replica of the interface tests defined using mock objects. These tests should make sure that the consumption of the external system dependency maintains the integrity of the defined interface intent described in those tests.
By driving our integration strategies through the steps defined in Need-Driven Design we can decrease integration costs, reduce coupling to external dependencies, and define business driven intent into our applications. Integration can be a headache in development, design, testing, deployment, and operations. Through the steps in Need-Driven Design, we can assure those that pay for maintenance of these integrations get the value they need.
Posted by Chris Sterling on 24 Sep 2006 | Tagged as: Agile, Architecture, Scrum
For quite a few years now I have been working in the software architecture and Agile space which may seem like an oxymoron to some. I got asked the other day, from somebody who knew me for both, what type of reaction I got from the XP community members when I brought up the word “Architecture”? Honestly, I had gotten some rolling eyes, criticism, and the usual YAGNI blurb. It hasn’t affected what I am doing and I keep closely aligned with the Agile Manifesto and the Principles behind it. So how can I work with anything regarding software architecture and still be “agile”?I have found that in some cases the guidance provided through higher level views of systems has enriched the product delivery. Definitely it is not needed in every case and I will freely admit that the “Ivory Tower” approach to software architecture is mostly misguided. There are the cases in which you do have a need for infrastructure and enterprise architecture. But instead of the “Ivory Tower”-type teams, these groups could be more in line with the product delivery cycle. I was amazed the first time that I had an Enterprise Architect work as the Product Owner of a Scrum project. The EA had a great ability to manage communication from business customers into the product backlog. The EA could help breakdown multi-team work with minimal dependencies and integration points. The EA was able to have great negotiations with the team regarding new information learned during a sprint. I was amazed at how well it worked. Then I thought about it and these are the skills that many of the EAs I have worked with and respect had already.
Along with EAs, the Infrastructure Architect is still needed in certain contexts to help in large scale deployment configurations. I have heard of instances where this team can run Agile projects and incorporate Lean principles to remove waste such as duration to deliver in the supply chain. Instead of taking the approach that “this is how things are” we can decide on how things “should work” and then work towards that. If it takes 2 months to procure a server for our staging environments then we should be asking ourselves why? What would stop us from being able to deliver on these server requests in 1 week? Sometimes we don’t take a step back and look at these options. If we do, we might just find out that we can increase the productivity of our entire organization.
I have been holding these two spaces, Agile and Architecture, away from each other for the most part but I am going to change that. Agile and Architecture are compatable and I will continue my quest to promote my findings on this topic, good or bad. Just remember that I am not speaking about the traditional Architecture role but rather what I have found as an Architect that works. An Architect is not a role which is the “know it all” in designing an application for teams of developers. Prescriptive approaches to working with development teams can be characterized as intrusive and misguided. We must understand how we can help in the true guidance of a team doing their work and delivering on goals.
Comments Off on A New Blog Focus