Mailing List Archive

the gauntlet is thrown
how many of you read the article linked by slashdot today,
entitled 'a perl hacker in the land of python', at
<http://www.byte.com/feature/BYT20000201S0001>?

the last point, that the perl world has no application to
compare to zope, is 100% dead on. im not so concerned with
perl having a 'killer app' to lead newbies to the language,
as i am that if i want to write a web application that i
want to be widely used, i have to choose from a number of
different architectures: mason, embperl, eperl, asp,all of
the other happy template-based systems, cgi emulation
(Apache::Registry), roll my own, etc. its really frustrating
that a large part of the user community has to miss out on
my application because their sysadmin doesnt want to install
mod_perl, or is religious about mason, or whatever.

besides python/zope, look at java's j2ee. even better: you
have a well defined web server interface (the servlet api),
a well defined application server environment (ejb), and a
well-embraced user interface mechanism (jsp). not everybody
loves every piece of j2ee, but there is significantly less
fragmentation in that world than in ours. in fact, even if
you choose to not use jsp for your user interface, you can
still take advantage of all of the features provided by a
servlet container, as guaranteed by its conformance to the
servlet spec. so if your application also conforms to the
spec, then sysadmins all over the world can configure and
run it in exactly the same way they run every other servlet
application. no setting up /perl for Apache::Registry,
/mason for mason, matching *.ehtml with embperl, trying to
figure out how to construct different mason interpreters for
two logically separate applications with different security
requirements. it all just works (well reality may be a
little different but 80% of the way there is much better
than 10% of the way there).

i've been tossing around the idea with a few other folks of
a perl port of cocoon (<http://xml.apache.org/cocoon>). one
of the reasons we cant build an almost lookalike version is
that we have no standard web server interface, so we have to
tie ourselves very closely to the apache api. this means
that folks with investments in netscape and microsoft
servers and dependent technologies dont get to use our work.
suck. so i've been thinking about the feasability of porting
the servlet api itself. this addresses part of the problem,
but not the 'application framework' part that so many people
love to re-invent: how do i efficiently manage connections
to backend resources (databases, directories, etc)? how do i
implement transaction management, event notification,
messaging services, etc? again, in the java world, people
are tending to use ejbs and container managed persistence in
combination with jdbc, jndi, jms, javamail, etc. standard
apis that every application writer can assume.

in a slightly different vein - somebody said to me once:
'where do you we make dollars? email messages and calendar
events, or threads and databases?' if we want perl to
continue to be taken seriously as a choice for business and
consumer applications, we need to make it easy for
professional application developers to concentrate on the
activities that more directly help them generate
revenue. tmtowtdi is great for building components, but it
can be terribly frustrating for user apps.
Re: the gauntlet is thrown [ In reply to ]
It is ironic that you should post this. Some of what you say is being
addressed by the work we are doing in Extropia (but I am sure it will be
taken as yet another platform on Perl and that's OK... I prefer people
to have freedom to choose instead of being locked in to a single
solution -- let evolution take its course).

For example, Nikhil Kaul and I have written a duplicate of the Java
Servlet session API in Perl including cookies based management (using
Extropia::SessionManager::Cookie wrapping around an Extropia::Session).
Yet you don't lose the usefulness of Jeffrey's Apache::Session work,
because Extropia::Session wraps around Apache::Sessions as well as
implements its own. One of these days I'll put this stuff on CPAN...I
was hoping to do it this week...

As far as j2ee is concerned, I think it has serious work to get to the
level of ZOPE. Servlets are an API but they are not really that easy.
Beyond cookie based session management, the servlet API itself is quite
minimal.

I may get caned for saying this, but I don't believe DBI is as clean an
abstraction as JDBC. But I think DBI is easier...so... I think it is a
good trade off. So DBI == JDBC in functionality space. Plus, CGI.pm
interface is basically == Java Servlet API minus Sessions...

As for EJB, I don't think it is all that it is cracked up to be. SOAP
(Simple Object Access Protocol) promises to be a much more interesting
cross platform protocol for triggering calls to remote objects in a
cross platform manner. The Perl implementation is definately rough
though. I found XML-RPC much easier, but I think SOAP will end up
catching on. The transactional nature of EJB is overrated the same way
MTS is overrated in Microsoft.

I do think it is absolutely unforgiveable that PerlEx (I believe
Velocigen does now) promote compatibility with mod_perl. I don;t know
about now, but even about 3 months ago, PerlEx documentation recommended
using a global connection variable at the application level to persist a
database connection instead of Apache::DBI. Weird.

Why doesn't PerlEx documentation point to Stas' Mod_perl miniguide? The
Miniguide is excellent documentation for PerlEx which suffers from the
same issues as mod_perl (but the same performance enhancements)... In
fact, they could help Stas by creating a PerlEx differences section...
Instead , PerlEx feels like a separate commercial product... same with
Velocigen. Why don't the Velocigen guys help Stas with the mod_perl
miniguide to, again, provide a single source of knowledge for coding
cross-platform Accelerated Perl solutions?

I think your concerns about cocoon porting to Perl are right on the
money though. It would be nice if the server hooks could be made similar
across open source and commericial Perl accelerators and server plugins.
On the other hand, I have to admit that Java lends itself particularly
well to server code due to its multithreaded and memory sharing
capabilities. It's really tough writing a true equivalent of an EJB
server in Perl because each Perl engine would have its own memory space.
I honestly don't see multithreaded Perl being as easy to use (especially
with non-thread-aware CPAN modules) as Java which was made multithreaded
and memory sharing aware from the beginning.

They are just different architectures and you can't easily map one to
the other.

Later,
Gunther

PS Whoops.. maybe this belongs on advocacy.

brian moseley wrote:

> how many of you read the article linked by slashdot today,
> entitled 'a perl hacker in the land of python', at
> <http://www.byte.com/feature/BYT20000201S0001>?
>
> the last point, that the perl world has no application to
> compare to zope, is 100% dead on. im not so concerned with
> perl having a 'killer app' to lead newbies to the language,
> as i am that if i want to write a web application that i
> want to be widely used, i have to choose from a number of
> different architectures: mason, embperl, eperl, asp,all of
> the other happy template-based systems, cgi emulation
> (Apache::Registry), roll my own, etc. its really frustrating
> that a large part of the user community has to miss out on
> my application because their sysadmin doesnt want to install
> mod_perl, or is religious about mason, or whatever.
>
> besides python/zope, look at java's j2ee. even better: you
> have a well defined web server interface (the servlet api),
> a well defined application server environment (ejb), and a
> well-embraced user interface mechanism (jsp). not everybody
> loves every piece of j2ee, but there is significantly less
> fragmentation in that world than in ours. in fact, even if
> you choose to not use jsp for your user interface, you can
> still take advantage of all of the features provided by a
> servlet container, as guaranteed by its conformance to the
> servlet spec. so if your application also conforms to the
> spec, then sysadmins all over the world can configure and
> run it in exactly the same way they run every other servlet
> application. no setting up /perl for Apache::Registry,
> /mason for mason, matching *.ehtml with embperl, trying to
> figure out how to construct different mason interpreters for
> two logically separate applications with different security
> requirements. it all just works (well reality may be a
> little different but 80% of the way there is much better
> than 10% of the way there).
>
> i've been tossing around the idea with a few other folks of
> a perl port of cocoon (<http://xml.apache.org/cocoon>). one
> of the reasons we cant build an almost lookalike version is
> that we have no standard web server interface, so we have to
> tie ourselves very closely to the apache api. this means
> that folks with investments in netscape and microsoft
> servers and dependent technologies dont get to use our work.
> suck. so i've been thinking about the feasability of porting
> the servlet api itself. this addresses part of the problem,
> but not the 'application framework' part that so many people
> love to re-invent: how do i efficiently manage connections
> to backend resources (databases, directories, etc)? how do i
> implement transaction management, event notification,
> messaging services, etc? again, in the java world, people
> are tending to use ejbs and container managed persistence in
> combination with jdbc, jndi, jms, javamail, etc. standard
> apis that every application writer can assume.
>
> in a slightly different vein - somebody said to me once:
> 'where do you we make dollars? email messages and calendar
> events, or threads and databases?' if we want perl to
> continue to be taken seriously as a choice for business and
> consumer applications, we need to make it easy for
> professional application developers to concentrate on the
> activities that more directly help them generate
> revenue. tmtowtdi is great for building components, but it
> can be terribly frustrating for user apps.
Re: the gauntlet is thrown [ In reply to ]
> > so i've been thinking about the feasability of porting
> > the servlet api itself.
>
> What about porting the mod_perl API to other servers instead? I don't
> think there's much in it that's Apache specific. Or were you thinking
> that you need the extras in the servlet API, like built-in session
> support?
>

Hrmm..., well let me just talk about this for a moment. There is
actually quite a bit of Apache specific stuff. When I first set out
to make mato_perl (a mod_perl for phhttpd) I toyed with the idea of
porting mod_perl to phhttpd. But decided instead to write from
scratch, why? Easy answer... there is quite a bit of Apache specific
code, and a lack of commenting in the code itself. Trying to figure
it all out was mind bending while writing from scratch was actually
much easier.

However much could be said about porting because there is a WEALTH of
modules available... but have you ever thought of the fact that
they're named Apache:: is quite telling? They weren't designed in a
generic way, but rather hook into the API itself. Bummer for me.
Another item, DBI was hacked to include the ability for Apache::DBI to
handle caching of connections, but the hack didn't allow for you to
have another named module to cache instead. Bummer..., there are lots
of reasons why its tough to port, but the key reason is that it wasn't
designed generically... it was designed specifically.

Oh well, happy coding,
Shane.
(Details can be had about mato_perl if you check the reply I just did to
Doug about Clearing the PAD between executions, or something similar)
Re: the gauntlet is thrown [ In reply to ]
On Wed, 16 Feb 2000, brian moseley wrote:
> how many of you read the article linked by slashdot today,
> entitled 'a perl hacker in the land of python', at
> <http://www.byte.com/feature/BYT20000201S0001>?
>
> the last point, that the perl world has no application to
> compare to zope, is 100% dead on.

There is a project called Iaijutsu which is coming along nicely. Take a
look at http://www.ninjacode.com/iaijutsu/ for more.

> im not so concerned with
> perl having a 'killer app' to lead newbies to the language,
> as i am that if i want to write a web application that i
> want to be widely used, i have to choose from a number of
> different architectures: mason, embperl, eperl, asp,all of
> the other happy template-based systems, cgi emulation
> (Apache::Registry), roll my own, etc. its really frustrating
> that a large part of the user community has to miss out on
> my application because their sysadmin doesnt want to install
> mod_perl, or is religious about mason, or whatever.

Your point about fragmentation is well taken, but Python is the same way.
Zope is not the only Python web server API, it's just the most popular
one, and plenty of sysadmins still won't install it. It's possible that
one of the Perl solutions will end up getting a huge following, and be a
similar phenomenon to Zope. Anyway, if you code to the mod_perl API,
anyone with mod_perl can use your stuff without installing
Mason/Embperl/etc.

> besides python/zope, look at java's j2ee. even better: you
> have a well defined web server interface (the servlet api),
> a well defined application server environment (ejb), and a
> well-embraced user interface mechanism (jsp).

EJB has many detractors and is fragmented by the differences in vendor
implementations. JSP is becoming standard but it also has plenty of
enemies who don't like the lack of separation between code and
presentation. I'm not sure either of these has sweeping acceptance by the
majority of Java users (although they have been accepted by Java vendors).
Perl gives you choices.

> so if your application also conforms to the
> spec, then sysadmins all over the world can configure and
> run it in exactly the same way they run every other servlet
> application. no setting up /perl for Apache::Registry,
> /mason for mason, matching *.ehtml with embperl, trying to
> figure out how to construct different mason interpreters for
> two logically separate applications with different security
> requirements.

Hmmm... I think you still have to do all of that stuff with most servlet
implementations.

> so i've been thinking about the feasability of porting
> the servlet api itself.

What about porting the mod_perl API to other servers instead? I don't
think there's much in it that's Apache specific. Or were you thinking
that you need the extras in the servlet API, like built-in session
support?

- Perrin
Re: the gauntlet is thrown [ In reply to ]
On Wed, 16 Feb 2000, brian moseley wrote:
> how many of you read the article linked by slashdot today,
> entitled 'a perl hacker in the land of python', at
> <http://www.byte.com/feature/BYT20000201S0001>?
>
> the last point, that the perl world has no application to
> compare to zope, is 100% dead on.

No it's not. The perl version of Zope (Mediasurface) is just a commercial
application. Unfortunately both Zope and Mediasurface suck once you get
into them deep enough.

However I have plans on the drawing board for a perl version of a Zopish
thing. I have the db spec written, and some of the code planned out. The
system will allow you to use _any_ template system - Embperl, Apache::ASP,
ePerl, XSLT, etc. Now I just have to get the tuits together to write it. The
idea of the system actually is that the core code is small so it shouldn't
take too long. Expect something this summer - perhaps in time for TPC.

--
<Matt/>

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.
Re: the gauntlet is thrown [ In reply to ]
On Wed, 16 Feb 2000, brian moseley wrote:
> how many of you read the article linked by slashdot today,
> entitled 'a perl hacker in the land of python', at
> <http://www.byte.com/feature/BYT20000201S0001>?
>
> the last point, that the perl world has no application to
> compare to zope, is 100% dead on.

No it's not. The perl version of Zope (Mediasurface) is just a commercial
application. Unfortunately both Zope and Mediasurface suck once you get
into them deep enough.

However I have plans on the drawing board for a perl version of a Zopish
thing. I have the db spec written, and some of the code planned out. The
system will allow you to use _any_ template system - Embperl, Apache::ASP,
ePerl, XSLT, etc. Now I just have to get the tuits together to write it. The
idea of the system actually is that the core code is small so it shouldn't
take too long. Expect something this summer - perhaps in time for TPC.

--
<Matt/>

Details: FastNet Software Ltd - XML, Perl, Databases.
Tagline: High Performance Web Solutions
Web Sites: http://come.to/fastnet http://sergeant.org
Available for Consultancy, Contracts and Training.