Federico Mengozzi

Architectural pattern and style

Event-Based style

  • Source that generates events
  • Sinks that handle events
  • Event channels, multicast groups connect source and sinks.Sinks register for event notification while source generate events and notify (asynchronously) registered sinks

Client-Server model

  • Client request services
  • Server provide the service
  • Socket provide communication channels. The server is persistent (also known, reliable and fast) while it’s uo to the client to initiate a service request

Three-tier architecture

  • Clients request services
  • Middleware (handle concurrency, are shared and persistent) process/converts data
  • Database (shared and persistent) provide the service
  • Sockets and function calls allow communications

Model-View-Controller

  • Model (decouple form View and Controller) maintains data, logic and rules of application
  • View (observer of Model) output representation of data
  • Controller (observer of Model) accepts input and convert it into commands for both Model and View
  • Function call allow communication from Controller to Model, callbacks can be used to notify View from Model

Model-View-Presenter

  • Model (decouple form View and Controller) maintains data, logic and rules of application and notify Presenter
  • View is a passive interface that output data representation when requested by Presenter
  • Presenter retrieve data from model and format it for view. It’s a middleware between View and Model

Data-Context interaction

  • OOP is good at capturing state and operations associate with a state are well expressed. It separates domain model from use cases and roles of object. It’s generally an overkill for CRUD applications
  • Data is what the actual system is
  • Context assigns roles for every object. It invokes the role method for the first object and then each role invoke each others methods
  • Interaction is the stateless object that play the role
  • Member function and events handler are used for communication

Traits patter

  • Provide information about a type during compilation. The trait information is put into a template and some specialization of that template. Traits are implemented using struct (trait classes)

Entity-Boundary-Interaction

  • Entity contains application agnostic logic
  • Boundary translate request and response to UI
  • Interactor contains application specific logic
  • Member function and events handler are used for communication
  • It separate the concerns, allows for quick porting and testing of the code
Go to top