Re: Cleaning up my messy code
| From: | olinux | Date: | Tue, 30 Sep 2003 05:23:52 +0000 |
| Subject: | Re: Cleaning up my messy code | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-164337@lists.php.net to get a copy of this message | ||
Try out smarty (its quite simple). You will get some
ideas on how to structure. I learned that its *ok* to
have some *display logic* in your templates (i.e.
repeating rows). (yes, some will adamantly disagree)
Another thing i learned when using smarty is I like
using arrays to keep things organized.
i.e.
$article['id'], $article['title'],
$article['publish_date'], $article['author'],
$article['content']
rather than
$id, $title, $publish_date, $author, $content
olinux
--- Chris <chrisl_ak@hotmail.com> wrote:
> I am working on a fairly large scale (for myself
> anyway) project using PHP
> and MySQL. I am victim of teaching myself to
> program, not separating
> presentation from my code-- all the things that lead
> to masses of spaghetti
> code so atrocious even I can't figure out what I was
> doing an hour ago.
>
> I'm not looking for an IDE or code generator so much
> as some practical
> advice for organization and framework when
> developing a larger app. I know
> of PHP Fusebox, having programmed with Cold Fusion
> fusebox for a while, but
> it seems like that might be too much. Maybe I just
> need a sensical,
> practical approach to application layout. What do
> you all do? How can I
> learn to be a better PHP programmer in this regard?
>
> c
__________________________________
Do you Yahoo!?
The New Yahoo! Shopping - with improved product search
http://shopping.yahoo.com