ivan.novakov@merck.com
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
Application
Data access
Persistence
5 layer model
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
Utils
Logging
Monitoring
Security
Debugging
I/O
UI
Controller/View
Business logic
Domain logic
Storage
Database
ORM
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
By Ivan Novakov