This is a more or less basic version of the stack overflow question , which talks about how most of the introductory materials in MVC applications tend to present a tight connection between models, views, and controllers. For example, you will have a User table that will be modified by the user controller, which in turn repels the filtered data in the user's view. I got the impression that many MVC frameworks tend to reflect this model. Itβs all good and good what it is, but it never leads me to anything other than building and displaying monotonous lists of things with an HTML form.
The MVC structure that now looks is Lithium , which seems pretty interesting, as an example of PHP5.3's smart coding methods. At one end, Lithium has a Model class that offers wrapper objects around individual tables and abstracts some simple queries. On the other hand, he got an excellent agreement on the routing of URLs for method calls on controller objects, which are then displayed to display patterns.
But in the midst of this, I donβt understand where to place all the interesting logic that links the data in table A with the data in tables B through Z. Or at least I'm not sure where to place such logic in such a way that it matches the design structure. As far as I understand, the abstraction of the Lithium Model not much more than the removal of some insert / update / delete pattern at the row level, and the controller / view architecture is mainly related to the user interface. I would not want to put a lot of business logic in the same Controller class, which receives routed function calls from URL requests.
My instinct was to fill the gap with a bunch of my own code that exists more or less completely out of the box. I'm not sure I should expect more than that, but given how rigidly everything else in Lithuania is structured, it feels somehow unsatisfactory, as if I could just reel my own code reduction code without the overhead of the source great structure.
What am I missing here? Is there a recommended architecture or philosophy for using this type of framework?
php model-view-controller lithium
Jeff lee
source share