Anno 2012 I would not recommend using Servlets and JSP as a presentation layer. It was all the rage in 2002, but it was ten years ago.
Today Java EE has an excellent JCF MVC framework. You are much better off using this instead. Most likely, you will want to get some widgets from the PrimeFaces component library, since all the standard ones are a bit basic. Also useful is the OmniFaces utility library.
Regarding DAO; don't go as far as directly using the entity manager in (JSF) that supports beans, but if you already use the service classes (transaction boundaries) for your business logic, using DAO can also be excessive.
There are some more small advantages of DAO, for example dao.findByName (...) looks a little clearer than loading a named query, setting a parameter and getting (one) result, but the cost is that you should maintain a separate DAO for each object, maybe in addition to some service.
Mike Braun Nov 26 '12 at 9:35 2012-11-26 09:35
source share