Putting into practice Flashcards
(5 cards)
What’s the guideline for which pattern to use in developing an application
1- Option layer by layer
2- Option depending on the technological platform
Main options in the domain layer
Transaction Script
– Best for simple apps
– Procedural logic, easy but not scalable
Table Module
– For moderate complexity
– Logic tied to DB tables, OK for form-based apps
Domain Model
– For complex/extensible logic
– Full OOP, harder to map to DB but powerful
Main options for the data layer:
It depends on the choice of the domain layer
Transaction Script → Row Data Gateway or Table Data Gateway
(+ Optimistic Offline Lock if editing before saving)
Table Module → Table Data Gateway
(+ Unit of Work for concurrency)
Domain Model
Simple: → Active Record
Complex: → Data Mapper
Main options for presentation layer
- Use client side frameworks for interactive apps
-Use server side rendering for simpler HTML based apps
When is MVC used?
Model View Controller is used in both cases,
Model in Domain layer (handles data & logic)
View & Controller in Presentation layer
Controller:
- Page controller-> simple document
oriented sides (static + dynamic)
- Front controller -> more complex and interactive interfaces, both client and server side
View:
- Template view: common, simple, server
page + client side
- Transform view: with XML input, allows
output formats
- Two step view: unusual, for very
complex view with different output
formats