Re: best way for PHP page
| From: | Dave Goodchild | Date: | Wed, 02 Jan 2008 16:13:34 +0000 |
| Subject: | Re: best way for PHP page | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-266474@lists.php.net to get a copy of this message | ||
If MVC is too heavy for you it may also be worth exploring templating
engines such as Smarty:
http://www.smarty.net/
On Jan 2, 2008 4:10 PM, Nathan Nobbe <quickshiftin@gmail.com> wrote:
> On Jan 2, 2008 2:17 AM, Alain Roger <raf.news@gmail.com> wrote:
>
> > Hi,
> >
> > i would like to improve my coding quality when i use PHP code and for
> that
> > i
> > would request your help.
> > in my web developer experience, i have to confess that i've never
> > succeeded
> > in spliting PHP code from HTML code.
> >
> > i mean that all my web pages consist of PHP code mixed with HTML code
> (for
> > rendering pages).
> > Some developers tell it's possible to write only PHP code for web page.
> i
> > agree with them but only when those PHP pages do not render web elements
> > (write text, display pictures, display formular, ...).
> >
> > the purpose of my post is to know if i can really (at 100%) split client
> > code (display images, write text,...) from server code (move or copy
> data
> > to
> > DB, create connection objects,...)
> >
> > so what do you think about that ?
> >
>
> study up on mvc
> http://en.wikipedia.org/wiki/Model-view-controller
>
> then look at some of the popular open source php implementations.
> code igniter is very thin and straightforward.
> you can quickly see how a php application can be separated into layers.
>
> -nathan
>