ERP Software Design
This post is about ERP Software Design. Application architecture is a science of application design to achieve specific goals such as performance and scalability. We know that an ERP application consists of data entry forms, business rules, validations, menus, security routines, and other data access routines.
Partitioning application by logically grouping the application based on certain guidelines is an application design that results in Application Architecture. Benefits of this design are:
- The performance of the application is better, the applications will be scalable by being able to incorporate future requirements
- By partitioning an application into logical groups also called as layers results in a cohesive code. Such cohesive code is preferred because similar type of code are placed together and can be managed easily
- The layered based approach provides abstraction allowing modifications at one level without impacting or with minimal impact on other layers
Accordingly four layers are developed for the ERP software: They are Data Layer, Data Access Layer, Business Layer and Presentation Layer
In the Presentation Layer, the code responsible for displaying user interface of the entire application is located.
The common code placed in this layer are windows forms, web forms, user controls and server controls. Examples are data entry forms for the finance module, data entry form for the manufacturing module and similarly for all other modules. Note that Windows Forms are used for client interaction in desktop applications and web forms are for browser-based interaction.
Also note that an application developed based on the layered approach includes code for interaction between different layers. The code which provides interaction between the presentation layer and business layer is located in this layer.
Basic validations which are implemented at the user interface level are also located in this layer. Some examples are checking for blank fields, negative numbers and valid dates etc.
In the Business Layer, the code that implements the business functionality of the application is located. The business logic of an ERP application is implemented by using components.
Business components encapsulate the business logic, also called business rules. These rules constrain the behavior of a business concept to match the needs of a particular company. For example, the business rule that determines whether a given expense account can be allowed a certain amount is encapsulated in the related component of the application.
Business processes are the activities that occur in a business. Examples are Order Processing, Bill of Materials, Issue of Work Order, creating Invoice etc. These business processes are encapsulated in the business components.
One business component may interact with one or more business components to implement a business process. These business processes can be implemented using either c# or vb.net.
The Business Layer also includes code responsible for accessing the Data Access Layer to retrieve, modify and delete data to and from the data layer and move the results to the presentation layer.
Data Access Layer
The Data Access Layer provides access to databases such as SQL Server, Oracle etc. The .NET technology used to provide data access functionality is ADO.NET. The ERP application we are developing accesses data stored in the Sql server database, which is a relational database.
The code in this data access layer exposes the data stored in the database to the business layer.
The Data Layer is the source of the database or data. Popular databases can be SQL Server, Access database and Oracle or XML. Always use stored procedures in the data layer.
We strongly recommend you to use stored procedures for everything in your hand. We recommend stored procedures because they are quick and easy to change. For example, if you need to extract data from two tables instead of a table, you can do so by modifying the stored procedure. The .NET application code can not be changed.