科技行者

行者学院 转型私董会 科技行者专题报道 网红大战科技行者

知识库

知识库 安全导航

至顶网软件频道基础软件Java企业应用开发实践TOP10

Java企业应用开发实践TOP10

  • 扫一扫
    分享文章到微信

  • 扫一扫
    关注官方公众号
    至顶头条

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

作者:中国IT实验室 来源:中国IT实验室 2007年9月1日

关键字:

  • 评论
  • 分享微博
  • 分享邮件
    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.

查看本文来源

    • 评论
    • 分享微博
    • 分享邮件
    闂備緡鍙庨崰鏇炩枎閵忋垺濯奸柕蹇嬪€栭~锟�

    婵犵鈧啿鈧綊鎮樻径鎰畺闁靛ň鏅滄慨婊堟偨椤栨稓鎽冮柟鐑╂櫊瀹曟岸宕堕埡鍌滄殸闂佽鍨伴崢鏍姳閿涘嫭鍠嗘い銈呭姬婵☆偅婢樺Λ妤呮偂濞嗘挸瀚夐柍褜鍓熷顒侊紣娓氣偓閻涙捇鏌涘┑鍛樂缂佹鐭傞獮搴ㄥ焵椤掑嫬瀚夋い鏍ㄧ懁缁诲棝鏌熼褍鐏茬紒杈ㄧ箞閺屽洭鏁愰崟顓犳澖闁荤姳闄嶉崹钘壩i崟顖涘殜闁硅泛顫曢埀顒€锕︾槐鏃堝箣閻愬弬妤呮煛閸偄鐏﹂柛瀣墬缁傛帞鎹勯搹瑙勵啈闂佸搫瀚烽崹閬嶅磻瀹ュ鍎嶉柛鏇ㄥ墯娴犳ê霉閿濆棗鈻曢柍褜鍓氶弻銊ф閻愬鈻曢悗锝傛櫇椤忛亶鏌曢崱顓熷

    重磅专题
    往期文章
    最新文章