I have recently been using rails for a web application, and so I have grown to quite like the way it makes dealing with a database very simple through Active Re开发者_如何学Ccord. I am, therefore, wondering if there are any Java libraries that would make it equally simple to deal with the database by hiding away issue of writing SQL?
Have you taken a look at: activejdbc? It's an implementation of the Active Record pattern in Java, and obviously inspired by RoR.
Hibernate is an excellent ORM that generally serves this purpose:
http://www.hibernate.org/
You can build things like GenericDAOs that allow you to easily manage all objects the same way:
http://community.jboss.org/wiki/GenericDataAccessObjects
so that you can get basic CRUD capabilities very quickly for anything in your model, but still allows you to configure business logic particular DAO as needed.
- Grails
- Spring ROO
- Play Framework
Are 3 java application frameworks who seem to share some similar scaffolding capabilities that was popularized with Rails.
there is also ActiveWeb - a Rails-like Java web framework: http://code.google.com/p/activeweb/
精彩评论