So, I've been sitting in an Enterprise Java Beans class all week. Well, it's not really EJB, but more of "here's vendor X's server that supports EJB so we'd better teach you how to write them." I have noticed several things while sitting here thinking about the Perl that I'm not coding.
First observation: EJBs seem a lot of work to get something useable. Let me use what's called an entity bean as an example. The entity bean is the most complex of the bean types, as it maps to a table in your database (only ONE table, unless you want to write lots of extra code). To make this bean you have to create these files:
- Remote Interface
- Home Interface
- The bean class
- A "Primary Key" class
- One or more XML descriptors
Not to mention the fact that once you're done you still need to write a test client to make sure everything works correctly.
Granted, this was most everybody's first time writing beans, but should it really take almost an hour to write something that will extract "Hello World" from a database? What it is that beans do that can't be done in Perl?
Access database info? Check.
Session management? Check.
Granted, some of the things that beans do take more code in Perl, but all it takes is an enterprising individual (or more) to write a module that handily abstracts the details away.
Why should we pick an expensive server softwrae solution, and spend a good deal of time overcoming the bean learning curve when Apache and mod_perl will provide nearly all of the same functionality? I understand that if we're writing pure Java-based clients having a bonafide application server is a plus, but for what we're doing Web access is all we need.
GuildensternNegaterd character class uber alles!