"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
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.
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
"The good news about computers is that they do what you tell them to do. The bad news is that they do what you tell them to do." -- Ted Nelson
I haven't been able to test DAOs with JUnit because I can't figure out how to mock up the connection.
Don't get me started about those stupid light bulbs. |