You are here: Re: General PHP applications « PHP Programming Language « IT news, forums, messages
Re: General PHP applications

Posted by David Haynes on 03/23/06 00:02

odwrotnie wrote:
> I want to know what is the ordinary style in creating PHP applications.
> Should it be one main index.php which will be processing requests from
> many htmls like in JSP technology?
> Or what?
> Thanks for any help and links.
>
> And by the way please recomend me a free tool to write and debug PHP
> applications (does not matter linux or windows).
> I know only VS.Php for Visual Studio and this is what I am looking for -
> syntax colors and running the application by one click.
>
> Thanks!
>
> --Best regards,
> Odwrotnie.

Editor:
A reasonable freebie for editing in either environment is Eclipse
http://eclipse.org with the php plugin
http://www.phpeclipse.de/tiki-view_articles.php

Architecture:
It really depends on the demands that will be placed on the system.
Small applications can be routed through one central controller, more
complex systems may want to spread the load.

Personally, I like to have a 1:1 relationship between the code that
paints the screens (views) and the code that does the business logic
(controllers) and uses objects to talk to the database (model).

So, for example, if I have a subject 'foo', I will have a foo.php which
paints the screen and a foo.ctrl.php which has all the business logic.
This allows me to code things like foo.cell.php for cell phone displays,
etc. without changing the business logic code or the database access
code.

The rule is foo.php is only called by foo.ctrl.php (via a header()
redirect) and foo.php will only call foo.ctrl.php (via POST or GET).

-david-

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация