Java language Depth

Source: Internet
Author: User

In an object-oriented system, the various functions of the system are performed by many different objects. In this case, how to realize their own internal objects to the system designers is not so important, and the collaboration between the objects is the key to the system design. Small to different classes of communication, large to the interaction between the modules, at the beginning of the system design are to be considered, this is the main work of the system design. Interface-oriented programming I think that means to follow the idea of programming it! In fact, in daily work, you have programmed the interface, but if you do not have this awareness, then you are only in the passive realization of this idea; the frequent complaining that the other person changed the code affected you (the interface is not designed), the performance of the changes in a module caused by other modules of large-scale adjustment ( The module interface is not well designed) and so on.

Mr. Booch, speaking of interaction Designer that day, refers to people who do this kind of design, but at a higher level. I think at present in our software design team, this kind of person is one of the most lacking talents.

Non-interface programming? Is it a process-oriented programming idea?

1. Understanding of interfaces.

Interface from a deeper level of understanding, should be defined (norms, constraints) and implementation (the principle of separation of the principles).

When we implement a system in general, the definition and implementation are usually integrated, without separation, I think the most understood system design specification should be the separation of all definitions and implementations, although this may be a bit annoying in some cases of the system.

The interface itself reflects the system designer's abstract understanding of the system.

Interfaces should have two classes: the first is an abstraction of a body, which corresponds to an abstract body (abstract class);

The second type is the abstraction of one aspect of a body, i.e. the formation of an abstract plane (interface);

It is possible for a body to have multiple abstract faces.

There is a difference between an abstract body and an abstract surface.

2. Another important factor in designing interfaces is the environment in which interfaces are (context,environment), and the view of the system theory: the environment is the sum of the space and the external influence factors of the system elements. Any interface is generated in a certain environment. Therefore, the definition of the environment and the impact of the environment on the interface can not be ignored, from the original environment, all the interface will lose its original meaning.

3. According to the module development model (3C), the three of them complement each other, each division, seamless, indispensable.

Object-oriented means that when we consider a problem, we consider its attributes and methods in the object unit.

Process oriented refers to the implementation of a specific process (transaction process) that we consider when considering a problem.

interface design and non-interface design are for reuse technology, and object oriented (process) is not a problem

I think: the interface in UML is another way of saying the agreement. does not refer to COM's Interface,corba Interface,java Interface,delphi interface, Man-machine interface interface or NIC interface.

In the concrete implementation, it is possible to realize the interface of UML as the interface of language, the interface of distributed object environment or other interface, but in terms of understanding the interface of UML, it refers to the realization and implementation of each part of the system. Work together through the agreements established by interface.

So I think, oriented to interface programming, the intention is to refer to the abstract protocol programming, the implementation of the implementation should be strictly in accordance with the agreement to do. That's what Bill Joy said, writing the meaning of the code while flipping through the RFC. Object-oriented programming refers to abstraction and representational. Abstract and representational are contradictory unity, which cannot be only abstract without a representational. People who are generally aware of abstractions understand this truth. But some people only know the image but do not know what the abstract thing.

So only interface is not implemented, or only implemented without interface is useless, anti-oo.

So it's still an honest object-oriented programming, protocol-oriented programming, or anything that is not oriented, honest programming.

But I hate to talk about terminology, so why don't we talk about leadership-oriented programming? User-oriented programming? Leaders and users are sometimes very BT, we are oriented to BT programming?

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.