XP and AMDD-Based Architecture and Design Modeling
- What's Covered in This Chapter
- Design Approach and Artifact Choices
- Free-Form Architecture Diagram
- From User Stories to Design
- Exploring Classes Using CRC Cards
- Application Flow Map (Homegrown Artifact)
- UML Class Diagram
- UML Package Diagram
- Directory Structure
- Sample File Names
- End-to-End Development Steps
- Acceptance Tests
- Other Considerations
- Recommended Resources
Click "Downloads" under the More Information bar to access source code and example files from this book.
IN THIS CHAPTER, WE FINALLY BEGIN to get into the technology side of things, so now begins the fun part.
In a truly iterative development environment, all the architecture and design issues would not necessarily be finalized up front. Refactoring (improving code without impacting its functionality) plays a big role in constant improvement to the initially established design because invariably you will find better ways to do something when you are actually coding. Furthermore, while the scope of the project can be defined up front, the user requirements can continue to evolve from iteration to iteration versus having everything locked-down up front. With requirements, the idea is to have a lot of interaction with the stakeholder and be able to ask ad hoc questions.
Although some work can be done up front, such as the user stories, high-level architecture, user interface prototypes, domain model, standards and so on, other design issues can be resolved in the iteration they are applicable to. Furthermore, as we will see in Chapter 5, "Using Hibernate for Persistent Objects," and Chapter 7, "The Spring Web MVC Framework," writing tests first can also help with the design of your classes, so you don't have to have all the fine details of your classes figured out up front; in other words, you can take a just-in-time approach to design, so to speak.
However, some upfront design is bound to happen, perhaps in iteration 0 (perhaps when you are trying to demonstrate a proof-of-concept, which shows that the chosen technologies can work end-to-end, from the user interface to the database, for example).
In this chapter, I hope to provide you with an end-to-end approach using modeling and process guidelines provided by Agile Model Driven Development (AMDD; agilemodeling.com) and Extreme Programming (XP; extremeprogramming.org).
What's Covered in This Chapter
In this chapter, we will accomplish the following architecture and design objectives for our sample application, Time Expression:
- Develop a free-form architecture diagram
- Explore objects using CRC cards
- Assemble an artifact I like to call an application flow map
- Develop class and package diagrams for Time Expression
- Establish our development directory structure and look at some sample file names (we will create in later chapter)
- Look at the steps we will follow in the upcoming chapters for end-to-end development of our screens
- List advanced concepts we will need to consider as our sample application evolves: exception handling, scheduling jobs, transaction management, logging, and more