By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,483 Members | 3,312 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,483 IT Pros & Developers. It's quick & easy.

component based php architecture

P: n/a
Hi,

I'm a java developer trying to get acquainted with PHP.

In java web development, the most popular web applications framework is
Struts, which is equivalent to Smarty.

The problem with both is that they don't give you a true rich web
application support. What I'm looking for is the equivalent of JSF,
tapestry etc.: creation of application components, registering
listeners to components, lifecycle management, navigation, exception
etc.

I would like to request for some pointers to such frameworks (if exist)
that are based on PHP.

Thanx,
Ittay

Jul 17 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
On 2005-03-08, it********@gmail.com <it********@gmail.com> wrote:
Hi,

I'm a java developer trying to get acquainted with PHP.

In java web development, the most popular web applications framework is
Struts, which is equivalent to Smarty.
I don't think it's equivalent with Smarty.

Smarty is a template engine, making a comparison with JSP more
reasonable. Meaby you want to have a look at the WACT taglibs too...
(wact.sf.net)
The problem with both is that they don't give you a true rich web
application support. What I'm looking for is the equivalent of JSF,
tapestry etc.: creation of application components, registering
listeners to components, lifecycle management, navigation, exception


We've hadded our discussions on frameworks and components etc... Not
going to do that again. List (and comparisons) can be found in the group
archives...
--
Met vriendelijke groeten,
Tim Van Wassenhove <http://www.timvw.info>
Jul 17 '05 #2

P: n/a
Ittay,

Php isn't Java. In the first place we tend to keep things simple.

Second, in php4, which is still the main production environment, has
been kept VERY simple: there are no real object references, no
interfaces, no event model, no exceptions, no packages, no class loader,
no component model, no comparable interface, and certainly nothing like
EJB containers/application servers. If you want these things, you have
to define them yourself, or find workarounds where it's not possible to
do so. This is especially tricky with the implicit copying php4 does,
which can be a real performance killer.

Third, your objects only live for the duration of one request. This
greatly simplifies things as there is no multi threading and lifecycle
management is no big deal (caching is, if you want persistency with
domain model navigation).

Fourth, in php4 garbage collection is limited. You should avoid making
cyclic references, also becuase == does not like them.

Fifth, there is php5, that solves the most important limitations, but at
the same time is different enough to break existing OO code you want to
port from php4 (and back, if you have an installed base on existing
customers op php4). You can write your code to be portable on top of a
small version isolation layer, but if you care about references and
copying, you do need to know what you are doing.

So personally i think this is more then enough reason to use a framework
that offers solutions for these issues. But i must admit, i did both
Smalltak and Java for several years, so i guess i am pritty biased.
Anyhow, even i do think simplicity is one of the greatest features of
php, and reason enough to ask yourself if your applications really need
all this abstraction & complexity that frameworks bring.

Greetings, have fun,

Henk Verhoeven,
www.phpPeanuts.org.
it********@gmail.com wrote:
Hi,

I'm a java developer trying to get acquainted with PHP.

In java web development, the most popular web applications framework is
Struts, which is equivalent to Smarty.

The problem with both is that they don't give you a true rich web
application support. What I'm looking for is the equivalent of JSF,
tapestry etc.: creation of application components, registering
listeners to components, lifecycle management, navigation, exception
etc.

I would like to request for some pointers to such frameworks (if exist)
that are based on PHP.

Thanx,
Ittay

Jul 17 '05 #3

P: n/a
ok, for what it's worth, i've found phptal.sf.net and wact.sf.net.

phptal is like tapestry in many aspects, wact seems to draw on a lot of
good patterns.

Jul 17 '05 #4

P: n/a
thanks for your reply.

as far as frameworks go, we're currently developing with struts and
have apx. 40 pages. the annoying thing is that for every new page you
have to create a set of java classes, that changes to pages tend to
break them and that there's no components to reuse layout etc.

we're looking at php exactly for the reason you've mentioned: its
simplicity and short development-deploy cycle. however, going ahead and
developing our web interface using simple php-in-html will be a
nightmare i think.

i want to be able to have presentation components that allow me to
assemble a page only on the view side, with no coding needed. i want
something that tracks changes that the user has made before submit for
me, rather than need to do it on my own. i want to be able to easily
reuse presentation items like tables (with sorting), menues etc., and
not have to write them on my own every time.

and, i want it all to be simple to understand ;-)

ittay

Jul 17 '05 #5

P: n/a

<it********@gmail.com> wrote in message
news:11********************@f14g2000cwb.googlegrou ps.com...
thanks for your reply.

as far as frameworks go, we're currently developing with struts and
have apx. 40 pages. the annoying thing is that for every new page you
have to create a set of java classes, that changes to pages tend to
break them and that there's no components to reuse layout etc.

we're looking at php exactly for the reason you've mentioned: its
simplicity and short development-deploy cycle. however, going ahead and
developing our web interface using simple php-in-html will be a
nightmare i think.

i want to be able to have presentation components that allow me to
assemble a page only on the view side, with no coding needed. i want
something that tracks changes that the user has made before submit for
me, rather than need to do it on my own. i want to be able to easily
reuse presentation items like tables (with sorting), menues etc., and
not have to write them on my own every time.

and, i want it all to be simple to understand ;-)

ittay


Take a look at http://www.tonymarston.net/php-mysql...plication.html.
You can run the sample online, then download all the source code to see how
it works. This works with PHP 4 or PHP 5.

--
Tony Marston

http://www.tonymarston.net

Jul 17 '05 #6

P: n/a
it********@gmail.com wrote:
i want to be able to have presentation components that allow me to
assemble a page only on the view side, with no coding needed. i want
something that tracks changes that the user has made before submit for
me, rather than need to do it on my own. i want to be able to easily
reuse presentation items like tables (with sorting), menues etc., and
not have to write them on my own every time.

and, i want it all to be simple to understand ;-)


ittay: we developed something like that for ourselves. Because we wrote it,
we can use it like it is late-beta, but for someone else it would be more
like early alpha. If you are intestested, drop me an email (see sig
block).

The design assumption is that you would prefer *zero* coding if possible, so
it never makes you do anything routine, the only time you do anything is to
make an explicit exception to its normal behavior. There is never anything
that starts off, "Now you must remember on each page to do step X...."

You use it by defining a database structure, including automation and
constraints. It builds the database for you (PostgreSQL) and then puts a
copy of the data dictionary into the web server, where run-time PHP
libraries read the data for particular tables and serve up appropriate
pages. There are extensive facilities for overrides and customization, but
again, our own design goals are to never actually use those, we want
everything data driven.
--
Kenneth Downs
Secure Data Software, Inc.
(Ken)nneth@(Sec)ure(Dat)a(.com)
Jul 17 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.