What is the true idea of object-oriented programming?

Source: Internet
Author: User

What is the true idea of object-oriented programming?
The real idea of object-oriented programming is to forget everything about computers and consider problems in the field of problems,
From question?
My understanding:
1. Abstract The analysis process: Simply put, it is divided into multiple small problems (components) until it cannot be further subdivided;
2. Analyze, abstract, and extract common content (data member and operation method) for each object (minor problem ),
3. If there are similar objects, construct the base class; then the base class derives various determined objects (minor issues );
4. The process of solving the problem is the process of operating these objects.
My experience:
1. Create an object from now on, and gradually summarize and understand it. Do not wait until you see the last page of the teaching material.
Just forget the language itself!
Only logic!
Reply to: qiuanhong (difficult to practice, easy to use)
My understanding:
It is associated with real life.
The 'question 'to be processed is abstracted into one or more 'event'
Find a place to use my wisdom
The more you say, the more confused you are.
It is the "natural language" that is generally used in teaching materials when learning the data structure ".
It is based on actual objects, rather than using computer languages to consider issues.
For example, a donkey: Starting from reality, this donkey has various attributes (high, fat, and thin )), there are also a variety of functions (you can ride, sell, and eat );
From the computer expert's perspective, he will think (what data structure can this donkey use)
Implementation ?? How much space is required ?? Maybe I will write a ride () function ....)
The emergence of object-oriented technology is due to the constant expansion of the scale and complexity of software, resulting in
After the crisis of software development, people finally realized that the analysis and understanding capabilities of the human brain are limited.
The emergence of Object-oriented thinking is a "back to nature" in the software development field, just like Jin Yong's novels.
Similarly, zhongzhang Sanfeng taught Taijiquan, "if you forget everything, you will understand the true meaning of Taiji." Haha,
It's a bit mysterious.
In fact, object-oriented technology requires software developers to lean from the technical level to the management level, with a macro perspective
View the system.
To carry out System Analysis in an object-oriented way, I think:
1. Understand the functions of the system. List its external interfaces, that is, what functions it has for users. Take the entire system as an object.
2. Environment. The system is not running in a vacuum environment, and the operating system and other external environments may affect it. Therefore, the environment is also a large object.
3. Internal. In the system, it is generally complicated. The general practice is to specify a granularity and enumerate all objects at that granularity. For example, if a human body is in the particle size of an organ, it has a heart, a liver, and a lung. Objects smaller than this granularity (or called objects), such as blood cells, are ignored as other objects (or internal objects of subsystems ).
4. Subsystem. Step 1 ~ 3, until it cannot be abstracted.
5. Invisible objects. A complete interconnected system requires many intangible objects, such as messages. Generally, such objects are hard to be found. When you find that subsystems cannot cooperate correctly or straighten out the relationship, try to add some auxiliary objects.
Everything is to make people understand, there are ideas that can make machines understand
I think the level of analysis and abstraction capabilities is the key. First, we need to analyze and abstract accurate object models from the problem domain, and then process them based on these models, of course, there are some ideas and details mentioned by our predecessors in the process, but don't forget that our goal is to solve the problem and not to target the object!
I think the ability to analyze and abstract is critical to this issue. First, you must carefully analyze and abstract the relevant object model in the problem domain, and then design the model accordingly. However, object-oriented is just an idea for us to solve the problem. We must not forget the problem itself, but become an object-oriented one! Of course, the process is indispensable to the ideas and details described by some predecessors.
It is a programming model generated to solve the problem. You can skip it at all, and it may do better.
However, as far as the current form is concerned, we still have a good grasp. In my opinion, object-oriented means converting an object into an object.
My years of practice in farming tools: Object-oriented thinking includes two concepts:
From big to small, from small to big
From hard to easy to hard
Agree with your opinion. You can be a beginner!
The real idea of object-oriented programming is to forget everything about computers and consider problems in the field of problems,
Abstract The problem from big to small into an object (pointers are only the form of object usage ), the Rational Arrangement and combination of the objects you design when designing and writing programs is object-oriented programming.
Object-oriented is to face the reality;
In reality, everything is an object. If they are classified, a "class" is generated ";
They are different. Classes and classes are differentiated by classes;
Different objects in the same class are distinguished by members.
Therefore, the internal logic of object-oriented is classification.
The real facial object idea is not practical either. For example:
In a text editor, if it is completely designed according to the object-oriented idea, each character will be an object. This overhead is too large to form a program. (This is why there is a discussion about this in the design pattern. Note: not one pattern can solve this problem)
The most suitable thing is a combination, just like all kinds of things in life. In fact, the program is actually serving life!
A c ++ programming idea can help you solve all your problems.
P.s. The deep dive into MFC is far from the real object-oriented ......
Mr. Hou should be a celebrity in the science field, not a programmer's idol!
Also, the face object is not the only one. The current general programming technology is a good supplement to the object-oriented technology: a combination of various factors is our goal!
The C ++ programming thought book actually has its limitations. If I have read it and no longer read other things, I will be unable to extricate myself from it, no book can "help you with all the difficulties". I believe you have gone beyond this stage, but you have never thought about it. Your sentence will make some incorrect impressions for beginners. In some ways, your words are correct, but they may be misleading!
This is a good question. A low-handed person like me should summarize and summarize what kind of thinking is like an object. Let's see that everyone has their own answers, that's a good feeling! All in all, this is a good question. You can study and review it! Good!
Even if you have a higher level, you feel that the code you write is not object-oriented! However, if the level is lower than yours, your code is very object-oriented, so there is no absolute object-oriented, there is only a relative, spiral rise! -- Yujian
Cannot fully target objects, and cannot blindly pursue structures in design systems
Object-oriented is a way of thinking. It uses computer languages to describe the real world. It uses entities you are interested in as objects and uses certain data structures and types to describe the objects, this type of data is a class in C ++. You can create a class for the entities you are interested in. In this way, all entities you are interested in have a class corresponding to it.
We can also solve problems without using object-oriented methods, such as the DOS era. We can better solve problems with object-oriented methods. Windows is amazing.
My opinion is:
Object-Oriented Programming is like some mathematical concepts, such as space, group, ring, and domain.
The original programming idea is like classical mathematics. People only discuss problems in one set, and there is no systematic method (that is, Operation) defined. So the benevolent and wise see wisdom, to a certain extent, this creates a chaotic theoretical situation, which is not conducive to scientific development. So what does modern mathematics mean when it develops towards the Internet? That is to say, in addition to the limited universe (that is, the above set, object-oriented also has this concept), people also add a set of general and recognized operations (methods) to this domain ); the computation defined on the set and the Set constitutes the space and group in mathematics. In the computer field, it is called a class ". This kind of set defines that the Operation stuff is much more convenient to use, which makes it easier for people to work on the computing power of a given set when discussing issues, that is, there is versatility that can get twice the result with half the effort.
The idea of object-oriented programming requires an analysis of modern algebra. First, we need to determine the "Universe", that is, all the "objects" involved in the project, and then classify them, combine objects of the same category (to form a set) and define the computing properties and operations that can be performed between them. In this way, a class is constructed, of course, when using this class object in the future, all functions will be completed through the defined operations. This is the frequently required class "The member variables of the class should be operated through a common function ".
Well, let's just talk about it. It's professional. Do you understand it?
Generic programming is "horizontal" and object-oriented is "vertical". The two must be combined
Who can say they do not use the template? (Of course, the use of templates cannot be called Generic programming, but when many templates are used, they will develop towards generic programming)
Not to mention STL, The cstring in vc.net is now a template.
The operating system is a good example!
"How can this be regarded as a true object-oriented programming idea? I think it should not be a programming idea, it should be an object-oriented analysis method!
My understanding in the vernacular is: analyze the things involved in solving the problem one by one, and find out the differences and commonalities between them. What about commonalities, it is defined as a parent class and analyzed based on the parent class until everything is described.
Learning Darwin's evolution
Hehe, or look at junior high school biology books,
It is easy to understand the inheritance and polymorphism.
Of course, the classes and objects in the actual project are a little more abstract than the Firebird worm.
That's all.
A simple look and a smile
Agree to focus only on the logic.
Language or development tools should be seldom considered,
Object-oriented is the development object. Simply put, a program module does not need to be explained by the original programmer,
Another programmer can perform two development operations, which means the object is encapsulated successfully.
As for how to encapsulate it,
How to divide the module line is a engineering problem,
Not discussed
Microsoft uses a variety of platforms to integrate various language programs and use the same controls,
This is to apply the object to the program.
I agree with the checkitout statement. There are too many languages. Just like building a house, with a good foundation, the above may be beautiful.
That is, the program you compile can be put in your hands and put into the basket. It will not be broken when it falls into the ground, and other people can also eat it. OK !!!!!!!!!!!!!!!!!
What is an object first?
Then programming based on the characteristics of the object
Inheritance is a key feature. Features such as encapsulation of polymorphism abstraction modularization are also oriented. The qualitative difference lies in OO's proposed Inheritance. Therefore, objects that are not inherited can only be called object-based. Only inheritance can be called object-oriented.
The above are some of the messages I have seen on other websites. They are not continuous and may be messy. But let's look at what others are saying first.

Which of the following is our opinion?

[Em07]

[Url] http://ria999.com [/url]
{
Postreply ('back to the post (stick to 4 ');
} "Href =" javascript:; "> reply {
Return sendurl (this, 4, '', event)
} "Href =" post. php? Action = quote & FID = 148 & tid = 101809 & pid = TPC & article = 0 & page = 1 "> reference {
Sendmsg ('PW _ Ajax. php? Action = Report & type = TOPIC & tid = 101809 & pid = tpc', '', this. ID );
} "> Report Top

Stick to 4Offline
Level: VIP

UID: 62700
Excellent: 0
Message: 3103
Coins: 46093
Prestige: 0
E points: 0 Points
Technical Points: 0 Points
Online time: 0 (hour)
Registration Time: 2006-12-23
Last Logon: 2010-06-22

{
Copyurl ('20140901 ')
} "> Sofa posted on:

{
Window. Location = ('read. php? Tid = 101809 & uid = 62700 '); Return false;
} "Href =" javascript:; "> only the authorBytes{
Fontsize ('small', '123 ')
} "> Small {
Fontsize ('ddle', '20140901 ')
} "> Medium {
Fontsize ('Big ', '000000 ')
} "> Large

If the above is not complete, continue to renew

I think it's not intended to use object-oriented programming.
What is object-oriented thinking?
In my opinion, the focus of Object-oriented thinking is to discover the relationship between objects and search for objects.
I am still a beginner.
I have explained a Book clearly.
<UML and Model Application: Introduction to Object-Oriented Analysis and Design>
Look for it. You may be confused.
Reply to: tolimit (dedicated to Java, dead) () Credit: 100 20: 56: 42z score: 0
By the way, how can code refactoring be better? What is the relationship between eXtreme Programming and object-oriented programming?
Reply to: jakecat ("Reinforced Concrete" mixed into the bank...) () Credit: 100 23: 28: 18z score: 0
Object-oriented paradigm allows us to look at problems in software development from the perspective of nature or the real world.
To crazy_lazy_pig: It's refreshing and nice. :) Are you learning mathematics?
Concerning the object-oriented thinking (not programming thinking), I think if you understand the design pattern, you will understand most of it. I am reading it for the second time, but I did not understand it for the first time, now I have found some feelings.
Working hard!
Split first and then group
The object-oriented approach only provides a set of methods or thinking tools for designing software. What is the true object-oriented approach is not important in my opinion, because the object-oriented approach has its own advantages and disadvantages. The key lies in the purpose of design. What kind of design is a good design. The scalability, flexibility, efficiency, and stability of the software require a designer to have a broad idea and develop various ideas.
After so many years of development, I have discovered a very common phenomenon. Once Oo is used, it will all be oo. Once interface/COM is used, it will all be interface/COM.
I don't think there is a way to get everything done. In fact, the reason why Oo is generated is that com is the result of summing up some good experiences in a large number of practical software design processes.
From a Language Perspective, Java is a pure object-oriented language!
Design pattern, think in C ++, deep exploration C ++ Object Model
In my opinion, object-oriented thinking is mainly a modular idea. The design of each module should be independent. When calling this module, as long as you know its name, you can use this module to understand its attributes without having to worry about how it is built internally. As long as the donkey knows its external characteristics (such as ears, eyes, legs, body, and sounds), it can be judged as a donkey. Instead of having to worry about his heart and size.
There are too many such books!
Object-oriented Haha is to treat everything as an object! (No girl friend !)
Program = Object + .......
Object = property + behavior
In short, you can only experience it with your hands!
Highly-coupled data and code are encapsulated, and you can do your own things. -- One of the object-oriented features.
Read the ATL source code and understand it.
1) which method is the best way to solve the problem? Oo is not required, and OO has shortcomings.
2) The oo idea can be used without OO language (Note: ^☉^ Oo refers to object-oriented)
I strongly agree with duanrain (DYL.
Why do scientists come up with OO ideas? The fundamental starting point is to better complete the projects we have to do on hand (this is my understanding ). But in reality, is it possible to complete the project well with OO? I don't think so. They are easy and difficult to design for different projects. Some of them can easily find the relationship between the object set and them, and some may not be prone to situations where there is a balance between them. Some things that may be hard to express with OO can be done immediately after process-based development is adopted. Therefore, it is not critical to develop with an object-oriented approach. The key is to develop with a scalable, controllable, understandable, and stable system performance. In this way, we can continue to win.
I have such an experience. When I first learned a little about OO programming, I defined a logic bloated object model in a project. Although the logic conforms to the business logic of the application, there are many drawbacks in programming. In terms of operation (we have few developers, but I am the only one) and performance (the design conforms to the application logic but is somewhat different from the operations on the database) are not very good.
After that, I learned the last lesson from another project. I did not design the object model in detail and only made some small objects to implement the business logic in Interface Programming. On the contrary, encoding is much simpler and faster, regardless of the Bug modification or addition of new functions, and the system is stable in performance.
I think designing projects with OO programming is a very risky action. A good OO design requires a lot of quality for designers. Proper design will be of great help to coding, and it will be difficult to design the code at that time.
In my opinion, the object oriented software construction (Bertrand Meyer) is the most classic and thorough explanation.
Language: Eiffel, C ++ critique;
Reusable: Design by contract;
Software Engineering: directly supported by the language itself, the integrated development environment integrates language compilation, code optimization, graphical display, system analysis, and other functions in an unparalleled way!
It is a pity that ise does not use the operating system and cannot design COM + based on the operating system facilities as Microsoft does.
If the integrated development environment of Eiffel is integrated with the Windows system registry and COM + technology, I will discard VC and use visual Eiffel.

The Broadcasting is complete. After dinner, you can come back and eat more cattle. 88

[Em01] [em01]

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.