Hello! You can use no ORM approach, as I do ;-)
1. All my db queries are in DAO class 2. for actual DB work I use Spring JDBC Templates http://static.springsource.org/spring/docs/3.0.x/reference/jdbc.html 3. for JDBC connection pooling I use The Best BoneCP connection pool: http://jolbox.com/ 4. all my application wired with Spring (sql queries text are in Spring XML, so it easy customizable) 5. I use http://slf4j.org as logging facade 6. I want to investigate http://www.mybatis.org/java.html (compare it with Spring JDBC Templates + my helper classes) ~ public interface IUserDao { List<User> getUsers (); void saveUser (User user); } public class UserDaoImpl extends SimpleJdbcDaoSupport implements IUserDao { private static final org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(RoutesDAO.class); private String sqlGetUsers; @Required public void setSqlGetUsers (@NotNull String sql) { sqlGetUsers = sql.trim(); } @Override public List<User> getUsers () { return getSimpleJdbcTemplate().query(sqlGetUsers, userMapper); } MyPage extends BorderPage... ... @Autowired IUserDao dao; .. table.setRowList(dao.getUsers()); ---------- Forwarded message ---------- From: "Schultz, Gary T - COMMERCE" <[email protected]> To: "'[email protected]'" <[email protected]> Date: Wed, 12 Jan 2011 17:40:10 -0600 Subject: Database connection I'm starting work on an application. Normally I would use PHP, but I accidently found Apache Click. Looking at the documentation and examples, it appears easy to use. Maybe I missed it in the documentation, but how do you get data stored in a database? In a separate email exchange I received a reply from Malcolm Edgar saying the examples use Apache Cayenne ORM framework. Is there an example that elaborates on how this is done? I've never worked with a ORM framework, is the learning curve steep? Any other ORM Frameworks worth looking at? Sincerely, Gary Schultz Web Administrator/Developer Wisconsin Department of Commerce
