Skip to content
Niels Braczek edited this page Dec 3, 2015 · 4 revisions

MVC Implementation

Decision

The proposed command structure will be implemented. (see references; naming according to GOF Design Patterns)

A command decides which model(s) to use. It is responsible for making input available to the model and to add the output to the visitable output object graph. Thus, the model can be literally any object with public members ­ in theory even a J1.5 MVC triad or a non­Joomla solution. The output graph is transformed into a streamable format (according to content negotiation), and ­ if appropriate ­ wrapped into a PSR­7 response object.

Reason

The command/controller approach gives most possible flexibility for the implementation of models, so it is possible to integrate existing software. it allows to do proper CQRS, if wanted, by letting read (‘Query’) and write (‘Command’) commands use their own model. The renderer approach allows to serve any output channel (JSON, XML, HTML, PDF, ePub, ...) without the model or controller even knowing about that.

References