Re: Database Backend?



In article <1136389168.779511.31580@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
mrhaydel@xxxxxxxxxxx wrote:

> What I'd like to do is make this front page, and maybe the release
> notes page, more data driven, so that instead of having to go in with
> each release and change the HTML/JSP pages, it can just pull this info
> from a few tables in a database.


The answer depends on whether you will have to change this much in the
future, or whether you have a pretty good idea of what it needs to do.
Further, it depends on whether you _want_ to learn some new technologies.

If you do not see much need for change, and you do not want to work with
this in the future, then quick and dirty is probably ok. Learn SQL,
jdbc, JSP, and go to town.

That said, I have never had a project I could just ignore. Even the
'easy ones' seem to come back, so it is often worth using a reasonably
big hammer. Thus: a decent presentation layer, and a decent database
access layer become your friends.

I usually use some kind of object relational layer when I have to talk
to a database. Even simple projects can be a good way to figure out how
they work.

As best as I can tell, Hibernate is the current best of breed. It also
is not that hard to figure out - I was up and running on the first day
thanks to 'Hibernate in Action'.

Cayenne is a nice alternative to Hibernate, and it worked very well for
me. It was easier to autogenerate Hibernate descriptors than Cayenne
ones, but the Cayenne GUI tools were better, when last I checked. Since
you did not describe huge tables, this is probably not an issue either
way.

For the front end, you have a lot of choices. In rough order of ease of
use:

JSP is a Sun technology, based on tags on the page that turn into back
end java code. Fairly easy to learn, but it is really easy to stuff
java code on the page, and that is a big pain to maintain.

Tapestry is a very clean framework, but it takes a while to figure out.
It took me a few weeks before I was happy with what it was doing.
Howard Lewis Ship wrote a pretty good book, and it is under active
development. Frankly, I really liked Tapestry.

Spring seems to be what the market is moving towards, so it is worth
learning for that reason alone. I found it well architected for the
small project I was using it for, and it is on my current 'learn list'.
I seemed to be getting content out faster than with Tapestry, but it
seemed like building completely reusable components with Tapestry worked
better.

Good luck,

Scott

--
Scott Ellsworth
scott@xxxxxxxxxxxxxxxxx
Java and database consulting for the life sciences
.



Relevant Pages

  • Re: creating mysql schema in java code
    ... Is there a way to create the initial 'schema' (CREATE DATABASE) using java code rather than manually? ... E.g. through the hibernate or JDBC libraries. ...
    (comp.lang.java.databases)
  • Re: acceptable way to program
    ... I'm an experienced database programmer learning the ... > Java/OO way of doing things and I'm puzzled that people use Hibernate ... There is undoubtedly some bad database programming being done by Java ... As for stored procedures, it is true that current production releases of ...
    (comp.lang.java.programmer)
  • Re: How to best use Hibernate
    ... Load it all into memory and then synchronize to the database. ... potential of Hibernate, and is the effort managable for lots and lots ...
    (comp.lang.java.programmer)
  • Re: What does everyone else do for graphically displaying data?
    ... JDBC API reference cover to cover a couple of times, ... you bind a data grid to a database table so that when you edit the ... put all JDBC code in the Model classes. ... Use something like Hibernate. ...
    (comp.lang.java.databases)
  • Re: How to best use Hibernate
    ... Load it all into memory and then synchronize to the database. ... potential of Hibernate, and is the effort managable for lots and lots ...
    (comp.lang.java.programmer)