Forum OpenACS Q&A: Response to A Technical Paper on Java

Collapse
Posted by Kevin Scaldeferri on
Ben, I'm sorry if my comments were a bit overly-strongly worded.  (Just as an aside, though -- and I don't think this should become an aD vs. OpenACS bickering match -- I don't really think it was any harsher than comments that various members of the OpenACS community have made towards Arsdigitans.)

Since there does seem to be general agreement that this article should be a little clearer about comparing apples with apples and oranges with oranges, I'll leave that issue alone and just comment a little on the O-R mapping issue.

First, I'm certainly not going to claim that "Arsdigita solved the O-R mapping problem."  Our persistence system is still quite young and developing.  Also, it aims to deal with database independence as much as the O-R mapping.  However, already I think it avoids "sometimes increasing the number of database interactions by a factor of 10 or 20".  I honestly can't see how you would make things this bad except by issuing a database statement for every getter and setter call, and I will stand by my characterization of that as naive.  I suppose that if you attempted to do joins in the java layer you could multiply your number of database interactions, but everyone agrees that that is a bad idea, and, besides, our experience with ACS 4 clearly shows that it is very hard to get extensive joins to perform even if you don't have this issue to deal with.

Right now, queries like you describe are dealt with using "DataQueries", which are Java objects that represent a special purpose query.  I'll acknowledge that this isn't the most elegant solution, but it's equivalent to what we were going before in ACS TCL, but with database independence much easier to obtain, so I don't think anyone can really complain.  Work is being done towards the goal of metadata-driven dynamic query generation, but this is far from my area of expertise, so I'm not going to comment further on it.  If people are really interested in how we are dealing with this, I'd encourage you to start a thread on http://developer.arsdigita.com/acs-java/bboard/, since it's more on topic there and you will get the attention of more of the people working on the problem.

I just want to end this with my personal take on this issue.  I can argue for TCL/AOLserver as a good platform for web development.  I can also argue for Java.  The arguments are very different because "web development" is a big subject.  So, there are some types of projects that I would head to TCL for.  If you really are mostly doing string-munging or you want a reasonably simple collaborative app quickly, there are big advantages.  However there are also things that a "real" language is better for.  As Todd said:

_Strong static typing is a boon when a module has predefined functionality (no lambda), certain garantees on inputs, and a large amount of complex operations on internal data. The provided invariance enhances stability on such problem domains._

When I describe the type of systems I work on these days, I tend to de-emphasize the web aspects.  We're building applications that just happen to use the web as their primary interface.  However, they could just as well run as local desktop apps, and if you were writing them in that context, you wouldn't think of doing it in TCL.  You might choose C or C++ or Java or Smalltalk or Lisp, but almost certainly not TCL.  Programming complex applications without real data structures just seems like madness.