Concurrency, was Re: Doh! Stupid Programming Mistakes <humor>

Michael L Torrie torriem at
Fri Oct 27 16:16:04 MDT 2006

On Fri, 2006-10-27 at 15:54 -0600, Bryan Sant wrote:
> On 10/27/06, Michael L Torrie <torriem at> wrote:
> > Alas the thing J2EE has really done is to cause a whole generation of
> > programmers to consider SQL as nothing more than a persistent object
> > store.  Things like triggers, stored procedures for enforcing business
> > logic, etc all evoke blank stares these days (PHP is probably more to
> > blame for this, though).  If we treat SQL as the model, or a model, in
> > some cases rather than treating persistent objects as our model, there
> > is a lot of power and flexibility (not to mention consistency) brought
> > to bear on a problem.
> Oh, oh.  How about Rails too?  No SQL required.  It is creating morons
> as we speak!
> Doesn't Catalyst do object-relational-mapping or active-record mapping
> too?  It is evil as well.
> Doesn't TurboGears/Zope/Django have ORM or AR?  EVIL!!

Yes Rails developers with no knowledge of SQL are kept blissfully
unaware of what SQL is capable of, or even really how a relational
database works (they do get exposed to keys and indexing).  Worst of all
they start thinking MySQL is a real database (smile here please!).

Just pointing out that a database is capable of so much more than all of
these frameworks really allow with only their ORA.  And yes it was J2EE
that first made these kinds of things popular (in any form), so J2EE
really is to blame.  And I do think Rails, while cool, might not be the
answer to the right questions.  In fact I've read several articles on
why Rails is a poor idea (biased of course).

> !
> Just pointing out that this isn't a JEE issue.  In fact, the ORM
> concepts popularized by J2EE were so bad, that everyone else has
> copied or extended that concept.  If you're a SQL bigot, then fine,
> use straight JDBC.  You could always do that with JEE anyway.

Sure but J2EE sure adopted the issue big-time.  And having worked with
J2EE back in the bad old days, I got a really sour taste for it all.
Amazing people stuck with it enough to see it through to the current
usable state it's in, which is gratifying.  The J2EE 1.5 model (which
almost no one is yet using) is much much better.

It's not a matter of being an SQL bigot.  Often, particularly if you're
working with a very well-designed, extensive Oracle-based system, this
is the best way to go.  Not always.  And when I was last using J2EE
(2000), I had to resort to SQL often, since the bean model was pretty
weak in those days.  

There are many advantages and disadvantages of pushing logic into the
database engine. The biggest advantage is that the Java (or PHP or Ruby)
is just another front-end to your app.  Having a nice database design
with triggers, constraint enforcement, and stored procedures, allows you
to easy have a web-based front-end, or a standalone gui front-end,
command-line interface, or even a remote telnet curses interface.  

Of course web services do have the same effect in my opinion.

> Personally, I use Apache's iBATIS for my ORM needs.  I find it to be
> the perfect balance between straight SQL and too much magic.
> -Bryan
> /*
> PLUG:, #utah on
> Unsubscribe:
> Don't fear the penguin.
> */

More information about the PLUG mailing list