Software Architectural Design Description
From TeamF::CGT
Revision: 2362
Contents |
Abstract
This document discusses and specifies the software design methodologies, system architecture, system deployment environment, and implementation related issues in language, framework and database for the CGT project.
Introduction
Purpose
This document is produced to specify high level system decisions, hence facilitate the communication among the design team, implementation team, test team and other interested stakeholders.
Audience
- System designers
- System programmers
- System testers
- Team supervisor
- Client engineers
- Other interested stakeholders
Design Methodology
List of Design Methodologies Considered
A range of well-known design methodologies have been taken into consideration while choosing the most suitable one for our project.
- Top-down Design / Bottom-up Design
- Structured Design (SD)
- Jackson System Development (JSD)
- Performance Centered Design (PCD)
- Test Driven Development (TDD)
- Object Oriented Design (OOD)
Top-down Design / Bottom-up Design
Top-Down Design start with identifying the major high-level system requirements, and then iteratively breaking them down and refining them, until function specific modules can be designed.
Top-Down Design is well suitable for systems where the problem domain is well-defined.
Bottom-Up Design start with identifying the basic set of modules and their interrelationships. High level system design is then formulated based on these primitives.
Bottom-Up Design is more suitable for systems where the problem domain is ill-defined.
Structured Design (SD)
Structured Design is a data flow-oriented design approach. Data Flow Diagram (DFD) is the main notational schema in SD.
SD separates Logical Design (abstraction) and Physical Design (implementation).
Designers first ignore the implementation techniques and produce a logical solution to satisfy the requirements, and then transfer this logical solution into a physical solution by making necessary changes so the physical solution can be implemented.
Jackson System Development (JSD)
The Jackson System Development is an object-based system, which is an extension of the Jackson Structured Programming (JSP) method.
The behavior of the objects is stored in an Entity Structure Diagram.
- Modelling Stage: Identify entities, the actions they performs, the time order of the actions, the attributes of the actions and entities, create entity structure diagrams.
- Network Stage: Define the functionalities of the system, create system specification diagram (SSD).
- Implementation Stage: Network is optimized, processes and programs may be combined to simply the system, create system implementation diagram (SID).
Performance Centered Design (PCD)
Performance Centered Design enables users to achieve the required level of performance as quickly as possible, at the very most, within a day, with minimum external support.
This intuitive system allows users to reach a reasonable level of efficiency immediately without training or checking any reference books.
PCD concerns about the human performance instead of the system performance.
Software that is performance-centered is created from the outside-in, from the perspective of the workers who use it, rather than from the inside out, to reflect data structures and system functionality.
It is designed for ease of learning and use rather than just to offer features and perform functions.
The key features of this design is rapid prototyping and high collaboration with actual users resulting in robust interfaces that produces desired solutions.
Test Driven Design (TDD)
Test Driven Design require designers to write test cases first, and then produce code to pass those pre-defined test cases.
The associated advantages include:
- Code become testable in isolation;
- Decrease coupling and increase cohesion;
- Reduce the complexity of automated testing;
- Development pace can be well controlled and monitored.
TDD does not work where automated testing is not feasible. This include areas such as GUI, database schema, artificial intelligence and etc.
Object Oriented Design (OOD)
Arguably one of the most widely-used design methodologies in software industry.
Main advantages include:
- Encapsulation: (a.k.a information hidding) Prevent unauthorised or unintended access to certain information and processes.
- Modulization: More organised system structure and code.
- Inheritance: Ability to abstract and reuse code.
Decision on Design Methodology
Reasons for not choosing certain design methodologies
- Bottom-up Design can not be used due the special characteristics of our project, namely its high flexibility. The aim of this project is to make the final modules high customizable. Hence if we can not clearly define those end modules, it is impossible to use Bottom-up Design.
- Top-down Design and Structured Design are reasonably similar, both look at high level design then low level details. The idea of initially ignoring implementation technique interests us and made us chose Structured Design instead.
- Jackson System Design appears to be complicated and not particularly attractive.
- Performance Centered Design requires high collaboration with actual users. Our project is to build a tool for our client which isn't the actual user, high level of actual user involvement does not seem to be feasible.
- Test Driven Design and Object Oriented Design appear to have superior benefit for our implementation. Detailed advantages are listed in previous section.
Final Decision on Design Methodologies
We decided to experiment the use of a mix of three design methodologies in our project.
The whole system will be built under an Object Oriented environment.
We start by using on Structure Design, ignore implementation techniques and produce a logical solution that satisfy the requirements stated in SRS.
This logical solution will break down the system into numerous modules.
Then we have the opportunity to assign team members to research on each module and work out exactly how to implement the functionalities required.
The actual implementation will be based on Test Driven Design, required test cases will be produced before coding, the aim of coding became to pass those pre-defined test cases.
- Overall System : Object Oriented Design (OOD)
- High Level Design : Structured Design (SD)
- Low Level Design : Test Driven Design (TDD)
System Architecture
Architecture Research
Three Tier Architecture
The architecture chosen for the CGT is Three Tier Architecture. This architecture provides presentation, business logic and data storage layers. The details of the architecture are shown in the diagram below. The security component of the sysytem has been added on the side of the entire system, as it will be included into each layer.
Presentation Layer
The presentation layer provides an interface to the system for user. This will allow user to customise their CGT. As the user interface will sit above all other layers, this will allow the interface to be enhanced during later builds.
Business Logic Layer
The business logic layer will contain the processing and logic concerned with the user's interaction. This layer will serve as the middle layer between the presentation layer and the data storage layer. As the presentation and the data storage communicates through this layer, this allows any method to be enhanced as long as each function call remains unchanged.
Data Storage Layer
The data storage layer will provide access for data storage sources and the system. This layer will contain a module to communicate with the data source, which can be easily changed if the data source changes.
Other Architectures
Various system architectures were researched before the decision to use the three-tier architecture was made. The architectures that were research that could have possibly be used for the CT, but were not chosen are list below.
- Client Server
- Pros: This is a well used network architecture. The client is the frontend presented to the users, while the server is the backend usually the webserver and the database. This makes dividing the CT into layers simple.
- Cons: The CT system requires complex business logic. In the client server architecture the business logic is included in the client or the server or both. Changes to the business logic may require changes to both the front and back ends.
- Solution: While the client server architecture is simple, it does not provide a seperate business logic layer like three-tier and MVC architectures.
- Model-View-Controller
- Pros: The MVC architecture provides three distinct entities. The Model contains the structures for storing data for the system. The view is the front end that displays the model. The controller provides objects to determine the state of the system. The controller could be used for providing the business logic layer.
- Cons: This use of the architecture in the CT would require a great deal of analysis to identify the model, view and controller.
- Solution: MVC is similiar to the three-tier architecture, however, three-tier architecture provides a clear break down of the system into the three layers compared with identifying the model, view and controller in MVC.
Architectural Model
Deployment Model
Implementation Issues
.NET Language
When choosing a proper .NET language for the project, one of the most important point to understand is that with .NET, all language choices are now just different ways of achieving basically the same result. Because the CLR (Common Language Runtime, Managed Runtime) works on IL (Intermediate Language) and all .NET enabled languages compile to IL, there is no difference in the capability in terms of functionality and even performance (for proficient programmers). Learning the .NET Framework itself is a much bigger issue than learning any of those languages.
Options
Although there are more than 20 .NET enabled languages, four of them are natively supported in Microsoft Visual Studio .NET, namely C#, Visual Basic .NET, C++ and J#. Furthermore, VB.NET, C# and J# are the most common languages for ASP.NET applications. Therefore, only these three languages will be taken into consideration when choosing a language for implementation.
Language Feature Comparisons
Here are some comparisons of various language features with their references:
- Comparison of common programming tasks with keywords
- Comparison of programming concepts with code examples
- Comparison of data types
- Comparison of operators
- Comparison of controls and programmable objects
- Detailed comparison for VB.NET and C#
Pros and Cons
- Visual Basic .NET (only considering VB.NET 2005 as it is now a much more powerful object-oriented language than it used to be)
- Pros:
- Natural language syntax, case-insensitive (may not be a good thing to some of us though)
- Has access to the same framework libraries as C#
- Has some syntactic sugar such as the "With" keywords, and syntactic salt such as the enforced "End If", "End For", etc. (though it makes code longer)
- Client's existing system is written in VB.NET (however, the existing system is only for reference, not for reuse)
- Cons:
- Not many team members have previous experience with VB 6.0 or VB.NET
- Syntax is very different from C, C++ or Java style
- Longer expressions
- Pros:
- Visual C# .NET
- Pros:
- Syntax very similar to C++ (and Java and C)
- Terse expressions
- Flagship language for .NET Framework, has all the advanced language features some of which other languages may not have
- Experience with C# in this project can be valuable in other types of projects
- Cons: (Not really. C# 2.0 may well be one of the most advanced OO language for commercial application development at this point of time)
- Pros:
- Visual J# .NET
- Pros:
- Syntax almost identical to Java
- Terse expressions
- Cons:
- Transitional product for programmers from Java background, some language features such as generic type definition are not available
- May be hard for client to maintain, development by Microsoft may be ceased in future .NET releases
- Smaller developer community and less chance of getting help
- Pros:
Rankings
| Consideration | Rank 1 | Rank 2 | Rank 3 |
|---|---|---|---|
| Learning curve | VJ#.NET | VC#.NET | VB.NET |
| Language features | VC#.NET | VB.NET | VJ#.NET |
| Developer community | VC#.NET, VB.NET | VJ#.NET | |
| Complexity of code | VB.NET, VC#.NET, VJ#.NET | ||
| Length of code | VC#.NET, VJ#.NET | VB.NET |
Decision
The team will use VC#.NET as their development language with ASP.NET, due to its familiar syntax, shorter learning curve, rich language features and large developer community.
.NET Framework
The choice of a version of .NET Framework not only determines the available framework libraries, but also affects the choices of Visual Studio .NET, C# language, ASP.NET engine and SQL Server.
Options
The two sets of options are:
- .NET Framework 1.1
- Visual Studio .NET 2003
- Visual C# .NET 2003 (C# 1.1)
- ASP.NET 2003
- SQL Server 2000
- .NET Framework 2.0
- Visual Studio .NET 2005
- Visual C# .NET 2005 (C# 2.0)
- ASP.NET 2005
- SQL Server 2005
Advantages of .NET Framework 2.0
There seem to be few performance measurements that have been done by the community to really make a bold statement about any improvement of performance. The comparison therefore mainly focuses on features.
- VC#.NET 2005 Vs VC#.NET 2003
- Important new C# language features:
- Generic types
- Iterators
- Partial types
- Nullable types
- Anonymous methods
- Static classes
- And more...
- New C# compiler features such as "#pragma warning"
- More powerful visual editor
- Enhanced XML/Web service support
- IntelliSense is now also available when authoring web applications
- Important new C# language features:
- ASP.NET 2005 Vs ASP.NET 2003
- Code-Separation model with different folders for better organisation of code
- Compile-on-Demand feature without the need for recompilation
- Has built-in web server (doesn't require IIS)
- Partial classes for code-separation technique in code-behind files
- New properties, methods and events for the Page class
- Master pages for consistent website layout
- A few new events to follow the request processing more closely
- A few new server controls
- Enhanced declarative expression syntax
- And more...
Drawbacks of .NET Framework 2.0
- Backward compatibility is sometimes questionable
Decision
The team decides to develop with .NET Framework 2.0, Visual Studio .NET 2005, ASP.NET 2005 and C# 2.0, mainly due to a variety of enhanced features.
Database Server
Database Management System
Database Management System (DBMS) is designed to manage database and run operations on data requested by numerous clients. There are two major types of DBMS: Relational DBMS and Object-Oriented DBMS. Relational DBMS is that relationships among tables/databases can be created and linked to each other. Whilst Object-Oriented DBMS emphasizes user-defined data types, relationships among tables/databases can be built as well.
DB2 Universial Database
DB2 Universial Database is one of the database products of IBM. Research on DB2 Universial Enterprise Database is conducted.
- Advantages
- DB2 Universial Database's development client is tightly integrated with VS 2005.
- Table, view, stored procedures and functions can be created by wizards.
- Data adapter and dataset can be created by wizards.
- SQL debugging is easy, since SQL debugger is provided.
- Disadvantages
- Extra installations are required. The database management system, development client and addins for Visual Studio(VS) 2005 need to be downloaded and installed before the actual usage. The size is 400MB + 300 MB + 60MB in total.
- The development client of DB2 Universial is similar as VS 2005's server explorer, but it strips some good features which VS 2005 has. For example there is no database diagram, which is aiming for easy to design within the development client.
Microsoft SQL Server Express
Microsoft SQL Server Express 2005 is shipped with VS 2005. It is productive and easy to design database in the Integrated Development Environment.
- Advantages
- MS SQL Server Express is shipped and integrated with VS 2005.
- After a database is initialised, database diagram, tables, views stored procedures, functions, synonyms, types and assembles can be created manually.
- There are numerous resources such as code samples on the web.
- SQL debugger is provided and make debugging much easier.
- It is easy to install and configure.
- Disadvantages
- The performance is slightly lower than oracle database 10g express, when it operates on large data set.
Oracle Database 10g Express
The aim of Oracle Database 10g series is to adopt grid computing technology and provide higher performance on large data set.
- Advantages
- Oracle database 10g release candidate 2 is free and it is more powerful than this express edition.
- The database system and the development client are easy to install. The download size is reasonably small.
- Performance on large dataset is higher compared with DB2 universal & SQL Server 2005 in general.
- Database designer can take the advantage of pl/sql and create more complicate query.
- Disadvantages
- The learning curve is high.
- It is not easy to configure the database with the Integrated Development Environment.
Decision
DB2 Universial Enterprise Database strips some good features of server explorer, by using its own explorer. This will make the design of database a lot more difficult. Oracle 10g Database Express is very advanced, but the learning curve is high. Considering the time constraint for the team project, Oracle 10g Database Express is not recommended. At the end, the team decides to develop using SQL Server 2005 Express, due to its easy configuration and relatively good features.


