|
Posted by Mike Placentra II on 10/02/65 12:00
On Jan 16, 3:16 pm, dittonamed <dittona...@gmail.com> wrote:
> I will be building a "template" from this to be included in each page
> of a PHP/JS/HTML project i'm starting soon, but I'm curious what other
> connoisseurs might think of my layout. Hmm like throwing the GET/POST
> processing between the <head> and <body> tags is a new idea, but it
> seems logical. Any caveats or anything watch out for?
>
> Any thoughts?
>
> Cheers!
There's no advantage to processing in the middle of the output. It
makes more sense not to separate your code into header and processing
blocks. All processing should usually be done before any output so you
don't end up with spaghetti code.
You may want to look at the Model-View-Controller (Model2 for web)
design pattern, and maybe check out some frameworks such as Code
Igniter or Zend Framework. It should then be clear that processing is
best done before any output.
Good luck,
-Michael Placentra II | PHP5 ZCE
Navigation:
[Reply to this message]
|