What are the best of J2EE Best Practices?
J2EE as a dominant paradigm/technolgy of solution implementation has been there in the industry for over a decade. Enough time to develop some best practices (some times more than warranted).
If you go by conventional wisdom of industry and its median practice we would come across such as these (listed below).
“The best of the best practices”
Always use MVC.
Don’t reinvent the wheel.
Apply automated unit tests and test harnesses at every layer.
Develop to the specifications, not the application server.
Plan for using Java EE security from Day One.
Build what you know.
Always use session facades whenever you use EJB components.
Use stateless session beans instead of stateful session beans.
Use container-managed transactions.
Prefer JSPs as your first choice of presentation technology.
When using HttpSessions, store only as much state as you need for the current business transaction and no more.
Take advantage of application server features that do not require your code to be modified.
Play nice within existing environments.
Embrace the qualities of service provided by the application server environment.
Embrace Java EE, don’t fake it.
Plan for version updates.
At all points of interest in your code, log your program state using a standard logging framework.
Always clean up after yourself.
Follow rigorous procedures for development and testing.
Please see http://www.ibm.com/developerworks/websphere/techjournal/0701_botzum/0701_botzum.html