Large objects and small objects

Source: Internet
Author: User

Most of the time, when talking about objectsProgramWhen teaching, many teachers also say this. However, in real project development, such a definition does not make any sense, because as long as you use an object-oriented language, this definition is already included in the language, therefore, it is completely repetitive to transmit such a definition to developers during program development without any practical significance.
In my opinion, the definition of objects cannot be generalized. objects are classified into different levels, so the definition of objects should be classified into two levels, they are large objects and small objects.
A small object refers to the definition of a class instance that we often hear. This definition is suitable for expressing what an object is in the machine world.
So what are the objects in the real world? I would like to call it a big object. In terms of small objects, it comes from the real world. It actually exists, and it also has attributes and behaviors. However, large objects cannot be mapped to small objects one by one. Some can be like person, and some need to be mapped to multiple small objects, for example, in an interactive program, a large object of person can be mapped to personview + personmodel.
Why is this distinction made? Because small objects are derived from large objects, a good design is a good connector between the real world and the machine world, because a good design needs to artificially distinguish objects in the real world from objects in programs, because the two are often not one-to-one.

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.