Re: Simple model-view -separation

From: Tim Van Wassenhove (euki_at_pi.be)
Date: 07/05/04


Date: 4 Jul 2004 23:11:20 GMT

In article <36ae3a0c.0407041127.76ed7598@posting.google.com>, Droolboy wrote:
> Thanks to the feedback on front controllers, I'm not so sure I'll use
> one of those anymore.

You'll be using one (but don't code it... the webserver does that for
you).

If you have some code that should be used in ever script, you could use
OOP and create a base class that contains that code. And then have every
script/page extend that base class. Or in case you don't go for OOP, the
auto_prepend setting can be usefull.

> But I may well have missed the entire point, as i've just been
> skimming through the stuff i found on common template engines..?

>From my point of view there are 2 sorts of templates. Templates to
handle data and retrieve data from the database(s). And templates to
convert the data into nice output, fe xhtml.

-- 
Tim Van Wassenhove <http://home.mysth.be/~timvw>


Relevant Pages

  • Re: Bitwise Mag editorial calls OOP Snake Oil
    ... > gives sharp criticism of OOP. ... object-oriented programming emerged from the universities, ... "If Airbus or Boeing built aircraft like the IT industry builds ... "The point is that when you modify a base class, ...
    (comp.object)
  • Re: [PHP] OOP slow -- am I an idiot?
    ... in several of the sites I maintain I have classes that inherit from a base class called Table. ... I'm the first to admit that OOP is not always the best methadology to use - the 'best methadology for all situations' does not exist. ... OOP is great as long as you follow OOD principles and have a fair amount of common sense. ...
    (php.general)
  • Re: PHP Design tools? IDE?
    ... >> IMHO web programming is definitely a good case for OOP. ... >> common sections as methods of your base class. ...
    (comp.lang.php)
  • Re: PHP Design tools? IDE?
    ... IMHO web programming is definitely a good case for OOP. ... common sections as methods of your base class. ...
    (comp.lang.php)