OOP思想

OOP 概念的编程基础思想----我的感想
(The essential of OOP concept Thought)

Actually the philosofy of object oriented programming is very simple. What is an object actually? Do you know? Don't think it to complicated,keep it simple. I think you do know, yet you don't realize it when you are perfroming OO programming job. Or Who know you know.

Like in the nature, object is actual what we call "THING". A car is a thing, a bird is a thing, you are a thing too!!!! Don't forget. Object, the thing, is madeup by its parts/components, just like you have a head,a body, two hands and two legs and your tiny thing to make baby. Ha Ha Ha Ha. To be a thing, one has character/propery, has a mean to perform actions,right? Since you have your character and you can move to do some things right. So I think now you get to realize something I want to tell you.

So just like in the nature,object oriented programming(OOP)is all this about like in the nature. An object instant has its propery and its methods to perform jobs to be done.An object belong to some kind, this is so call CLASS. The class is like a kind of group of things with similar propery and methods.

Like in the nature, object,thing can multiplicate themselves. Like you can make babies with the woman you "love" right. Your baby has something in common with you,yet not quite the same, he/she has its own character/propery and he/she growup to be someone with its own behaviour right. So this come to the essential, the foundation of object oriented programming:

1. Inheritant
2. Incaptulation
3. Polymorphism

This is the beauty of Object Oriented Software Engineering,the simulation of the nature, the world we are living. The simplcity of it, and actually we all know about. But unfortunately many C++ and other OO programmers seem to forget some what it is actually very natural and simple!!!! They think in the terms of technique, the syntax, the construction of loop statement,the selection,the branching of code,the constructor, the destroyer, memories allocation,and all kind of tricks in order to get his/her program done.

This is stupib,wrong attitude to become an object oriented programmers. They simply forget the essential,the thought,the foundation of Object Oriented Engineering!!!! So my advice is, keep it simple yet perform it accordingly with correctness. Think and imagine like in the nature.

Just like thing happen and behave in the nature. Nothing secret,nothing complicated. Think like the way it happen in the nature. If a C++ or OO programmer doing his/her programming the way I tell you as above. It will become much and much easier to create even very advanced sophisticated software based on C++ or other OO programming language. This is the way,I think the proper way to perform ones OO programming job. The simplicity,the nature is the beauty!!!!

Bern!!

 

原文链接:http://bbs.chinaunix.net/viewthread.php?tid=15872
转载请注明作者名及原文出处


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值