There were a couple of discussions on the PHP3 mailing list about whether
PHP is a scripting language or just for embedding in HTML only. From
the web application developer's point of view, I would use PHP as
an alternative to Perl/Java. In this article, I will show you how
to write PHP classes and how to use class.layout
(download) to program your web applications.
PHP3 has the power for serious web applications programming.
If you want to create dynamic web applications, embedding data in
HTML tags is not enough. Please unleash the power of PHP. One big
thing missing from the PHP community is that the lack of useful classes
or libraries which makes Perl so successful. Class.layout is an
attempt to create useful libraries for PHP progammers.
The key benefits of PHP Layout class are:
Pure programming without dealing with HTML tags. You don't
have to count <TABLE>,<TR> etc. HTML tags anymore.
Achieve the most flexbility in web page creation.
Instead of waiting for templates from designers, you have the full
power to quickly create COMPLEX pages from class.layout. PHP Layout
Class uses object programming, but also provides "helper functions"
for easy usage and hides the implementation detail from users.
The raw object-programming syntax to create a table in class.layout
$atable = new Table(array("width"=>"500"));
But class.layout also provides "helper functions" - 'insert' and
'table' which makes it more instinctive for non-object-programming
users and requires less typing.