What techniques are some of you using in your servlet to DAO patterns that accomplishes the same result?
Jimmy Clark wrote:In terms of the popular J2EE programming model, Java Servlet implementations are part the Presentation tier and should only be responsible for GUI and Controller functionality. Data Access Objects are part of the Business tier and are responsible for data access and storage logic. With your design of direct servlet to DAO communication, you have deviated from a standard design model and have introduced potential limitations. Also, if your servlet connects directly to a DAO, where is the business logic (if any)? Is this coded somewhere in a servlet class?
Check out the Business Delegate design pattern for more ideas on how to connect Presentation tier to Business tier.
I haven't been able to test DAOs with JUnit because I can't figure out how to mock up the connection.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koophttps://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton