Software technology serial (3)
Powerbuilder's charm (3) The anti-interface is separated from logic
Author: breeze Personal Home Page: http: //gentlebreeze.home4u.china.com
The method of interface and logic separation may be one of the most innovative design philosophy in recent years. Most of the architectures are around the subject. This method makes it possible to divide the technology according to the technical feature itself, so that the scalability and flexibility of the program have been unprecedented. The XMLC in the famous ENHYDRA system has almost played this ability to a peak, which can be compiled into a class and allow programmers to program this newly generated class. However, any technical model has its application range, not all corners suitable for this mode.
The first question is whether the interface and power really can be separated? It is more difficult to see the essential characteristics of object-oriented. We know that the so-called object is the react to real things. The real world is not an interface and logic separation, and only artificial things have this character. This is also one of the main reasons why the nature is rugged and the efficiency of man-made things. Artificial things are detachable, can be reassembled repeatedly, and the object of nature is unable. Therefore, the so-called interface and logic separation method itself is a strong artificial color and has been restricted.
Second, the cost and income comparison of interfaces and logic separation. We know the huge benefits of interface and logic separation is to reuse logic, manage logic separately. This causes the interface itself to be difficult to reuse. Additionally, technicians need to describe interface and logic respectively and also define connection interfaces and code. For example, when we work with XMLC first, you first define a page, then define the tag, then compile the page and assemble it into the environment. The last logic will perceive the class of this page, you can program it. XMLC saves great workload with tools, but the cost of running costs and stability is to pay. If the scalability and flexibility of the system do not need to be as high, the income of such a price is lost.
Finally, the flexibility of interface and logic analysis is limited. Due to the separation of logic and interfaces, the system is customized in different environments, which limits the flexibility of the system in a particular environment, which increases development input. For example, we are unable to apply to other environments at desktop definitions, you have to redefine new interfaces in accordance with the interface.