Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Javaranch project Jenny the database code generator , any reason not to use with Java 6 ?

 
margaret gillon
Ranch Hand
Posts: 335
6
Linux Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am looking for a code generator to create the classes with CRUD methods for access to a database. Eclipse can generate the javabeans so I'm all set there. The project will use Bear's Frontman framework but no Hibernate, Spring, etc. There are many tables I have to create the classes for. They are very simple tables with little or no validation and I just need the CRUD methods that update the database. The database I'm using is SQLServer 2000.

I found Jenny on the ranch. Jenny generates the getters/ setters and the CRUD methods. The last post about Jenny is 08/09/2003 by Marilyn de Queiroz . Is Jenny still a good way to buld the small CRUD classes for a database?

Jenny Tutorial

Jenny code examples

 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There's nothing wrong with using Jenny. I'm curious why you prefer it over Hibernate or Open JPA though. Both are more widely used which makes them more useful in your career.
 
margaret gillon
Ranch Hand
Posts: 335
6
Linux Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jeanne,
I am using Bear's Frontman framework, not sure about adopting others until I'm solid on that one. My short term goal is to find an automation to eliminate the errors and slow coding of the CRUD objects.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If the goal is to minimize frameworks, I'd recommend using raw JDBC for this first app.
 
margaret gillon
Ranch Hand
Posts: 335
6
Linux Tomcat Server Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes I am using raw JDBC. The Eclipse plugin writes the getters / setters and that is nice. What I was hoping to find was a tool that could build the code like this so I don't have to write all those ps.setString, ps.setInt statements. Looks easy for a three field table but some of my tables have fourty fields and I like shortcuts. LOL....





UNLESS there is an easier way?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34378
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
margaret gillon wrote:
UNLESS there is an easier way?

It is good to use raw JDBC a couple times to learn it. Then the easier way of Hibernate/JPA becomes a time saver.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic