Abstract:
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.
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.
Main:
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.
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.
- Fast development.
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.
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
is:
is:
<?php
$atable = new Table(array("width"=>"500"));
$window->insert($atable);
?>
But class.layout also provides “helper functions” – ‘insert’ and
‘table’ which makes it more instinctive for non-object-programming
users and requires less typing.
‘table’ which makes it more instinctive for non-object-programming
users and requires less typing.
<?php
insert($window, table(array("width"=>"500")));
?>