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

您没有登录

» Java开发网 » Design Pattern & UML  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 小项目数据库操作模式,如何最好?
hatpdb



发贴: 0
积分: 0
于 2003-05-21 13:21 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
访问数据库的设计模式,我现在没有用设计模式,但是我见过
这样的数据库模式
1,封装基本数据关系到对象模型的影射(只有基本的set,get,表字段),
2,原子操作(添加,查找等)
3,封装事务逻辑(登陆,付款等)

不知这样好不好,对小项目好象不好?效率如何?

为了效率与开发方便,应该使用那种模式?



作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
yj780210





发贴: 442
积分: 70
于 2003-05-21 13:44 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
hatpdb wrote:
访问数据库的设计模式,我现在没有用设计模式,但是我见过
这样的数据库模式
1,封装基本数据关系到对象模型的影射(只有基本的set,get,表字段),
2,原子操作(添加,查找等)
3,封装事务逻辑(登陆,付款等)

不知这样好不好,对小项目好象不好?效率如何?

为了效率与开发方便,应该使用那种模式?



simple is good , short is good

作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
yj780210





发贴: 442
积分: 70
于 2003-05-21 14:10 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
上一贴发错了,sorry
hatpdb wrote:
为了效率与开发方便,应该使用那种模式?

设计模式在提高效率和速度上往往作用不大。
主要关注的是封装,结构等等特性。
对质量,维护等等有巨大帮助。

不过使用点什么DAO了
VALUE LIST HELPER是没有错误地。



simple is good , short is good

作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
richardluopeng





发贴: 122
积分: 32
于 2003-05-26 13:40 user profilesend a private message to usersend email to richardluopengsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
模式往往使东西搞的很复杂


作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
floater

Java Jedi

总版主


发贴: 3233
积分: 421
于 2003-05-28 00:17 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
yea, more complicated than without it. But if there is some change later on, they could save more time than without it, at least.


"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
作者 Re:小项目数据库操作模式,如何最好? [Re:richardluopeng]
daviszhao



发贴: 0
积分: 0
于 2003-05-30 17:26 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
richardluopeng wrote:
模式往往使东西搞的很复杂

复杂未必不是好事,往往在这里觉得复杂,到那里发现豁然开朗原来好简单



作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
softtiger





发贴: 46
积分: 10
于 2003-06-04 17:45 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
可以利用java反射机制将数据存取进行封装.


作者 Re:小项目数据库操作模式,如何最好? [Re:softtiger]
richardluopeng





发贴: 122
积分: 32
于 2003-06-12 19:00 user profilesend a private message to usersend email to richardluopengsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
softtiger wrote:
可以利用java反射机制将数据存取进行封装.


说来听听,谢谢!



作者 Re:小项目数据库操作模式,如何最好? [Re:softtiger]
richardluopeng





发贴: 122
积分: 32
于 2003-06-12 19:02 user profilesend a private message to usersend email to richardluopengsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
softtiger wrote:
可以利用java反射机制将数据存取进行封装.


说来听听,谢谢!



作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
softtiger





发贴: 46
积分: 10
于 2003-06-13 18:13 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
还是给你一篇文章的名字吧 《Reflective CRUD》,好象就是在本网站上看到的文章。不知道这里怎加附件


作者 Re:小项目数据库操作模式,如何最好? [Re:hatpdb]
softtiger





发贴: 46
积分: 10
于 2003-06-13 18:16 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
不好意思,看来用恢复功能有附件的。

Reflective_CRUD.pdf (188.47k)




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