Software High Level Design Document - Sample
Software High Level Design Document - Sample
1 INTRODUCTION.........................................................................................................5
1. Purpose...................................................................................................................5
2. Scope......................................................................................................................5
3. Definitions, Acronyms and Abbreviations...................................................................5
4. References..............................................................................................................6
5. Overview.................................................................................................................6
2 ARCHITECTURAL REPRESENTATION........................................................................7
3 LOGICAL VIEW..........................................................................................................9
1. Overview.................................................................................................................9
2. Architecturally Significant Design Packages/Components............................................9
2.3.1 JAVA01 presentation (JSPs, Actions)..................................................................................9
2.3.4 DAO...............................................................................................................................10
2.3.6 Util.................................................................................................................................11
1 INTRODUCTION
1. Purpose
2. Scope
From a high level point of view, the document defines the software architecture which
addresses JAVA01s requirements in the following areas: functionality, availability,
reliability, scalability, maintainability and manageability.
For the logical view, the new JAVA01 modules are best described by the introduction of n-
tier architecture, which is reflected in the diagrams of the proposed structure.
# Item Description
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
Spring's main aim is to make J2EE easier to use and promote good
programming practice. It does this by enabling a POJO (plain old
java object)-based programming model that is applicable in a wide
range of environments.
4. References
5. Overview
The following sections will provide a deeper inner look at the new JAVA01 modules
architecture, explaining the functionality that the architecture can provide and also point
out the scalability of the architecture to absorb later changes from user requirements or
changes in the system interfaces with other third party applications/components. Viewing
the architecture from the main angles such as Functional and Logical, we can ensure the
architecture will satisfy all defined requirements and still allow later necessary expansion.
All related technologies that are to be applied for a specific purpose of the software
architecture will also be represented here.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
2 ARCHITECTURAL REPRESENTATION
System architecture
N-tier architecture
The following diagram shows the primary tiers in the proposed n-tier architecture. This
diagram shows the main layers in this architecture and the vision of how they fit together.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
This layer controls the display to the end user. For the presentation layer of JAVA01, the
struts 2 framework is used. (The Struts 2 architecture is described in more detail in
APPENDIX A.1:).
Performing UI validation.
Providing a controller to delegate calls to business logic and other upstream processes.
Managing transactions.
Adding flexibility between the presentation and the persistence layer so they do not
directly communicate with each other.
Exposing a context to the business layer from the presentation layer to obtain business
services.
This layer manages access to persistent storage. The primary reason to separate data
access from the rest of the application is that it is easier to switch data sources and share
Data Access Objects (DAOs) between applications.
This layer manages reading, writing, updating, and deleting stored data.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
In JAVA01, the storage is managed by a relational database. Oracle 11g Database is used
for this layer to provide the management of stored data.
3 LOGICAL VIEW
1. Overview
This package includes the implementation for the Presentation Layer to handle the display
to the end user.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
This package includes the implementation of business objects. Business Object (BO)
layer is used to perform the business operations. The Business Object layer will access the
DAO by implementing the Dependency Injector pattern. Transactions should be managed
within this business layer.
POJOs: All business objects will be POJOs and created using Spring.
Value object is Java class, contains lightweight structures for related business information.
These are sometimes referred to as data transfer objects. A value object (VO) is a
lightweight, serializable object that structures groups of data items into a single logical
construct. (Value objects always implement java.io.Serializable).
A VO is intended to minimize network traffic between enterprise beans and their callers
(because each argument passed initiates a network transmission).
In addition, VOs are useful in communication among all layers of the application.
3.2.4 DAO
This package includes the implementation of DAO Java pattern. Using DAO design pattern
here to make the application more flexible to access database. DAO includes basic
functions to work with database: select, insert, update, delete.
This package includes the implementation for Hibernate object which are mapping from
relational database to java objects.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
3.2.6 Util
This package includes all utilities Java classes will be wisely used in the modules.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
This section describes in detail the design patterns and frameworks used in the proposed
application architecture for DWA.
Several problems can arise when applications contain a mixture of data access code,
business logic code, and presentation code. Such applications are difficult to maintain,
because interdependencies between all of the components cause strong ripple effects
whenever a change is made anywhere. High coupling makes classes difficult or impossible
to reuse because they depend on so many other classes. Adding new data views often
requires re-implementing or cutting and pasting business logic code, which then requires
maintenance in multiple places. Data access code suffers from the same problem, being cut
and pasted among business logic methods. The MVC design pattern solves these problems
(Detail about MVC pattern please see http://en.wikipedia.org/wiki/Model%E2%80%93view
%E2%80%93controller).
The Struts 2 frame work (as shown in below Figure 4) is developed with goal is to cleanly
separate the model (application logic that interacts with a database) from the view (HTML
pages presented to the client) and the controller (instance that passes information between
view and model). Struts provides the controller (a servlet known as ActionServlet) and
facilitates the writing of templates for the view or presentation layer (typically in JSP, but
XML/XSLT and Velocity are also supported). The web application programmer is responsible
for writing the model code, and for creating a central configuration file struts-config.xml
that binds together model, view and controller.
Struts 2 is a very elegant and flexible front controller framework based on many standard
technologies like Java Filters, Java Beans, ResourceBundles, XML etc.
For the Model, the framework can use any data access technologies like JDBC, EJB,
Hibernate etc and for the View, the framework can be integrated with JSP, JTL, JSF,
Jakarta Velocity Engine, Templates, PDF, XSLT etc.
For the View, the framework works well with JavaServer Pages, including JSTL and JSF, as
well as FreeMarker or Velocity Templates, PDF, XSLT, and other presentation systems.
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
The concept behind Inversion of Control (IoC) is often expressed in the Hollywood
Principle: "Don't call me, I'll call you.". IoC moves the responsibility for making things
happen into the framework, and away from application code.
Dependency Injection (DI) is a form of IoC that removes explicit dependence on container
APIs; ordinary Java methods are used to inject dependencies such as collaborating objects
or configuration values into application object instances. Where configuration is concerned
this means that while in traditional container architectures such as EJB, a component might
call the container to say "where's object X, which I need to do my work", with Dependency
Injection the container figures out that the component needs an X object, and provides it
to it at runtime. The container does this figuring out based on method signatures (usually
JavaBean properties or constructors) and, possibly, configuration data such as XML.
Spring is a light weight framework to support the IoC dependency injection concept. The
Spring framework was released in March 24, 2004 and is now on version 1.2. It is
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
becoming a widely adopted framework and has many books, articles and coding examples
online.
Spring's main aim is to make J2EE easier to use and promote good programming practice.
It does this by enabling a POJO (plain old java object)-based programming model that is
applicable in a wide range of environments.
When working with Spring, an application developer can use a large variety of open source
tools, without needing to write reams of code and without coupling his application too
closely to any particular tool. Spring basically provides the glue between the majority of
different java technologies such as Struts, Spring own MVC, Session beans, Entity beans,
Toplink, Hibernate, JDBC and the list is end less. If an integration does not exist then we
can write our own anyway as spring is light weight and easy to develop with. This provides
as loose possible coupling between technologies allowing for a true plug and play web
architecture.
N.B. The spring framework is so successful that it has been applied to the .NET framework
(http://www.springframework.net/)
Spring Advantages
1. Reduce glue code: One of the biggest plus points of dependency injection is its ability
to reduce dramatically the amount of code we have to write to glue the different
components of our applications together. Often this code is trivialwhere creating a
dependency involves simply creating a new instance of an object. However, the glue code
can get quite complex when you need to access remote resources in a more component
based architecture. In these cases, DI can really simplify the glue code by providing
automatic lookup and automatic proxy of remote resources
3. Improve testability: When we design our classes for DI, we make it possible to replace
dependencies easily. This comes in especially handy when we are testing our
applications. Consider a business object that performs some complex processing; for part
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
of this, it uses a DAO object to access data stored in a relational database. For our test,
we are not interested in testing the DAO; we simply want to test the business object with
various sets of data. In a traditional approach, where the business object is responsible
for obtaining an instance of the DAO itself, we have a hard time testing this, because we
are unable to replace the DAO implementation easily with a mock implementation that
returns your test data sets. Instead, we need to make sure that our test database
contains the correct data and uses the full DAO implementation for our tests. Using DI,
you can create a mock implementation of the DAO object that returns the test data sets
and then we can pass this to our business object for testing. This mechanism can be
extended for testing any tier of our applications and is especially useful for testing web
components where we can create mock implementations of HttpServletRequest and
HttpServletResponse.
Hibernate is well known and supported by SPRING framework, with the following key
features:
Support for fine-grained object models - a rich variety of mappings for collections
and dependent objects
13-May-10/
JAVA01 Resource Tracking High Level Design v1.0
The query options - Hibernate addresses both sides of the problem; not only how to
get objects into the database, but also how to get them out again
Free/open source - Hibernate is licensed under the LGPL (Lesser GNU Public License)
13-May-10/