2486 shaares
83 private links
83 private links
- Problems of MVC - it all gets entangled
- Databases are details, the 'web' is a detail - it should all be abstracted out
- These details are plugins which require the underlying business logic but are never required by the business logic, operate completely separately from them, only invoking them through specific boundary objects
- To abstract out:
- 'Entity' Objects (or Business objects) which do their work independently from any application
- 'Interactor' Objects which take 'Request' Objects, invoke the functions on Entity objects and return the result as 'Result' Objects (they are dependent on the application (i.e. the requests and results are different per application)
- 'Boundary' Objects (or Use case objects) which are implemented by the interactor objects and make sure that certain methods etc are always there for outside plugins to interact with (they make sure the attachment points stay stable)
- A 'Presenter' Object which gets the results out of the 'Interactor' object (through the points of interaction defined by the 'Boundary' Objects) and moulds the 'Result' Object into a 'View' Object
- The 'View' Object is finally pretty much just strings of things to display, formatting of how to display it (e.g. display it in red, or bool to grey out a button, or strings of menu items and so on)
- The 'Viewer' is completely dumb and simply displays everything contained in the 'View' Object