Software Architecture
Software application architecture is the process of gathering all logical, functional and quality needs to define a structured solution that meets all these requirements.
When defining this solution , consider common attributes as Quality, performance , security and manageability.
The system should be designed based on three goals : USER , Business and Infrastructure. the goal of application architecture is to determine the requirements that affect the application's structure. To achieve this goal the architecture seeks between business and technical requirements by use cases and find the way to implement them to the software.
Architecture Principles:
- Consider changing not finalizing
- Do a modeling to analyze and reduce risk
- Communicate and collaborate with the visual modeling
- Identify engineering decisions
Design Principles :
- SoC(separation of concerns)
- SRP(single responsibility principle)
- LoD(low of demeter also known as Least Knowledge)
- DRY
- Depending on the Cost of failure decide the BDUF or YAGNI
Now , some design practice considerations:
- Use design patterns in each layer , but Don't mix design patterns with different paradigm.
- Each component has it's own functionality
- When it is possible do composition instead of inheritance
- Do a coding style specification
- Do an automated Quality Assurance
- Determine all metrics of deployment and application operation
Your determinations to achieve a good architecture will be divided in following items :
- Application Type
- Deployment
- Technologies
- Quality Attributes
- Crosscutting Concerns
Choose an application type : Based on the principle key requirements of your application you make a decision of type of your application as Rich Application , RIA , ARIA , WEB , Service Application or Mobile .
Choose a deployment strategy : Your application deploye in a variety of environments, each with a different configuration and specific constraints as physical components , a limitation on protocols, firewall and router . There are deployment patterns which describe the considerations of distributed and non-distributed scenarios.
Choose technologies : Depending on many factors you decide some technologies , that can be preference , organization policies , infrastructure , skills and ....
Choose Quality attributes : These attributes are the factors to differentiate a good application from a bad one . Quality attributes are based on critical problems that will be solved by the design as Security , performance and ....
Choose Crosscutting concerns: they represent areas of your design that don't depend on any specific layer. They are some concerns as Logging , Authentication , Exceptions handling , Caching and communication.
Architecture Styles :
To achieve a good design , the application need to be shaped by some patterns or styles considering the foundation of the architecture , they are segmented in 4 areas as Communication(SOA, Message Bus) , Deployment(N-Tiers, 3-Tiers , Client/Server) , Structure(Layered Architecture , Component Based , Object Oriented) and domain(Domain driven development). As the need of the design , there is often the design as a composite which is a composition of styles .