*If you don't already know what the MVC pattern is, please read the [pattern.mvc] rule first.

Follow the model/view/controller design pattern for user interfaces, having little or no logic in JSP code.  JSPs were primarily designed to be used as simple templates, so giving them extra payloads of Java source code is not recommended.

Keep your model separate from the view and controllers. Ask yourself this question:  

“If we ported the web application to a different user interface tomorrow, such as Swing or even JSF (!) could we reuse the model exactly as it is and just rewrite the controllers and views?”

blog comments powered by Disqus