Thursday 11 August 2016

The layered approach to software development

By,
Rahul

The layered approach to software development
->There is a two layered approach and a three layered approach towards software development.

Two layered approach :
Here the business logic of the system is close bound with the screens.
Thus with every interface we need to re-create the business logic which runs the screen.
Any change to the business logic must be reflected in every screen which deals with that business logic.
This makes the two layered approach rigid and non-reusable across different systems .


 Three layered approach :
Isolates the interface from the data.

Consists of following layers :
a. Business Layer :
Contains all the objects from the real word and which need to be represented within our system.

Responsible for understanding the interactions between these objects and learn the business processes through these interactions.Objects are not responsible for the way the data is displayed. Thus they have no knowledge of any interface.

->Objects should not know about the data location details. They should only know which routines to call in order to get or process the data that they want for business process.
           
Captures the static and dynamic relationships between the business objects.
Consider an example where we are building a system to process the invoices of customers. The invoice object should not be concerned with how the details of the invoice are shown on the screen or how they are captured. Also it should not be concerned with where the details are stored and how. It should only know which methods to invoke to verify the data and process it further.
Once an invoice is generated dynamically the quantity of items     should be checked and reduced. And each customer should be allowed to have more than one invoice thus showing static relationship between the two classes of our system.

->These objects are identified during the object –oriented analysis phase.

b. User Interface Layer :
->This layer consists of objects which are viewed by the user.
->This is also called as ‘View Layer’.

->It is responsible for responding to user interaction. Which means that the objects in this layer should have the necessary logic to handle various actions like button click, mouse click, selection of an option from a list, entering text in a text box, etc coming from the user.
It is also responsible for displaying the business objects. Thus how the data is captured and how it is displayed to the user. Maintaining uniformity while displaying business objects across platforms, etc is handled by this layer.   
The objects in this layer are identified in the object-oriented design phase.
It takes inputs from the use cases made in object-oriented analysis phase.

c. Access Layer :
This layer contains objects that know how to interact with the objects that hold data. Such objects could be either databases, mainframe, files, etc.The objects in this layer are responsible firstly for translating the request for data into the syntax which will be understood by the data source.

Secondly these objects need to convert the incoming data from the data source into a format which will be as per the business objects and pass those objects bask to the business layer.
These objects are identified during the object-oriented design phase.           

No comments:

Post a Comment