Java Reference
In-Depth Information
Another code rearrangement, based on feature clustering is operated in business code. Some
basic commands (corresponding to protocol ones) are factored out in a class of its own, provid-
ing standard communication services to other business classes. This additional rearrangement
allows us for showing a simple yet very common case of code reorganization prompted by the
adding of deployment services.
N OTE
Reorganizing already written code for deployment is often a good chance for
rethinking the whole software architecture, as this example shows.
Following the advice of Chapters 2 and 4 on typical application helpers architectures, we
divide our code into two main parts: business and deployment-related classes. After such a first
division, we individuate two classes that will implement the application helper layer: one for
controlling the overall deployment and another one that implements our custom class loader.
Also, business code has been rationalized, creating the class BankClientManager that groups
together all basic protocol commands, so that business transactions can use them.
In Figure 6.1, a diagram describes the proposed class architecture.
application
Bank
Client
Bank
Client
Manager
business
data
Business
Server
Bank
Client
Loader
Application
Helper
classes,
resource files
application helper
Deployment
Server
F IGURE 6.1
Software architecture for our ad-hoc deployment solution.
As seen in Figure 6.1, the deployment layer is made of two classes, whereas the business layer
is composed of at least two classes (one that provides protocol support, and one or more where
the actual business code is implemented).
Search WWH ::




Custom Search