Differences between object-oriented and Object-based

Source: Internet
Author: User

Many people do not distinguish between "Object-Oriented" and "Object-based. Object-oriented features (encapsulation, inheritance, and polymorphism) are indispensable. Objects are usually used based on objects, but existing Object Templates cannot be used to generate new object types and generate new objects. That is to say, objects are not inherited. "Polymorphism" indicates a subclass object instance of the parent class. Without the concept of inheritance, there is no way to talk about "polymorphism ". Nowadays, many popular technologies are based on objects. They use encapsulated objects, call object methods, and set object attributes. However, they cannot allow programmers to derive new object types. They can only use methods and attributes of existing objects. So when you determine whether a new technology is object-oriented, you can usually use the last two features to determine. Both "Object-Oriented" and "Object-based" implement the concept of "encapsulation", but object-oriented implements "inheritance and polymorphism", while "Object-based" does not, indeed, it is very good.

People engaged in object-oriented programming can be divided into class library creators and class library users by division of labor ". Not all people who use the class library have the idea of object-oriented. They usually know how to inherit and derive new objects to use the class library. However, our thinking has not really been transferred, class Libraries are only object-oriented in form, but essentially an extension of library functions.

Object-oriented is an idea. It is a method for us to consider things. It usually shows that we solve the problem according to the process, or abstract the problem into an object to solve it. In many cases, we will solve the problem through the process without knowing it, instead of abstracting the problem to be solved as an object to solve it. Some people are engaged in process programming under the guise of object-oriented.

All of the above are quotes. Today, it seems that some of these statements are quite practical. (Post it out anyway) so that you can do object-based work on your daily work, or do object-oriented work.

There is also the original article address:
Http://www.cnblogs.com/fengxiaoxiao/archive/2007/05/26/496395.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.