Some Principles in Java Web Development. (to be extened)
Just a note to remind me not to repeat the same mistakes again.
1. Never let View layer throw out any exceptions, ‘cuz they will display on the screen immediately. It’s really bad to show others errors, since people will just reckon that your application is not reliable and secure at all.
So keep in mind that once you develop tag library, remember to catch exception in anywhere possible. And implement to separate the View and Business layer, also to reduce logical stuff in View layer like calculation. Since this will just stop you from making exceptions that might be thrown from View layer.
2. Logger should be placed in anywhere you see, especially in try-catch statement. To use logger.isDebugable() in debug phase, this statement will just improve the performance of logger on production server and skip outputting debug information.
3. Try to reduce the usage of implementation classes of Map or List, if you can use DTO instead.
(to be extended…)
-
Articles
- February 2012
- December 2011
- November 2011
- October 2011
- September 2011
- August 2011
- June 2011
- May 2011
- April 2011
- March 2011
- February 2011
- January 2011
- December 2010
- November 2010
- October 2010
- September 2010
- August 2010
- July 2010
- June 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- September 2009
- August 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
-
Meta



