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: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.

Guildenstern
Negaterd character class uber alles!

Replies are listed 'Best First'.
RE: It just seems like so much work...
by Fastolfe (Vicar) on Nov 09, 2000 at 21:06 UTC
    Not all decisions in a business are based on technical merit. There is also cost (developer time), ease of maintainability, and the number of developers on-staff that can maintain it. There are also other business/management issues that you may be unaware of.

    Though don't get me wrong, a lot of decisions are made in companies based on little or inaccurate information, or just because the Big Boss thinks it's the Next Big Thing, but just be aware that Perl isn't always the best solution for the task, and while it seems that in this case it can probably do the job very nicely, there may be other (probably business) reasons they chose to go with what they did.

    If you're involved in the early stages of a project, and you think Perl is the best choice for it, by all means express your opinion and back it up. Perhaps they just haven't heard of Perl being used in these types of things. You'd get bonus points for having a working prototype in an hour. Rapid development = major $$$ savings.

      If you're involved in the early stages of a project, and you think Perl is the best choice for it, by all means express your opinion and back it up. Perhaps they just haven't heard of Perl being used in these types of things. You'd get bonus points for having a working prototype in an hour. Rapid development = major $$$ savings.
      I agree with Fastolfe on this, but I've got to add that you have to make your argument stand on both technical and financial merits. If you're the only Perl programmer in a shop of 35 Javaheads, and even though you could produce it in half of the time of the Javaheads, the cost of training them and the support costs could far outweigh the cost of doing it with existing tools and skill sets.

      Although Perl is a great language, don't let personal bias (or language religion) drive the decision. In fact, if people perceive you as someone who favors a particular language but recognizes the technical merit of others, and knows when how and when to concede the argument gracefully, you'll get far more respect than if you just wander the halls bashing all other languages (and possibly decisions that you don't understand the full constaint set of).

      If you have a few moments, I think the last paragraph of (jcwren) RE: RE: why i may have to leave perl... expresses well how I feel about language bigotry.

      --Chris

      e-mail jcwren
(jcwren) RE: It just seems like so much work...
by jcwren (Prior) on Nov 09, 2000 at 21:01 UTC
    Well, I know less than nothing about EJB, but I'd like to see a tablized comparison. Since this is still fresh in your mind, perhaps you could generate a short table for us?

    --Chris

    e-mail jcwren
RE: It just seems like so much work...
by FouRPlaY (Monk) on Nov 09, 2000 at 23:55 UTC
    I think of this like spoken languages. Sure English is great. We know it cold, it's the offical language in North America (US&CAN) and the European Union. But even within those regions, there's advantage to speaking other language. It allows you to move comfertably from one situation to the next.

    Using only Perl would allow you to do just about anything. But as Fastole and jcwren mention, sometimes you need another language that better fits a situtation. Here in Canada, French and English are offical languages, and when I took a trip to Montreal, I brought along a French/English dictionary so I could be better equiped to deal with anything that came up.

    Well, that's my two cents.



    FouRPlaY
    Learning Perl or Going To Die Trying