BA Concept - System Tree

6/20/99 - Go Back

The basic building block is parts. Each is a Java class.

Our first goal is to become part centric, thinking in terms of parts, not code. Think of any Java class you've every written. It could be a part if it was designed with reuse in mind. The beauty of reusable parts is you only write them once. This allows us to assemble systems from parts with no code, a rather powerful ability.

Here's the method signatures for a very simple sample part. (The interfaces, Param and Message are explained later) For simplicity, not all interface methods are shown. Writing the methods is very simple. The hard part (whoops, our first pun :-) is designing them.

public class SamplePart implements ParamDriven, MessageListener {
    // Lets the part initialize itself
    public void setParam(Param param)
    // Allows the user to apply a new Param while system is running
    public void applyNewParam(Param newParam)
    // The part should respond to the Message 
    public void processMessage(Message message)
}

Examples of parts are FileSelector, MenuBar, Button, SocketManager, SecurityManager, CustomerOrderTaker, CustomerOrder, Customer, RegressionTest, TestRunner, TestAnalyzer, and TestRecorder.

Practice - Pick a system you might need. State its Nutshell Vision and list 10 parts it would use.

Parts are grouped into containers.

Containers are a powerful pattern. The idea is you put parts in a container, and the container manages the parts and provides them with what they need. With proper design, this can greatly simplify the part's responsibilities and enhance reuse.

Practice - Organize your 10 parts into containers.

Containers are hierarchially organized into a System Tree.

Here's where we get cool. Rather than figuring out how to organize a system every time with class diagrams, we use the same standard organization over and over. The containers are organized into a tree. In the BA, a container can hold parts and other containers. The internal representation as a tree is the same as the external, visual one, as you can see in this discussion of the System Tree. All this (parts, containers and System Tree) does wonders for productivity.

Practice - Goal - Start thinking "Part Centric", not code centric.

1. Start the BA and open org.jcon.test.screen.StartSystem. Right click on the root and choose Open Branch. Explore all nodes. Note how part class names are shown in the status bar. How many different parts is this system composed of?

2. Pick another system you might need. State its Nutshell Vision and name 10 to 20 parts it would use. Draw the System Tree and organize the parts into containers.

3. Repeat (2) for a large real world system you are familiar with. Does approaching it from a tree of parts perspective help you to understand the system better? Why?

4. Extra Credit - Repeat (2) for a large real world system that needs vast improvement. Develop one tree for the system as it is, and another as it should be. How many parts were reused? How many were new? Are you are now thinking Part Centric?