Original: Linda M. Northrop
Software Engineering Institute
Translation: [aka] waterbird
1. Historical Review
To address the challenges of increasingly complex software requirements, the software industry has developed an object-oriented (OO) software development model. As the best countermeasure against the "software crisis", OO technology has aroused widespread attention. Most people initially think of it as an unrealistic method and a research that satisfies their curiosity at the moment. Now they are very enthusiastic. ManyProgramming LanguageAll released new versions that support object-oriented. A large number of object-oriented development methods have been proposed. OO conferences, academic seminars and courses are very popular. Countless professional academic journals have opened up a special layout for this topic. Some software development contracts even specify the technology and language that must use oo. Object-oriented software development is fascinating to Structured Software Development in, and the development momentum of OO is still accelerating.
Concepts such as "object" and "Object Attributes" can be traced back to the early 1950 s. They first appeared in early books about artificial intelligence. However, the actual development of OO began in 1966 (when the cultural revolution broke out in China ). At that time, kisten Nygaard and Ole-Johan Dahl developed a Simula language with a higher abstraction mechanism. Simula providesProgramA higher level of abstraction and encapsulation introduces the concept of data abstraction and classes to simulate an actual problem. At about the same time, Alan Kay was working hard on a personal computer at the University of youhe and hoped to implement graphical and simulated simulation on it. Although Kay's attempt was unsuccessful due to hardware and software restrictions, his ideas were not lost. In early 1970s, he joined the Palo Alto Research Center (PARC) and once again put these ideas into practice.
At Parc, his research team believes that computer technology is the key to improving communication channels between people and machines. With the support of this belief and the concept of the simula class, they developed the Smalltalk language. In 1972, PARC released the first version of smalltalk. At this time, the term "Object-Oriented" was officially determined. Smalltalk is regarded as the first truly object-oriented language. The purpose of Smalltalk is to enable software design to be carried out in units that are as automated as possible. In smalltalk, everything is an object-an instance of a class. In the first Smalltalk world, objects are closely linked with nouns. Smalltalk also supports a highly interactive development environment and prototype method. This original work was not published at the beginning, but it was regarded as an academic interest with a strong experimental nature.
Smalltalk-80 is a summary of PARC's series of Smalltalk versions released in 1981. The <byte> magazine published the important results of the Smalltalk Development Group in August 1981. On the cover of this magazine, a hot air balloon is rising from an island, marking the departure of PARC's Object-oriented thinking. It's time to publish it to the software development community. At first, the impact was only gradual, but it quickly jumped to the level of popularity. The hot air balloon has really set sail and has a profound impact. Earlier studies on the development environment of Smalltalk led to a series of subsequent developments: Windows, icons, mouse, and drop-down windows. The Smalltalk language also affected the object-oriented languages in the early and mid 1980s s, such as: Object-C (1986), c ++ (1986), Self (1987 ), eiffl (1987), flavors (1986 ). the object-oriented application field has also been further expanded. Objects are no longer associated with nouns, but also events and processes. 1980 Grady booch first proposed the concept of object-oriented design (OOD. Then others followed, and the object-oriented analysis technology began to be published publicly. In 1985, the first commercial object-oriented database was released. Since the 1990 s, object-oriented analysis, testing, measurement, and management have been greatly developed. Currently, the frontier topics of object technology include design patterns, distributed object systems, and network-based object applications.
2 motivation
Why is the object-oriented movement so violent? This is partly due to a long-lived hope: people want it, just like other software development technologies, it can meet the urgent needs of software development for higher, faster, and stronger production efficiency, reliability, maintainability, and management. In addition, there are many reasons for its popularity.
Object-Oriented development emphasizes the direct ing from the concept of problem domains to software programs and interfaces. Psychology studies also show that the objective world is seen as a natural way of thinking that many objects are closer to humans. Objects are more stable than functions. Changes to software requirements are often functional changes, and the executors of their functions-objects-usually do not change much. In addition, object-oriented development also supports and encourages information hiding, data abstraction, and encapsulation in software engineering practices. Modifications to an object are partially isolated. Object-oriented software is easy to modify, expand, and maintain.
Object-oriented objects are also extended to various stages of the software life cycle-from analysis to coding. Moreover, object-oriented methods naturally support rapid prototyping and rad (Rapid Application Development ). The use of object-oriented development encourages reuse, not only software reuse, but also Analysis and Design Model reuse. Furthermore, the OO technology facilitates software interconnectivity, that is, applications on one node in the network can use resources on another node. Object-Oriented development also supports concurrency, hierarchy, complexity, and other common phenomena in the current software system. Today we often need to build some software systems-not just a black box application. These complex systems generally contain hierarchies composed of multiple subsystems. Object-Oriented development supports the construction of open systems, and the use of different applications for software integration provides greater flexibility. Finally, the use of object-oriented development can reduce the risk of developing complex systems, mainly because system integration is distributed throughout all stages of the software life cycle.
3. Object-oriented Modeling
Object-oriented modeling is not just a summary of new programming languages. It is a new way of thinking, a new thinking about computing and information structuring. Object-Oriented Modeling regards the system as an object of mutual collaboration. These objects are encapsulated by structures and behaviors and belong to a certain class, which has a hierarchical structure. All functions of the system are obtained by sending messages between objects. Object-oriented modeling is a conceptual framework that includes the following elements: abstraction, encapsulation, modularity, hierarchy, classification, parallelism, stability, reusability, and scalability.
The emergence of object-oriented modeling is not a computing revolution. More appropriately, it is the gradual evolution of process-oriented and strictly data-driven software development methods. New methods of software development are driven by the development of programming languages and the demand for increasingly complex problem domains. Although the analysis and design in practice are carried out before the programming stage, from the perspective of development history, it is the transformation of design and analysis technologies brought about by the evolution of programming languages. Similarly, the evolution of language is also a natural response to the increasing enhancement of computer systems and increasingly complex requirements.
Among the many factors that affect the generation of OO, the most important thing is probably the improvement of programming methods. Over the past few decades, the support for Abstract Mechanisms in programming languages has developed to a high level. This abstraction evolved from address (machine language) to name (assembly language), to expression (first-generation high-level language, such as Fortran), to control (second-generation high-level language, such as COBOL), to procedures and functions (Second and early third-generation advanced languages such as Pascal), to modules and data (third-generation advanced languages such as modula ), finally to the object (based on the object and object-oriented language ). The development of smalltalk and other object-oriented languages makes it possible to implement new analysis and design technologies.
These new OO technologies are actually the integration of structured and database methods. In the OO method, it is also important to pay attention to data stream in a small scope, such as coupling and aggregation. Similarly, the internal behaviors of objects also need process-oriented design methods. The data modeling idea of entity-relationship (ERTU) in Database technology is also embodied in the OO method.
The improvement of computer hardware architecture, the improvement of performance and price ratio, and the introduction of object concepts in hardware design have a certain impact on the development of OO. OO programs usually need to access the memory more frequently and require a higher processing speed. They need and are also leveraging powerful computer hardware capabilities. The hierarchy and classification theory of philosophy and cognitive science also promotes the generation and development of OO. Finally, the increasing scale, complexity, and distribution of computer systems have played a more or less Role in Promoting OO technology.
There are many factors that affect the development of OO, And the OO technology is not yet mature. Therefore, there are many different ideas and terminologies. All oo languages are not born and equal, and they also differ in terms and concepts. Although there is also a unified trend, there is still no consensus on how to conduct object-oriented analysis and design, and there is no uniform symbol to describe these activities. (Note: UML is working in this direction) However, the development of OO has proved to be successful in the following fields: air traffic management, animation design, banking, commercial data processing, command and control systems, CAD, CIM, databases, expert systems, image recognition, mathematical analysis, music synthesis, operating systems, process control space Station Software, robots, remote communication, interface design, and large-scale design. There is no doubt that the application of OO technology has become the mainstream of the development of the software industry.
4. Object-Oriented Programming
<1> Concept
In object-oriented programming, a program is considered as a set of objects that are mutually coordinated. Each object is an instance of a class. All classes constitute a hierarchy associated with inheritance relationships. Object-oriented languages often have the following features: Object generation function, message transmission mechanism, class and genetic mechanism. These concepts can and have already appeared separately in other programming languages, but they only come together in object-oriented languages, cooperation and complementing each other in a unique way.
Procedural programming mode: parameter input ----- | code generation | ------ result output
To implement a function, a parameter is passed into a processing process and the calculation result is returned.
| Object ------ Data Structure object-oriented programming mode:
Interface | object ------ and
| Object ------ operation
In Oop, functions are obtained through communication with objects. An object can be defined as an entity that encapsulates state and behavior, or data structures (or attributes) and operations. The status is the data and information that must be stored in the object for execution. An object interface, also known as a protocol, is a set of messages that can be responded to by a group of objects. A message is an object communication method and thus a function acquisition method. After an object receives a message from it, or executes an internal operation (sometimes a method or process), or calls an operation of another object. All objects are class instances. A class is a collection of objects with the same characteristics. Alternatively, a class is a template that can be used to generate objects. The method called by the object to respond to a message is determined by the object that receives the message. Class can be arranged in a hierarchy. In this hierarchy, sub-classes can inherit the state and method from super classes higher than others. After an object receives a message, the process of searching for the corresponding method starts from the class of the object, expands in the hierarchy of the class, and finally finds the method, or you cannot find anything (an error will be reported ). In some languages, a given class can inherit from more than one superclass, which is called multi-inheritance. If Dynamic Association is used, inheritance leads to polymorphism. Polymorphism describes the following phenomenon: If several sub-classes have redefined a function of the super class (with the same function name), when a message is sent to a subclass object, during execution, the message is interpreted as a different operation because the sub-classes are determined. Methods can also be inherited by the quilt class included in the superclass interface, but they are not actually defined. Such a superclass is also called an abstract class. Abstract classes cannot be instantiated, so they can only be used to generate subclasses.
<2> Language
The object-oriented language contains four basic branches:
1 Based on Smalltalk; including 5 versions of smalltalk, represented by Smalltalk-80.
2 C-based; including objective-C, C ++, and Java
3. LISP-based; including flavors, xlisp, loops, and clos
4. It is based on Pascal. Including Object Pascal, Turbo Pascal, Eiffel, and Ada 95
Simula is actually the ancestor of all these languages. In these oo languages, the naming of terms and the ability to support oo vary to varying degrees. Although Smalltalk-80 does not support multi-inheritance, it is considered the most object-oriented language ).
In C-based OO language, object-C is developed by Brad Cox. It comes with a rich class library and has been successfully used for development of large systems. C ++ is written by Bjarne stroustrup of Bell Labs. It extends struct in C language to class with data hiding function. Polymorphism is implemented through virtual functions. C ++ 2.0 supports multi-inheritance. In most software fields, especially on UNIX platforms, C ++ is the preferred object-oriented programming language. A new generation of Internet-based object-oriented language similar to C and C ++ is developed by Sun Microsystems. It became popular with the rise of the Internet in 1995. Applets written in Java can be embedded in HTML for interpretation and execution, which provides cross-platform features. Java and Ada support multithreading and concurrency mechanisms, and are as simple and portable as C.
The LISP-based language is mostly used in the application of knowledge expression and reasoning. Clos (Common LISP Object System) is the standard version of object-oriented lisp.
In PASCAL-based languages, Object Pascal is developed by Apple and Niklaus Wirth for Macintosh, and its class library is macapp. Turbo Pascal is developed by Borland Based on Object Pascal.
Eifel was released in 1987 by Bertrand Meyer, an interactive software engineering company. Its syntax is similar to Ada and runs in a Unix environment. When I first came out in 1983, ADA did not support inheritance and polymorphism, so it was not object-oriented. In 1995, an object-oriented ADA was finally launched, which is Ada 95.
In addition to the above object-oriented language, some languages are considered to be object-based. They are: alphard, Clu, Euclid, Gypsy, Mesa, modula.
5. Object-Oriented Software Engineering
Lifecycle
Although the object-oriented language is making exciting progress, we all know that coding is not the main source of problems in software development. In contrast, demand and analysis problems are more common, and their error correction costs are more expensive. Therefore, the attention to OO development technology should not only focus on coding, but also on other aspects of software engineering. The application prospect of the OO method in dealing with the analysis, design, analysis, and design reuse of complex systems is also very impressive. If we acknowledge that OO software development is not limited to coding activities, we must adopt a new development model, including a new software lifecycle. At present, the most common life cycle is the waterfall model (structured ). It is the first life cycle model that emerged after the "Software Crisis" in the late 1960s S. As shown below.
Analysis ----- design ----- code ----- test ------ Maintenance
The development process of the waterfall life cycle is sequential, and the activity flow is basically one-way. It assumes that developers have a clear understanding of the system at the early stage of development. Unfortunately, any software development activity inevitably involves a large number of iteration processes, whether or not you have arranged them in advance. Good Designers refer to practitioners who can work at the abstract level and specific details at the same time. In general, the shortcomings of waterfall lifecycle are shown in three aspects: <1> changes, iterations, and changes in the later stage are difficult <2> reuse is not supported <3> there is no unified model associated with each stage.
The object-oriented method starts from the problem model, and then the process of identifying and continuously refining objects. It is essentially iterative and incremental. Here, the quick prototyping and feedback loop are essential standard structures. The development process is an iterative process. With iteration, the system functions are constantly improved. Here, the obvious boundaries between the stages of analysis, design, and coding in the traditional development model become blurred. The reason is that the concept of objects fills the entire development process. The relationship between objects and them becomes a media of common expression in various stages such as analysis, design, and coding. The Development Center shifted from coding to analysis, and from function-centric to data-centric. Furthermore, the iteration and seamless nature of object-oriented development makes reuse more natural.
Recently, to improve the manageability of object-oriented development, Boehm (1988) has proposed a spiral development model that combines both macro and micro Perspectives (macro & microview. There are three macro phases: 1 Analysis-discovering and identifying objects; 2 Design-developing and designing objects; 3 Implementation-creating and implementing objects. Each macro stage contains some micro-iteration activities.
6 OOA and OOD
Because the object-oriented technology is still relatively new, there are currently many object-oriented analysis and design methods. Object-Oriented Analysis (OOA) is based on the previous information modeling technology, it can be defined as an analytical method to evaluate the needs by examining the concepts of classes and objects found in the problem domain vocabulary. OOA results in a series of "Black Box" objects exported from the problem domain. OOA usually uses scenarios to help identify basic object behaviors. A plot is a continuous activity sequence that occurs in the problem domain. When OOA is performed on a given problem domain, the concept of "framework" is very useful. A framework is the skeleton of an application or application subsystem. It contains specific or abstract classes. Or, the framework is a specific hierarchy that contains an abstract parent class that describes a problem domain. One disadvantage of all the popular OOA methods is that they lack a fixed mode (formality ).
In the object-oriented design (OOD) stage, the focus of attention is shifted from the problem space to the understanding space. Ood is a design method (booch, 1994) that describes the logic and physical processes of the designed system, as well as the static and dynamic models of the system ).
Both OOA and OOD pay attention to reusability. Researchers of OO technology are currently trying to define the concept of design patterns. It is a reusable "Fortune" that can be applied to different problem domains. Generally, a design pattern refers to a design structure or solution that appears multiple times. If they are categorized as systems, they can be reused and form the basis for communication between different designs.
The OOD technology actually appeared earlier than the OOA technology. It is difficult to draw a clear line between OOA and Ood. Therefore, the descriptions below give an overview of some commonly used OOA/OOD technologies.
Meyer uses language as a tool to express design. (1988)
Booch's OOD technology extends his previous work on Ada. He adopts a "round-trip Gestalt" method, including the following processes: Identifying objects, recognizing the semantics of objects, identifying relationships between objects, and implementing them, it also contains a series of iterations. Booch is the first person to use class charts, Class Classification charts, class templates, and object graphs to describe OOD (1991 ).
Wrifs-Brock's OOD technology is driven by the agency of duties. Class responsibilities cards is used to record the classes responsible for specific functions. After determining the class and its responsibilities, perform more detailed Relationship Analysis and subsystem implementation. (1990)
Rumbaugh uses three models to describe a system: an object model that describes the static structure of objects in the system; 2 a dynamic model that describes changes in the system status over time; 3 a functional model, describes the transformation of each data value in the system. The object diagram, state transition diagram, and data flow diagram are used to describe the three models respectively. (1991)
Coad and Yourdon use the following OOA steps to determine a multi-layer oo model (five layers): identify classes and objects, identify structures and relationships, determine themes, define attributes, and define services. The five steps correspond to the five layers of the model, namely the class and Object layer, the topic layer, the structural layer, the attribute layer, and the service layer. Their OOD method is multi-layered and multi-faceted (multicomponent ). The hierarchy is the same as OOA. This includes problem domains, interaction between people, task management, and data management.
Ivar jacbson proposed the objectid method (or jacbson method), an object-oriented software engineering method he developed in the Swedish objective system. The jacbson method emphasizes the use case. Use Case becomes the basis of the analysis model, and a design model is formed after being further described using an interactive diagram. Use Cases also drive testing in the test phase. So far, the jacbson method is the most complete industrial method. (1992)
The methods described above have many variants that cannot be listed one by one. In recent years, with the evolution of various methods, they have also been integrated. In 1995, booch, Rumbaugh, and jacbson jointly proposed the first version of UML (Unified Modelling Language), an integrated modeling language. (It has become a de facto standard for the OO modeling language)
7. Management Problems
When organizations turn to object-oriented development technology, management activities that support software development must also change. Commitment to OO technology means changing the development process, resources, and organizational structure. (Goldberg 1995) the iteration, prototype, and seamless nature of OO development eliminates the boundaries between different stages of traditional development models. New boundaries must be redefined. At the same time, some software measurement methods are not applicable. "CodeLines of code (LOC) are definitely out of date. The number of reusable classes, the depth of inheritance layers, the number of relationships between classes, the coupling between objects, the number and size of classes are more meaningful. The work on OO software measurement is still quite new, but some references have been provided. (Lorenz 1993)
Resource allocation and staffing must be reconsidered. The size of the development team gradually decreases, and experts who are good at reuse are beginning to eat well. The focus should be on reuse rather than loc. The real implementation of reuse requires a new set of standards. The Library and application framework must also be established while executing the software contract. Long-term investment strategies and commitments and processes for maintaining reusable wealth become more important.
As for Software Quality Assurance, traditional testing activities are still necessary, but their timing and definitions must be changed. For example, "going over" a function involves activating a plot (scenario). A series of objects interact with each other, send messages, and implement a specific function. Testing an OO system is another topic that requires further research. Releasing a stable prototype requires different configuration management from the previous products that control structured development.
Another management issue that should be paid attention to is the proper tool support. An Object-Oriented development environment is required. It also includes a class library browser, a incremental compiler, a debugger supporting class and object semantics, graphical support for design and analysis activities, and a reference check, configuration Management and version control tools, as well as a database application like a class library.
Cost Estimation is also a problem unless the history of object-oriented development is sufficient to provide data on resources and consumption. The current and future reuse costs should be added to the formula. Finally, management must also understand the risks encountered during the transition to object-oriented methods. For example, the cost of message transmission, explosive growth of message transmission, dynamic memory allocation, and release. There are also some initial risks, such as familiarity with appropriate tools and development strategies, as well as appropriate training and class library development.
8 transition to object-oriented
The transition may take quite a long time. Training is required. It is also necessary for an experiment-type wizard project. We recommend that you do not use a combination of structured and object-oriented images. More and more evidence shows that success requires a complete oo solution.
9 Future
In general, object-oriented technology is the result of the natural evolution of previous software development technologies and has a promising future for software development in many application fields. Using Maurice Wilkes's speech at his Turing Award Ceremony: "The target is one of the most exciting innovations in the software industry since 1970s ." (1996) However, object-oriented development is far from mature because it is not a panacea for all diseases. However, although the future of OO technology is not yet determined, some predictions in the early 1990s S have been made. (Winblad 1990) class libraries and application frameworks are available on the market. Transparent information access between applications and environments has been achieved. The environment supporting users' communication between applications and the object-oriented multimedia toolkit for inheritance are emerging. With the accumulation of experience, the development of OO will become increasingly popular, and the OO technology will become increasingly mature. Of course, OO technology may also replace or integrate a development technology that handles high-level abstraction. These are just guesses. Even in the near future, there will be no doubt that we will be talking about objects out of date, but now there are still many problems waiting for us to be enthusiastic.