JiveJdon Community Forums
在线119人 J道首页 | 论坛首页 | 培训咨询 | 开源框架 | 精华 | 查搜 | 注册 | 登陆 |
首页 » 论坛 » 设计模式、框架和架构
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表
???en_US.forumThreadNext.name??? 下一主题
这个主题共有 2 回复 / 1 页 [ ]  发表新帖子  回复该主题贴
sunxuezhen

发表文章: 5
注册时间: 2006年10月11日 16:48
什么是真正的OO阿 发表: 2006年10月11日 16:56 回复
能和大家探讨一下面向对象吗?
小的学了块1年的java了,但始终对面向对象感到陌生,老是觉得自己在用面向对象的语言写面向过程的程序。
怎么才能消除那些可恶的if else,请大家多多指点。
banq

发表文章: 8929
注册时间: 2002年08月03日 17:08
Re: 什么是真正的OO阿 发表: 2006年10月13日 10:14 回复
>但始终对面向对象感到陌生,老是觉得自己在用面向对象的语言写面向过程的程序。

很多人都是这样,经常带着这种矛盾痛苦编写程序,结果工作成了一种折磨,明知不应该是这样,但是还是这样做,为伊消得人憔悴啊。

怎么办?
首先明确什么是OO,OO就是面向对象啊,也就是你开始编代码时,与你打交道的都是对象,而不是数据字段,也不是String int 等类型,是对象类型。

要达到这点的道路不是很简单,现在我们都是站在前人肩膀上,通过使用框架来帮助更方便直接OO

说得再具体一点,就是根据jdon首页:Java EE/J2EE面向对象编程之道
这篇文章提供了目前技术水平下的OO编程思路:

http://www.jdon.com/artichect/javaee.html

当然,这还只是一个基础,更多工作将集中在业务层,这就需要通过模式来解决问题,来消灭if else等。
banq

发表文章: 8929
注册时间: 2002年08月03日 17:08
Re: 什么是真正的OO阿 发表: 2006年10月14日 12:03 回复
在TSS最近关于Evans DDD讨论中有老外关于OO争论,转贴如下:
http://www.theserverside.com/news/thread.tss?thread_id=42602

A. I have spent more than half of my career fixing other people's code that use this same idea. Good OO makes code robust and maintainable. If you don't understand how to use OO, please get out of the business.
如果你不懂得使用OO,你应该退休了。

B. Java monkeys who think OO is a silver bullet should be getting out of the business or resigning themselves to becoming maintenance blubs.
Java狂热分子认为OO是银弹

A.Java is a tool to accomplish OO design, not the other way around. OO can be accomplished with Java, but can also not be accomplished. There are masses of Java developers who think they program OO just because they create classes and encapsulate the state and later expose it through some getter. Their domain logic is scattered beyound belief, etc...
Java是实现OO设计的工具,但不是唯一.

A.You're right, OO is a silver bullet when it's real OO and not brain-dead Java OO.





这个主题有 2 回复 / 1 页 [ ]
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表    返回页首  返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Spring Struts
查询本论坛内 回复超过的热门帖子
快速发表回复
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-07 jdon.com

anti spam