It's turtles all the way down. On Sat, Dec 15, 2012 at 11:13 AM, Patrick Leahy <[email protected]> wrote: > If abstractions are the greatest tool to reduce complexity in a system, then > the primary task of the competent programmer is to choose the right > abstraction. > > In the same way that one may define an arbitrarily complex fractal with a > simple set of rules, so too we may generate arbitrarily complex data > structures with simple abstractions. The mechanism for exploiting > self-similarity in object-oriented programming is called inheritance. > > The fundamental interaction of the web framework is this: a Request provokes > a Response. In the context of an MVC framework, there is a division of labor > between the code that handles requests, and the code that handles responses. > In the context of CakePHP, we have both a Request Object, and a Response > Object. > > In another context, we have an HttpSocket class, which has a > HttpSocketResponse class, and is conspicuously lacking an HttpSocketRequest > class. > > And in a far more crucial context, we have the fundamental interaction of > the CakePHP framework with the various database objects. The CakePHP > community is now realizing its need for a Database Response object. The > pattern of interacting with a server has not changed! In order to break away > from a monolithic Model class, we must implement MVC in a microcosm, and to > exploit the self-similarity in all of these various methods. > > We must separate out request handling methods from response handling > methods, and to separate business logic from presentation logic. Whether or > not to represent a response as an object or an array must be a function of > our DataView layer. Our DataModel class seems to already be divided into > various DataSources. These themselves could as easily be subdivided into the > same MVC pattern, down to the function level. > > Finally, and in humility, while I make a great many absolute and imperative > statements, I recognize that they are backed by nothing more substantial > than my own insight and opinion. Feel free to take issue with anything you > see as a misconception. > > -- > Like Us on FaceBook https://www.facebook.com/CakePHP > Find us on Twitter http://twitter.com/CakePHP > > --- > You received this message because you are subscribed to the Google Groups > "CakePHP" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/cake-php?hl=en. > >
-- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php?hl=en.
