Hi,
I need a piece of advice. I'm going to write a platform for selling products. On the client side I need to have rich visual effects and a scripting language - these are the requirements - so probably the client side would be written in pure JavaScript, CSS and HTML. The server side would be implemented in Spring with many REST services. What I doubt is to use JdbcTemplate or Hibernate to implement DAO.
JdbcTemplate:
+ native SQL code
+/- RowMappers to map results to objects
+ flexible enough to fit my requirements
Hibernate:
+ no need to use RowMappers
- what about compound data base schemas?
- need to generate entities every time db changes
The main problem with Hibernate is the need to map entities to JSON (or XML maybe). As a result entities "are leaving" the persistent context which may cause a lot of problems (I've already faced then when using GWT, e.g. hibernate session) that may be very harmful and troublesome.
So the question is to use Hibernate and spend a lot of time solving the mentioned problems or to use
JDBC which is old but I guess it better fits to requirements. Or maybe another solution that I don't know currently.
Any help, clues would be much appreciated.