Struts, Spring, Tapestry, oh my!

Jonathan Ellis jonathan at carnageblender.com
Thu Aug 11 09:32:17 MDT 2005


On Thu, 11 Aug 2005 08:54:42 -0600, "Dennis" <devel at muhlesteins.com>
said:
> Jonathan Ellis wrote:
> >Man.  Twice in one day, I'm marveling at how huge the gap betwen
> >"Jonathan simple" and "J2EE simple" appears to be.  It's like I'm living
> >in some kind of parallel universe.
> >
> >Here's one example just for fun.
> >http://java.sun.com/j2ee/1.4/docs/tutorial/doc/JSFDevelop5.html#wp1003532

> That's exactly the type of simplicity (complexity) I was mentioning
> before.  Web languages have developed to a point where you can do things
> real quick and REALLY simple ( not J2EE simple.)
> 
> You can do it with Java too.  I think J2EE developers just need to
> realize the difference between real simple and J2EE simple.

Yes, you can be simple with Java, like I mentioned with the Java
SimpleORM tool.  But the simplicity:power ratio dynamic languages give
you is really breathtaking.  To stick with the ORM theme, here's a quick
example of what PyDO can do:

# duh
>>> import pydo

# set up the 'sw' pydo connection alias; psycopg is the name of the
driver
>>> pydo.initAlias('sw', 'psycopg', "dbname='sw2' user='silentwhistle'")

# have pydo introspect the database and generate classes
>>> d = pydo.autoschema('sw')

# get the class generated for the users table
>>> Users = d['Users']

# grab a random user whose first name is John
>>> john = Users.getSome(fname = 'John')[0]
{'status': 'registered', 'superuser': None, 'title': None, 'fname':
'John', ...}

# manipulate said user
>>> john.email = 'foo at example.com'
>>> john.commit()

-Jonathan



More information about the PLUG mailing list