Thanks again for the great feedback.  We'll review and revise where needed.  By the way, how does the flow of the book read so far?  I know that you've mentioned chapter 1 as being quite slow, but in your opinion do you think the chapters are meshing well with each other in the order that they have been put together?

Thanks, and take care.

Josh Juneau
Twitter ID:  javajuneau

On Tue, Aug 4, 2009 at 4:10 AM, Andrea Aime <> wrote:
Hi there,
continuing on my feedback on the online Jython book.
-> "At the time of this writing, I could only find one completed
dialect, zxoracle, that was rewritten to use zxJDBC, and I’ll be showing
you some examples based upon zxoracle in the next sections".
<warning: rambling personal opinions>
Oh boy, when I read I thought I was having a bad dream. A book about
open source stuff with an example that can only work with Oracle?
Please, don't do this to your readers. PostgreSQL, MySQL, but please,
no, not the beast. (disclaimer, I'm the maintainer of the GeoTools
connector to PostGIS and to Oracle Spatial, so I do have Oracle
installed and I'm talking based on (painful) experience).
-> "You can find the dialect included in the source for this
book"... which are located... where? The mercurial repository does not
contain a folder for chapter 12.
I'm trying to use this one atm:
and installing in into jython/Lib/site-packages/sqlalchemy/databases
-> "we will need to ensure that our database JDBC driver is somewhere on
our path so that Jython can access it." Ok, since we are using jython
from the command line, where is a good place like? I tried to drop
ojdbc14.jar in jython/extlibs with no effect.
In the end I followed the suggestion at
but that seems less than ideal:
>>> import sys
>>> sys.add_extdir('/home/aaime/apps/jython/extlibs')
And in the end it does not work either, when I try to create a table
it keeps on insisting that:

line 80, in connect
    raise exc.DBAPIError.instance(None, None, e)
sqlalchemy.exc.DatabaseError: (DatabaseError) driver
[oracle.jdbc.driver.OracleDriver] not found None None
-> "Next, we’ll create the metadata that is necessary to create our
database table using SqlAlchemy. "
   There are missing imports. From this tutorial
   I see there are missing imports and the creation of the metadata
   object itself. Also, you fist create the engine as "db" and then
   reference it as "engine"
-> "Now, let’s go back and take a quick look at performing all of these
steps in an easier way." Hemmm... what? I typed along with you so far
and you don't even make me insert and retrieve an object? Bohooooo :-(
In fact it would not work either since the sequence has not been
created and declar
-> "hopefully from this example you can see the benefits of using
SqlAlchemy." Hemm... adding a session.commit() at the end would help
seeing the benefits more, especially if you have a sql terminal open
against your db to see what sqlalchemy is doing with the db ;-)
-> Been using Hibernate for a while, yet sqlalchemy seems more compact
to use. So what would be the benefit of using Hibernate
instead? Connection pool? Distributed transactions? Raw performance?
Given a fresh start there should be a point where sqlalchemy is no more
the best solution and Hibernate is to be preferred, where/when is that?
Looking at the example I'm a bit surprised you're not using EJB3.0
annotations, it would make for a shorter example.
-> "This can make it very easy to test web applications as usually the
most painful part of web application development is the wait time
between deployment to the servlet container and testing."
Use JavaRebel and forget about redeploys (just to say that you're
not stuck into redeploying over and over if you don't want).
-> the code examples are un-necessarily verbose, if you just want to
   serve the response the same way implement the "service" method
   instead of doGet and doPost.
   Also implementing getServletInfo is not required
-> the modjy example seems to suggest that in order to run modjy one has
   to hand edit web.xml to point to the jython install each time?
   Gosh, a good java webapp should be a .war that you pass to the
   container, no questions asked. I realize sometimes editing the
   web.xml file is necessary anyways (e.g., reference JNDI resources)
   but imposing that by default seems quite wrong to me
-> "Unfortunately, the official Django site hasn’t released a new build
with all the latest patches from source control". Actually, at the time
of reading ;-) Django 1.0.3 is out as well as Django 1.1
-> "Create a project called ‘hello’ and make sure you add
‘django.contrib.admin’ and ‘doj’ applications to the INSTALLED_APPS"
Where? In Glassfish?
-> The whole way of proceeding seems quite heavyweight to me, skipped
over it entirely. A simple project in an IDE with embedded Jetty setup
would have looked a lot easier. And when you do need to package the
final app doj is available to create the final .war no?
-> "While Django does not natively support database connection pools
with CPython, you can enable them in the Postgresql driver for Django on
Jython." Ouch, gross, does that mean that the trick is limited to
Postgresql? Not using connection pools is a very good way to shoot
oneself in the foot performance wise, especially with Oracle and DB2,
but in general for all databases with the exception of embedded ones
and maybe MySql. Wondering how django can power sites with any sizeable
traffic without pooling _and_ prepared statements usage. A ton of
caching if the site is mostly read-only maybe?
Looking around I found this:
which seems to be quite interesting.
-> "
Pylons grew out of a need to build web applications in environments that
may have existing databases to integrate with and the applications don’t
fit into the a nice"
into the a nice... what?
-> "The best way to install Pylons is inside of a virtualenv. Create a
new virtualenv for Jython and run easy_install"  Uuhh... what? Where are
virtualenvs described in this book?

Andrea Aime
OpenGeo -
Expert service straight from the developers.

Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.
Jython-dev mailing list