Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Architecture & Framework  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
话题被移动
该话题已被移动 - floater , 2004-06-16 01:58
如果您尚不清楚该话题被移动的原因,请参考论坛规则以及本版公告或者联系本版版主。
作者 Re:J2EE交流贴 [Re:Jove]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2004-06-16 03:05 user profilesend a private message to usersearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
I moved this post to here for further discussion. I just contribute some of my thoughts here too:

1. Page 3, VOs should be replaced with interfaces. We should *not* pass objects between layers, but interfaces. Each layer could have its own implementation of the interfaces. The interfaces should belong to the business layer(why???)
2. Page 4, add/remove/update methods should have parameter user, not integer. Don't expose implementation. What if one day we need to change this id to 36 digit guid? Changing from 3-digit to 4 caused an earthquake in my working company, what if more than that?
3. Page 4, yes, normally we shouldn't care about db shifting in business applications, unless we are doing some middleware or like, e.g., forums/jive.
4. Page 6, yes, start from db side, get schema done first, then use middlegen hibernate to generate hbm files, then use tools to generate java classes(be careful here when you go hbm-->java, if you have inheritance, you have to read in parent hbms first before you read in child hbms). One more note: After we settle the business layer, the schema could be derived in several ways, read scott ambler's articles for 4 ways to do this.
5. Page 7, JDBCTemplates etc could be done better in the following:
a. queryForObject/Long/Int should be improved to return a uniform object, like in SQLExecutor interface. Same as input. SQLExecutor's interface is nices to api callers.
b. not sure about callbacks and inner classes, seems we just do what SQLExecutor does, it will be good enough.
6. Page 10, on datasource. The settings for different layers should be in seperate files(although we may read all of them into the context) so each layer is independent of others. Sample code constantly misleads this. And I don't like to read settings from resources from classpath because the collision is uncontrollable.
7. Page 11, web layer.
General speaking, there are 3 kinds of presentation tools:
a. velocity: scripting based
b. xml: xslt, xml based
c. tapestry: object based
jsp based is somewhere in the middle. Others are faces, tiles, portlets.
MVC model(well, not really mvc) - reads professional jsp chapter 7(new version) or 12(old version) for models, especially model 2 and 2x.
Hell to struts and hail to spring, Tounge.
What's wrong with spring's mvc? abuse of templates! This abuse breaks the workflow's logic(This workflow is to send output to browsers). The usage pattern is more like swing applications. You have to do things in a certain way, certain order. BUT the underlying is doing right, so still the best one so far.
page 14. spring bean package: doesn't have a way to write back to files. Swing applications need this feature, like firewall settings, etc. Once users config'd, they want to save them.
page 15. AOP, not sure about this. If we combine AOP and python, that's going to be something. Check Thinking in java's author's website on python.
BTW, there is a Jython out there too.
Others:
Transactions.

questions:
Why do we use spring transactions rather than Connection's autocommit or jta/jts?
Why do we use spring web mvc rather than struts?
What's the difference between beanfactory and applicationcontext?



"Any fool can write code that a computer can understand. Good programmers write code that humans can understand."
- Martin Fowler, Refactoring - Improving the Design of Existing Code

话题树型展开
人气 标题 作者 字数 发贴时间
25010 [精华] J2EE交流贴 Jove 129 2004-06-15 16:11
21276 Re:J2EE交流贴 jfml 15 2004-06-15 16:16
21141 Re:J2EE交流贴 floater 3646 2004-06-16 22:39
21140 Re:J2EE交流贴 hitaco 1731 2004-06-16 23:17
21269 Re:J2EE交流贴 jigsaw 573 2004-06-17 09:36
21137 Re:J2EE交流贴 hitaco 1161 2004-06-17 10:13
21194 Re:J2EE交流贴 jigsaw 335 2004-06-17 09:44
21198 Re:J2EE交流贴 floater 322 2004-06-17 10:00
21188 Re:J2EE交流贴 floater 69 2004-06-17 10:13
21180 Re:J2EE交流贴 chenyajun5 21 2004-06-17 11:16
21165 Re:J2EE交流贴 zyzhang 1828 2004-06-17 22:04
21147 Re:J2EE交流贴 floater 460 2004-06-18 09:22
21243 Re:J2EE交流贴 Jove 617 2004-06-18 10:24
21086 Re:J2EE交流贴 floater 1158 2004-06-18 13:50
21147 Re:J2EE交流贴 Jove 308 2004-06-18 14:48
21219 Re:J2EE交流贴 nothing 4 2004-06-15 16:34
21094 Re:J2EE交流贴 floater 431 2004-06-18 21:32
20990 Re:J2EE交流贴 zyzhang 3887 2004-06-22 01:48
22611 Re:J2EE交流贴 zhbk 10 2004-07-30 14:58
21051 Re:J2EE交流贴 winconcom 23 2004-09-09 11:45
21429 Re:J2EE交流贴 jigsaw 55 2004-06-15 16:57
21368 Re:J2EE交流贴 wes109 0 2004-06-15 17:21
21319 Re:J2EE交流贴 wes109 25 2004-06-15 17:34
21320 Re:J2EE交流贴 zyzhang 412 2004-06-15 18:14
21974 Re:J2EE交流贴 floater 3201 2004-06-16 03:05
21214 Re:J2EE交流贴 jigsaw 4037 2004-06-16 13:45
21089 Re:J2EE交流贴 zyzhang 5937 2004-06-16 19:44
21297 Re:J2EE交流贴 Jove 357 2004-06-16 14:31
21213 Re:J2EE交流贴 Jove 136 2004-06-17 10:04
21234 Re:J2EE交流贴(2nd rar) Jove 58 2004-06-17 10:06

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923