LayeredArchitecture

### Cairngorm 3 - [ Home ][1] - [ Guidelines ][3] - [ Tools ][4] - [ Libraries Downloads ][2]
### Cairngorm 2 - [ Home ][5] - [ Framework Downloads ][6] - [ Eclipse Plugin ][7]
### Project - [ Source ][8] - [ Bug Database ][9] - [ Submitting a Patch ][10] - [ Developer Documentation ][11] - [ Forums ][12] - [ License ][13]

Layered Architecture

From within a functional area, classes with different kinds of responsibility belong to different layers than can be changed separately from one another. So if the visual design needs to be tweaked, most changes are confined to the classes in a presentation layer, and not other parts of the code. Do not overuse this prescription and only apply when a separation by i.e. further packaging beyond functional areas improves the readability of code.

Cairngorm recommends the layers described by Eric Evans in Domain-Driven Design:

  • Presentation - presents data to the user and gathers input. i.e. the fancy UI
  • Application - performs the operations of the application. i.e. saving a form
  • Domain - models the business concerns of the application. i.e. the form data
  • Infrastructure - coordinates objects and integrates with other systems. i.e. talking to the server

The figure below shows that code in a higher layer makes direct use of code below it. In the other direction, interactions happen indirectly through event listeners, callback functions and other means.


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.