Java企业应用开发实践TOP10

王朝java/jsp·作者佚名  2008-05-31
窄屏简体版  字體: |||超大  

1.使用MVC.

2. 在每一层建议写自动测试代码;

3. 根据规范开发,不要依靠具体应用服务器的实现;

4. 从一开始考虑J2EE的安全问题;

5. 团队成员负责自己熟悉的模块开发;

6. 使用Session Facades,假如使用EJB;

7. 使用Stateless Session Bean, 尽量少用Stateful SessionBean;

(上次GavinKing提出了相反的观点,可以查看GavinKing的Blog;Stateful Session Beans Rock http://blog.hibernate.org/cgi-bin/blosxom.cgi/2004/04/);

8. 使用容器治理事务;

9. 建议使用jsp作为表现层的首要技术选择。

10.假如使用HttpSession,不要什么东西都往里面放,只有确实需要的对象。

12. 使用CMP Entity生产效率高,相对于ORM产品.

我的观点:

1、使用MVC确实不错,尤其对于项目大,而且以后修改方便。

2、确实是很好的建议,目前没有在实际工作中没有实践过,零碎地写过

6、7、Spring是个不错的候选者,简单易用,易测试。

9、很好的建议,也许Tapestry很好,很多项目使用JSP已经够用;

12、不同意。是不是想要推销IBM Websphere,呵呵。

其他的不了解,假如大家由这方面的经验,和大伙说说吧。

翻译的不好,原文档如下:

Java代码:

The best practices

1. Always use MVC.

2. Apply automated unit tests and test harnesses at every layer.

3. Develop to the specifications, not the application server.

4. Plan for using J2EE security from Day One.

5. Build what you know.

6. Always use Session Facades whenever you use EJB components.

7. Use stateless session beans instead of stateful session beans.

8. Use container-managed transactions.

9. Prefer JSPs as your first choice of presentation technology.

10. When using HttpSessions, store only as mUCh state as you need for the current business transaction and no more.

11. In WebSphere, turn on dynamic caching and use the WebSphere servlet caching mechanism.

12. Prefer CMP Entity beans as a first-pass solution for O/R mapping due to the programmer productivity benefits.

 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
 
 
© 2005- 王朝網路 版權所有 導航