cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject RE: Cocoon VS PHP
Date Mon, 31 Jan 2000 17:33:27 GMT
Not having any experience with PHP, it's hard for me to say
anything for or against it.

I do know, however, that separation of look, feel, and logic is
easy using the relatively new XSP functionality of Cocoon.
By simply using tags that trigger code in the logic page,
Cocoon inserts the dynamic information in place of that tag.
It is very simple to change any information without knowing
the specifics of what file contains what information.  Due to
the nature of XML, the flexibility and power of Java, and the
power of XSL Transformations, maintainability and
managability in the long term are almost a guarantee.
Because Java is a full fledged language with a rich API, there
is almost nothing you can't do with it.  Out of the box, Cocoon
offers you CORBA (through Java), LDAP, SQL, JavaBeans,
and a host of other very cool features that you would otherwise
have to implement through a new library in PHP (hence phplib).
Java has transaction and user tracking mechanisms built in,
and requires less of an understanding of CGI and other HTTP
sepecific protocols.

The XML can be as terse or as descriptive as you want, so
updating content is as self descriptive as you need it to be.
The stylesheets are a completely separate entity from the
beginning, so no knowledge of an external API is needed.
XSL is actually a fairly powerful technology in its own rite.
Another benefit to Cocoon is the ability to use the same
XML to drive a different look and feel depending on the
client or need.  Of course, a big selling point for me is
XSL:FO for dynamically creating PDF files for reports or
other format sensitive information.  Cocoon also has a
number of big names supporting the libraries that it uses,
ensuring that when all is said and done Cocoon will emerge
a formidable competitor.

Again, I don't know both sides of the story, and I know that
PHP has a significant mind share.  Cocoon's mind share
is based on the parts it uses: Java, XML, XSL, XSP.  The
first three are in heavy use already, and the last (being
new) will increase in use as well.

For maintainability, concurrent development, and object
orientation designed from the beginning, I would choose
Cocoon.  Java is already an approved platform in many
corporations, and more and more sites are adopting
Servlet and JSP as the technology to build their sites with.
It makes it harder to go with a proprietary scripting language
like PHP (even when built on Zend, the scripting language
is proprietary).

-----Original Message-----
From:	Laurent Eskenazi []
Sent:	Monday, January 31, 2000 11:23 AM
Cc:	Christophe Spada
Subject:	Re: Cocoon VS PHP

> I'll take a stab at this.
> I think the PHP compare and contrast to Cocoon is a
> pretty good one, rather than comparing Servlets to PHP
> or something.
> The thing that I think is really incredible about
> Cocoon is how simply and cleanly things are seperated,
> and how readable things end up being. For example, if
> you wanted to make an application that would pull
> stuff from a database, format it differently for
> different users and/or browsers and show a map of the
> position of my mobile operations center and directions
> on how to intercept me at the closest coffee shop you
> could break this up into a few different areas and
> have simulataneous development.
> Some folks could write the SQL, others could handle
> the XSL, and others could write the custom processor
> to handle the mapping thing. The code would be easy to
> read, easy to proof each part and to develop
> seperately. Compare this with something where display,
> database access and logic are sandwiched together.
> Things get comlicated quickly, difficult to update and
> people have to be very clever to work on it.

OK...I'll be the devil's avocate:
PHP has a template system in the phplib, is object oriented, and can pull
data from, doesn't it make it a system able to separe layout,
content and logic ?

Thanks for your help.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message