Rod Johnson
时间:2010-10-17 来源:vcycyv
digression
thanks to Ron Jeffries for this pithy summary
Then your design will deteriorate.
=======================================
if (myStringVariable.equals(MY_STRING_CONSTANT)) if (MY_STRING_CONSTANT.equals(myStringVariable))However, the second form is more robust. What if myStringVariable is null? The second condition will evaluate to false, without error, while the first will throw a NullPointerException.
If possible, design applications to use a stateless service layer. Hold state in the web tier, rather than in the business logic tier, if possible. “In contrast, the handling of data set in a Servlet API HttpSession is typically more robust. WebLogic and other products offer the option to back HttpSession state persistence with a database, rather than merely offering in-memory replication”
https://equinox.dev.java.net/
http://www.aestheticsoftware.com/architecture/2009-spring-mvc-hiber/Spring-MVC-Hiberanate.html
http://www.kimchy.org/hibernate_vs_spring_hibernate_template/