Re: PHP Design tools? IDE?
From: Tony Marston (tony_at_NOSPAM.demon.co.uk)
Date: 10/08/04
- Next message: R. Rajesh Jeba Anbiah: "Re: Different sessions in different windows?"
- Previous message: Juha Suni: "Re: mysql question using dreamweaver"
- In reply to: grz02: "PHP Design tools? IDE?"
- Next in thread: Tim Tyler: "Re: PHP Design tools? IDE?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 8 Oct 2004 11:25:42 +0100
"grz02" <grz01@spray.se> wrote in message
news:1641ee43.0410071356.717fb49e@posting.google.com...
> Hi,
>
> Im an experienced database+software designer and developer,
> but, unfortunately, anything to do with web-programming and
> web-systems designs is still a pretty new area to me...
> (been working mostly with "legacy" environments the last 10 years)
>
> So I am writing this, hoping to get some useful advise and feedback...
>
> I have done some pretty trivial, small websites with html/PHP,
> and now starting a bit more advanced one, where I will need SQL
> database-support, and will probably go for MySQL.
>
> Of course, I have read some elemantary tutorials and articles on the web,
> but still wonder how PHP is actually being used in practice when
> creating bigger web-sites...
>
> Is PHP usually handcoded?
> Like... you just make up a database, then a number of tables you think
> will do,
> and finally (what I am most concerned about) a multiplicity of different
> PHP script-files in an ad-hoc fashion?
> (I hope not, since it seems that this will quite soon produce a pretty
> diffcult-to-maintain-and-grasp mess of the whole system)
The way to Rapid Application Development (RAD) in any language, not just
PHP, is to have a solid architectural framework with lots of reusable
modules which you can access in order to build individual components or
transactions. You may start by using something pre-written by somebody else,
but once you have sussed out how it works you may wish to customise it,
either because you wish to add more options, or because your personal style
is different.
When it comes to architectural frameworks I would suggest the 3-tier
architecture or Model-View-Controller (personally I use both combined). The
3-tier architecture includes a Data Access Object (DAO) which contains the
code which carries out all communication with the database.
When it comes to building individual components with their own screens you
can either produce all HTML tags from within your PHP code, or you can use a
templating system. Personally I use XSL transformations from XML data as it
is controlled by W3C standards and is used widely across the entire
industry, not just within the PHP world.
If you want further ideas you can browse the articles on my website at
http://www.tonymarston.co.uk/php-mysql/index.html
> So what I would like to learn, is what nice (preferrably free/open-source)
> tools for design and project-management are available?
>
> My idea is that you would like to have some IDE application, something
> like VB or Delphi or VC++, where you design your webpages and
> forms in a graphical manner, and you can code "event" pieces of code
> that will react to clicks, buttons and user-actions like
> in the traditional IDE:s.
Web pages do not have "events" like traditional desktop applications. The
client issues an HTTP request, the web server recives it and generates a
response. Web pages are also stateless, which involves another big change in
thinking.
> And then there is some "compiler" or rather that do all the boring
> routine-work
> of converting your design to html/PHP code.
PHP code is not compiled, it is interpretted. However, there are third-party
utilities that are able to cache the intermedaite bytecode.
> The page-designs would also be based on "templates", of course,
> so its flexible to modify if you want to change the look-and-feel
> of your whole site.
Templating systems do not come built into PHP, you have you choose one and
plug it in to your framework.
> Ideally, I would also prefer that the whole website-design
> would be stored in a separate, fixed set of tables in the database,
> rather than in a zillion different script-files, CSS-sheets, etc.
Dream on. Unless you can configure your web server to access a database you
MUST have scripts as files in a directory.
> I can also envision a design where, even if the website contains
> a huge number of pages and different functions,
> there would actually only be a single PHP-script "index.php"
> and all sub-pages are generated on-the-fly, from arguments
> in the URL, i.e. all URLs simply looking like:
Yuck! You are talking about a front controller. Personally I would avoid
such things like the plague and go for smaller page controllers.
> index.php?pageid=1
> index.php?pageid=2
> ...
> index.php?pageid=productlist
> index.php?pageid=registration
> index.php?pageid=loginform
> index.php?pageid=contactform
>
> etc...
>
> The index.php startfile might only look something like:
>
> <html>
> <php?
> include("lib.php");
> main();
> ?>
> </html>
>
> Then all pages would be generated on-the-fly by the main() function
> (defined in "lib.php", along with a host of useful subroutines),
> and driven by the URL-parameter 'pageid' and the overall site-design
> somehow stored in the database.
>
> All design-work you did in the IDE (graphical, code-snippets, etc)
> would then actually be stored in the DB, and the PHP script-files
> could then be a quite static PHP-implementation of an "engine"
> reading the DB-content and outputting the HTML-code and pages.
WYSIWYG editors for web pages are notorious for producing inefficient HTML
code. Quite frankly if you are unable to build web pages without such an
editor then your are a pretty poor developer. PHP was designed to produce
HTML tags, so if you do not know how to generate HTML tags manually you will
find PHP too difficult for your limited abilities.
> So... could you please give me a short brief/hints/links to what
> IDEs and/or other free tools, along those lines, that already exist
> or what are commonly used for PHP/MySQL in real-world development.
Different developers use different combinations of tools to achieve their
purpose. I do it one way, but a thousand other developers will do it a
thousand other ways. Who is right? We all are. You pays your money and you
takes your choice.
Happy hunting.
-- Tony Marston http://www.tonymarston.net
- Next message: R. Rajesh Jeba Anbiah: "Re: Different sessions in different windows?"
- Previous message: Juha Suni: "Re: mysql question using dreamweaver"
- In reply to: grz02: "PHP Design tools? IDE?"
- Next in thread: Tim Tyler: "Re: PHP Design tools? IDE?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|