Guideline for an effective Software Solution's Logical Architecture
Guideline for an effective Software Solution's Logical Architecture
In this article, I will describe the architecture of a windows application. Based on my experience, I found that design pattern has a high influence on the success of an application. If architecture is good, rework is less and maintainability is secured, means change is easily manageable. Component reuse is likely to occur if a good n-tire logical architecture is established for any company at any level. Here, I have presented an architecture which I have used in an enterprise business solution.
In the following, I have mentioned the word Layer where each layer represents a class library and the UI layer is a windows Application. In the Project Name, PPL is the Company's Prefix, Mod is module's prefix and the suffix in the Project Name is Layer's Name.
Solution Architecture
1. User Interface Layer
2. Common Layer
3. Factory Layer
4. Interface Layer
5. Data Model Layer
6. Business Logic Layer
7. Data Context Layer
8. Data Access Logic Layer
9. Query Generation Layer
User Interface Layer
Uses: User Input will be taken from this layer and user Output will be shown in this layer. Events will be handled in this layer. This layer will call factory methods to create BLL objects. This layer will only call BLL methods and will get necessary input and output from the BL layer.
Project Name: PPL.UI
Common Layer
Motivation: The design pattern of the common class will be singleton. That is it will Ensure that only one instance of a class is created. Provide a global point of access to the object. In that case the instance can be used from everywhere without calling directly the constructor each time.
Uses: There will be a class which will create a 36 Char Unique Id which will be the primary key value of the columns. There will be a class which will hold the login credentials, company name, company Id etc which data are global to the application. This layer will be used by all modules, so this has no module "MOD" in the project name.
Project Name: PPL.Common
Factory Layer
Motivation: creates objects without exposing the instantiation logic to the client. It refers to the newly created object through a common interface.
Uses: There will be one factory class for one unit of a module. All the object creation of that unit will be created in that class.
Project Name: PPL.MOD.Factory
Interface Layer
Uses: This layer will provide the skeleton of the business logic layer. All the business layer classes will implement a particular interface for a particular class. In UI layer, the BLL classes will be handled by the interface objects.
Project Name: PPL.MOD.Interfaces
Data Model Layer
Uses: The objects of the classes of this layer will hold an entity. The objects of this layer will be used in UI, BLL, Interface and Data Context layers. Generic List will be used to hold or transfer entity list between layers.
Project Name: PPL.MOD.Model
Business Logic Layer
Uses: This layer will call the data context layer methods and also perform business functionality in these classes. Each class will implement a particular interface.
Project Name: PPL.MOD.BLL
Data Context Layer, Data Access Logic Layer, Query Generation Layer
Uses: BLL will call the DC layer and will pass the Model object. DC layer intern will call the Query Generation layer to generate the insert or update query. If the query is a select, then DC will hardcoded the query string. Then the query string will be passed to DAL layer for execution. The execution will be CRUD operation.The resulted data will be back to the DC layer, then will back to BLL and then will back to UI layer for output. Otherwise DAL will execute and make the data persistent in Database. The DAL and Query Gen projects will be used by all modules.
Project Name: PPL.QueryGen, PPL.DAL, PPL.MOD.DataContext
Benefits of the Architecture
The Open Close Principle states that the design and writing of the code should be done in a way that new functionality should be added with minimum changes in the existing code. The design should be done in a way to allow the adding of new functionality as new classes, keeping as much as possible existing code unchanged.
How Applied: In the prescribed solution's design pattern, all the BLL classes are handled with Interfaces. The objects are created in the factory layer which makes the code easy extendable when new functionality arises.
The dependency Inversion Principle states that in a bad design the high level class uses directly the low level classes. High-level modules should not depend on low-level modules. Both should depend on abstractions. Abstractions should not depend on details. Details should depend on abstractions. That is the high level class uses complex logic, so when new detail low level class comes, the high level class should not be changed, instead an abstract class should stay between the high level class and the low level class.
How Applied: In thesaid system, the high level module is the UI layer. UI layer calls the BLL layer which implements the interfaces. Here the BLL layer is the abstraction who intern calls the Low level layer. If new low level layer comes because of new functionality, we then need to implement the same interface in a new class. So the high level modules code don't need to be changed.
Spy Phone Software Sms Spy, Sms spy software Is President Zapatero paying King Mohamed´s silence over a coup d´etat disguised as a terrorist attack? Outlook Error 0X800Ccc79 - Easy Solution! All You Need To Know About Bsod Error Microsoft Outlook Error 0X80070057 - Here is a Fixer! Microsoft Outlook Error 0X800Ccc78 - You Can Fix it! Outlook Error 0X80070021 - Read Now! It Outsourcing In Software Developments Solution To Rectify Warning Error Message While Using Ntbackup Tool Advantages Of Using Picture Recovery Software Abiquo's Cloud Management Software Promises To Revolutionize Cloud Hosting Improve Your Software Sales Thru Pay-Per-Leads