Application Layers

ivan.novakov@merck.com

Applications are like onions...

... they have layers.

Layers are groups of objects

Grouping by abstraction level

 

For beter encapsulation and lose coupling

Presentation

Business

Data

3 layer model

Presentation Layer

Business layer

Data layer

Presentation

Application

Business

Data access

Persistence

5 layer model

The rules

A layer should not interact with the layers above

A layer should only interact the layer directly below

A layer should not expose internal details to a higher layer

Errors/exceptions should not be propagated across layers

Presentation

Business

Data

3 layer model

Utils

Logging

Monitoring

Security

Debugging

I/O

UI

Controller/View

Business logic

Domain logic

Storage

Database

ORM

Presentation

Business

Data

3 layer model

User input

HTTP request

Service call with parameters

Data access - request for specific data

UI event

HTTP response

Higher level data object, collection

Raw data

Application Layers

By Ivan Novakov

Application Layers

  • 801