Another reason model-view-controller is nice because it has a narrower and
better-defined interface between the UI and the application logic.

Good design typically involves de-coupling the different parts of your
application that do different jobs.  That way a change to one part will have
less effect on another part.

Incidentally, this is analogous to the protocol stack the internet follows -
you have all the higher-level protocols collapsing down into IP, and then IP
is able to use any number of lower-level protocols - ATM, Ethernet, FDDI,
etc.

The same type of movement occurred in web development - style sheets.
Separate content from presentation.  It makes producing and maintaining the
content easier, and makes look-and-feel consistency between pages better.

William Page

> > On another note, I _have_ heard many people disparage PHP because of its
> > lack of template-ishness. Why is "mixing logic and presentation" de
> facto
> > a Bad Thing[tm]? And how else would you go about doing it?
> 
> Using Model-View-Controller architecture and separation often makes your
> code more maintainable and understandable, and more bug-free, since it
> is much more modular.  Not to mention you can change parts of the app
> without effecting the rest.  For example, you could completely redo the
> interface without messing with any of the functionality.
> 
> Mixing presentation and logic is bad because it's essentially spaghetti
> code.  With stateless web pages it's even worse.  There's no way you can
> easily understand and follow the logic when a php program uses such
> mixing of code and html.
> 
> Paradigms like Tapestry for Java use turn the page into more of an
> event-driven paradigm, which is easier to code for and follow the logic
> and flow of the program.
> 
> Michael
> 
> 
> >
> >   ~ ross
> --
> Michael L Torrie <[EMAIL PROTECTED]>
> 
> 
> ____________________
> BYU Unix Users Group
> http://uug.byu.edu/
> ___________________________________________________________________
> List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.708 / Virus Database: 464 - Release Date: 6/18/2004
> 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.708 / Virus Database: 464 - Release Date: 6/18/2004
 


____________________
BYU Unix Users Group
http://uug.byu.edu/
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list

Reply via email to