Object-oriented software development

xiaoxiao2021-03-06  18

1 historical review

In response to the challenge of increasing complex software requirements, the software industry has developed an object-oriented software development model. Currently active

The best countermeasures for "Software Crisis" have attracted people's general concern. It was initially seen as only an unrealistic way.

And meet the study of a curiosity, now I have got a welcome of people. Many programming languages ​​have launched a new version of the object-oriented

this. A large number of object-oriented development methods are proposed. Conference on OO, academic seminars and courses are very popular. Countless professional academic

The journals have opened up a special layout for this topic. Some software development contracts even specifically indicate the technology and language that must use OO. Face-oriented

The software development of the like For the 1990s, it is a structured software development for the 1970s, and the OO's development is still in the day.

Yip acceleration.

The concepts such as "objects" and "objects" can be traced back to the early 1950s. They first appeared in artificial

Intelligent early works. However, the actual development of OO is started in 1966 (the revolution of the Cultural Revolution in China). Kisten

NYGAARD ​​and OLE-JOHAN DAHL have developed Simula languages ​​with more advanced abstract mechanisms. Simula provides a higher level than the child program

Abstract and package; for simulation an actual problem, introducing data abstraction and class concept. Around the same period, Alan Kay is in especially

At a personal computer of the university, he hopes to achieve graphical and simulated simulation on it. Despite the limitations of hardware and software,

Kay's trial was not successful, but his ideas did not lose. In the early 1970s, he joined the Palo Alto Research Center (PARC),

These ideas are implemented.

In PARC, his research team firmly believes that computer technology is the key to improving communication channels between people, people and machines. This faith

With the support of Simula's class, they have developed a SmallTalk language; 1972 PARC released SmallTalk's first

Version. At this time, "object-oriented" is officially determined. SmallTalk is considered to be the first true face-to-object language

Say. SmallTalk's goal is to make the software design can be performed in units that automate as much as possible. Everything in SmallTalk is

Icon ----- an instance of a certain class. In the world's original SmallTalk, the object is tightly connected to the noun. SmallTalk also supports a height

Interactive development environment and prototype method. This original job is not published, just as an academic interest with strong test properties.

It has been.

SmallTalk-80 is a summary of a series of SMALLTALK versions of PARC, posted in 1981. August 1981 <> magazine announced

Important results of the SmallTalk development group. On the cover of this magazine, a hot air balloon is rising from an isolated island, marking

Object-oriented objective idea of ​​PARC. It is time to disclose to the software development industry. At first, the impact is just progressive, but very fast

Jump to the hot extent. The hot air balloon does set sail, and the effect is far-reaching. Early SMALLTALK's research on the development environment has caused

A series of progress: Window, Icon (Icon), Mouse (Mouse) and drop-down Window environment. SmallTalk language

Impact Object-oriented language in the early 190s, such as: Object-C (1986), C (1986), Self (1987), EIFFL

(1987), Flavors (1986). Object-oriented applications are also broadening. Objects are no longer limited to nouns, including events

And the process. 1980 Grady Booch first proposes the concept of object design (OOD). Then other people follow, object-oriented analysis

The technology began publication. In 1985, the first commercially used object-oriented database came out. Since the 1990s, research-oriented analysis, testing, metrics, and management have been developed. Currently, the frontier topics of object technology include Design Patterns.

The layout object system and the network-based object application, and the like.

2 motivation

Why is the extent to which object-oriented motion develops to the fire now? Part is a hope that people have long since: people hope

It, like the previous software development technology, it can meet software development for productivity, reliability, easy maintenance, and management.

Higher, faster, and more urgent needs. In addition, there are many reasons that prompted its popularity.

Object-oriented development emphasizes the concept of problem domain to direct mapping of software programs and interfaces; psychology research also shows

The boundary is regarded as many objects closer to human natural thinking. Object is more stable than functions; changes in software demand are often functional

Variation, and its functional executor ---- Object ---- usually does not change. In addition, object-oriented development also supports, encourages software workers

Information hide, data abstraction and packaging in practice. Modifications inside an object are locally isolated. Software-oriented software is easy to repair

Change, expand and maintain.

Object-oriented is also expanded to be applied to each stage of the software lifecycle --- analysis to encoding. Moreover, the object-oriented method is natural.

Support for rapid prototyping and RAD (Rapid Application Developments). Useful use of object-oriented use encourage reuse, not only software

Reuse, also include the reuse of the model, design. Further, OO technology is also convenient for software interchangeability, namely one section in the network.

Point application can use resources on another node. Object-oriented development also supports concurrency, hierarchy and complexity, etc.

Common phenomenon in the university. Today, we often need to build some software systems ---- Not just a black box application. These complex systems are usually included

Hierarchy consisting of multiple subsystems. Object-oriented development supports the construction of open systems; uses different applications for software integration

More flexible. Finally, the use of object-oriented development can reduce the danger of developing complex systems, mainly because system integration

The various phases of the fabric 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 structure of calculation and information

New thinking. Object-oriented modeling, seeing the system is the object of collaboration, these objects are the packages of structures and behaviors, belong to a certain

Class, those classes have a hierarchical structure. All functions of the system are obtained by transmitting messages between objects. Object-oriented modeling

It can be considered a conceptual framework containing the following elements: abstraction, packaging, modular, hierarchical, classification, parallel, stable, reusable

Scalability.

The emergence of object-oriented modeling cannot be considered a calculation revolution. More inappropriate, it is a process and strict data-driven software

Gradual evolution of development methods. The new way of software development is driven by two aspects: the development of programming languages ​​and the increasingly complex question

The demand drive of the topic domain. Although the analysis and design of the programming and design are carried out prior to programming phases, it is the innovation belt of programming language from development history.

To design and analyze changes in technology. Similarly, the evolution of language is also an increasingly complex natural response to the enhancement and demand of the computer system.

In many factors affecting OO, the most important possibilities may be an advanced programming method. In the past few decades, the programming language

Support for abstract mechanism has evolved to a higher level. This abstract evolutionary from address (machine language) to the name (complicated language

Words), to the expression (first generation of advanced languages, such as Fortran), to control (second-generation advanced language, such as cobol), to process and functions

(Second Generation and Early Third Generation Senior Language, such as pascal), to modules and data (late third-generation advanced language, such as MODULA), last to object (based on object and object-oriented language). SmallTalk and other objective development of object-oriented language make new analysis and design technology

Implementation is possible.

These new OO technologies are actually a combination of structured and database methods. In the method of oo, the small range is related to the data stream.

Note, such as coupling and aggregation, is also very important. Similarly, the behavior inside the object is ultimately a process-oriented design method. Database Technology

The physical-relationship (ER figure) of the relationship (ER] is also reflected in the OO method.

The advancement of computer hardware architecture, improvement of performance price ratio and the introduction of object concepts in hardware design have produced a development of OO.

The impact. OO procedures typically access memory more frequently and requires higher processing speed. They need and are using powerful

Computer hardware function. The level and classification theory of philosophy and cognitive science have also promoted the production and development of OO. Finally, the computer system is increasing

Long scale, complexity, and distribution have played more or less OO technology.

Because there are many factors affecting OO development, OO technology itself is not mature, so there are many different proposals on ideas and terminology. all

The OO language is not born, equally, they are also different in terms, conceptual use. Although there is also a uniform trend, how to face

Analysis of the object, the design has not fully reached a consensus, and there is no unified symbol to describe these activities. (Note: UML is in the dynasty

This direction efforts) However, OO development has proven to be success in the following areas: air traffic management, animation design, bank, business

Data processing, command, and control system, CAD, CIM, database, expert system, image recognition, mathematical analysis, music synthesis, operation

System, process control, space station software, robot, remote communication, interface design and VLSI design. There is no doubt that the application of OO technology has become

Mainstream for the development of the software industry.

4 Object-Oriented Programming

<1> concept

In object-oriented programming, the program is seen as a collection of objects collaboration, each object is an instance of a class, all classes

A hierarchy associated by inheritance relationship. Object-oriented language often has the following characteristics: object generation function, message delivery machine

System, class and genetic mechanism. These concepts can of course also appear separately in other programming languages, but only in object-oriented languages.

Among them, they will appear together to collaborate with each other with a unique cooperation.

Process programming mode: parameter input ----- | code | ------ result output

To implement a feature, the parameter is passed to a process, and finally returns the calculation result.

| Object ------ data structure object-oriented programming mode:

Interface | Object ------ and

| Object ------ operation

In OOP, the function is obtained by communication with the object. Objects can be defined as an entity that encapsulates state and behavior; or

It is a data structure (or attribute) and operation. The status is actually data, information that must be stored in the object for execution behavior. Object's boundary

The surface, it can also be called an agreement, which is a collection of messages that the object can respond. The message is the way object communication, so it is also a function

The way. After the object is sent to him, or execute an internal operation (sometimes a method or process), or then call other

Operation of objects. All objects are an instance of a class. Category is a collection of objects with the same features, or it can also be said that the class is available for generating

A template for an object. The object is called by the object response, which is determined by the object that accepts the message. Class can be in one level

Structure is arranged. In this hierarchical structure, the subclass can inherit the state and method from the super class than him. When the object receives a message, the process of finding the corresponding method will start from the class from the object, and unfolded in the hierarchy where the class is located.

This method, or nothing is not found (it will be an error). In some languages, a given class can be inherited from more than one superclass, saying

It is more inherited. If you use a dynamic cable, inheritance results in a polymorphism. Multi-state description is the following: If several subclasses are reabled

Define a function of the superclass (both the same function name), when the message is sent to a sub-class object, the message will be due to

The subclass is determined to be interpreted as different operations. The method can also be included in the superclass interface inheritance, and actually not

To really define him. Such superclars are also called abstract classes. The abstract class cannot be instantiated, so it can only be used to generate a subclass.

<2> language

Object-oriented languages ​​contain four basic branches:

1 Based on SmallTalk; 5 versions including SmallTalk, represents SmallTalk-80.

2 Based on C; including Objective-C, C , Java

3 based on LISP; including flavors, XLISP, LOOPS, CLOS

4 based on Pascal. Including Object Pascal, Turbo Pascal, Eiffel, ADA 95

Simula is actually an old ancestors in all these languages. In these OO languages, the term naming and supporting OO has varying degrees.

Differences. Although the SmallTalk-80 does not support multi-inheritance, it is still considered to be the most object-oriented language (The Truest OO)

LANGUAGE).

In c-based oo language, Object-c is developed by BRAD COX, which has a rich library, has been successful for large system

Development of the United States. C is written by Bjarne Stroustrup from Bell Lab. It extends the Struct in the C language to have data hidden

Function Class. The polymorphism is achieved by virtual functions. C 2.0 supports multiple inheritance. In most software fields,

In particular, on the UNIX platform, C is the preferred object-oriented programming language. A new generation similar to C and C is based on Internet-oriented

Language Java is developed by Sun Microsystems. It was popular in 1995 with the rise of the Internet. Java written

Applets can be embedded in HTML to be interpreted, which makes it cross-platform feature. Java and ADA support multi-threaded and concurrent mechanisms,

It is like C as simple as C, portable.

Based on Lisp-based language, mostly used in applications of knowledge expression and reasoning. Where CLOS (Common Lisp Object System) is a face

The standard version of the object Lisp.

In PASCAL-based language, Object Pascal is developed by Apple and Niklaus Wirth for Macintosh, and its class library is

Macapp. Turbo Pascal is developed by Borland as an Object Pascal.

Eiffel was released by Bertrand Meyer of the Interactive Software Engineering Company. Its syntax is similar to ADA, running in UNIX ring

territory. The ADA is just coming in 1983 and does not support inheritance and polymorphism, so it is not an object-oriented. By 1995, an object-oriented

The ADA finally came out, this is ADA 95.

In addition to the above-mentioned object-oriented language, some languages ​​are considered to be objects based on object-based. They are:

Alphard, Clu, Euclid, Gypsy, Mesa, Modula. 5 Object-Oriented Software Engineering

life cycle

Although the object-oriented language is making exciting progress, we all know that the code is not the main problem in software development.

source. In contrast, demand and analysis is more common, and their error correction cost is more expensive. Therefore, for OO development technology

Attention is not only concentrated on the encoding, and should focus on other aspects of software engineering. OO method in processing complex system analysis and setting

The application prospects for the reuse of analytics, analysis and design are also very considerable. If we admit that OO's software development is not limited to coding

To move, you must adopt a new development model, including new software life cycles. The most common life cycle is now "waterfall"

Model (structured). It is the first lifecycle model that appears after the "Software Crisis" in the late 1960s. As follows.

Analysis ----- Design ----- Code ----- Test ------ Maintenance

As shown, the development process of the waterfall lifecycle is sequential; the activity flow is basically one-way. It assumes that developers are developing

The initial understanding of the system is clear enough. Unfortunately, any software development activities inevitably involve a lot of iterative processes, no matter what you do

Whether arrangements are arranged first. Good designers refer to practices that can work at the same level and specific details. Overall

It is said that the shortcomings of the waterfall life cycle are shown in three aspects: <1> changes in the later period, iteration, difficulty in change <2> does not support the re-use <3> no

There is a unified model that contacts each stage.

Object-oriented methods start from the problem model, then the process of identifying objects, and constantly refining. It is essentially iterative and gradually

Increase. Here, the rapid prototype and feedback loop is a necessary standard structure. The development process is an iterative repetition process. With iteration

The system is continuously improved. Here, traditional development modes are significantly bound in various stages of analysis, design, and coding.

Be blurred. The reason is because the concept of the object is filled throughout the development process. The relationship between objects and them has become an analysis, design and

A common expression medium of each stage of encoding and other stages. The gravity of development is offset from the coded to the analysis, from the function-center offset. and

Moreover, iterative and seamlessness of object-oriented development makes reuse more natural.

Recently, in order to improve the manageability of object-oriented development, Boehm (1988) proposes a combination of macro and microscopic perspectives (Macro

Spiral development model of & microView. Macro includes 3 phases: 1 analysis --- Discovery and identification objects; 2 design - inventions and design pairs

Icon; 3 implementation --- creation and implementation objects. Each macro stage contains some microscopic iterative activities.

6 OOA and OOD

Due to object-oriented technologies, there are currently many object-oriented analysis and design methods. Object-oriented analysis (OOA)

Based on the previous information modeling technology, it can be defined as a concept of classes and objects found in the problem domain.

Analysis method of demand. The results of OOA are a series of "black box" objects exported from the problem domain. OOA usually uses "plot"

(Scenarios) to help determine basic object behavior. A plot is a continuous activity sequence that happens in the problem domain.

The "frameworks" concept is very useful when OOA is performed in a given problem domain. The frame is the skeleton of the application or applied subsystem.

Contains some specific or abstract classes. Alternatively, the frame is a specific hierarchy containing an abstract parent class describing a problem domain. Now

One disadvantage of all OOA methods is that they are lacking a fixed mode (FORALITY).

In the object-oriented design (OOD) phase, the focus of attention is transferred from the problem space to the space. OOD is a kind of design system

Logic and physical process description, and design methods for static and dynamic models of the system (Booch, 1994).

In OOA and OOD, there is a focus on reuse. At present, the researchers of OO technology are trying to define the concept of "Design Patterns". It is a reusable "wealth" that can be applied to different issues. Usually, design model

The style refers to a multi-segment design structure or solution. If you are classifying them, you can be reused, which can be configured.

The basis of communication between the design.

OOD technology actually appears as OOA technology. It is difficult to draw a clear boundaries in OOA and OOD. Therefore, the following

A (United) profile given to some common OOA / OOD technology.

Meyer uses the language as a tool for expression design. (1988)

Booch's OOD technology expanded his previous work in ADA. He adopted a "Round-Trip Gestalt"

Method, including the following procedure: identify the object, identify the semantics between objects, identification objects, implementation, and include a series of sequences

generation. Booch is the one who first uses class diagrams, class classification, class templates, and object maps (1991).

The OOD technology of WRIFS-BROCK's is driven by the responsibility agent. Class Responsibilities Cards is used

Record classes responsible for specific functions. After determining classes and their duties, more detailed relationship analysis and sub-system implementation are performed. (1990)

Rumbaugh uses three models to describe a system: 1 object model, describe the static structure of the object in the system; 2 dynamic model,

The system state changes over time; 3 function model, describe the transformation of each data value in the system. Object map, state conversion graph and data

The flowcharts are used to describe these three models, respectively. (1991)

COAD and YOURDON use the following OOA steps to determine a multi-layer OO model (5 levels): Find out classes and objects, identify structure, and

Relationship, determine the subject, define properties, definition services. 5 steps respectively correspond to the five levels of the model, namely, class and object layers, theme layers, structures

Layers, attribute layers and service layers. Their OOD method is both a multi-level and multicomponent. Hierarchics and OOA

kind. Many aspects include: problem domain, people and human interactions, task management and data management.

Ivar Jacobson proposes an Objectory method (or Jacbson method), a right-oriented development in the Swedish Objective system

Icon software engineering method. Jacbson's method emphasizes the use of "USE Case". Use case becomes the basis of the analysis model, use it

Interaction Diagram further describes the model of the design. Use Cases also drives test works in the test phase

Work. So far, Jacbson method is the most complete industrial approach. (1992)

There are still many variants described above, and cannot be listed one by one. In recent years, with the evolution of various methods, they are also integrated with each other.

. In 1995, Booch, Rumbaugh and Jacbson jointly worked together to propose the first version of UML (Unified Modelling Language).

Integrated modeling language. (Currently become the factual standard for OO modeling language)

7 management issues

When tissue stepping to the object-oriented development technology, management activities that support software development must also change. Commitment to use OO technology

That means changing the development process, resources, and organizational structures. (Goldberg 1995) OO development iteration, prototype, and seamless sexually eliminated tradition

The boundaries between different phases of development model. The new boundary must be re-determined. At the same time, some software measurements are not applicable. "The number of lines" LOC (LINES OF CODE) is absolutely outdated. The number of reuse, the depth of inheritance, the relationship between classes and classes

The coupling degree between objects, the number of classes, and the size of the class look more meaningful. The work in OO software measure is quite new, but

There have also been some references. (Lorenz 1993)

Resource allocation and personnel configuration need to be reconsidered. The scale of the development team gradually became small, and experts who were good at reuse began to eat. Key should

This is reused instead of LOC. Reuse truly realization requires a new standard. The library and application framework are also in the implementation of the software contract

It must be established. Long-term investment strategies, as well as commitments and processes to maintain these reusable wealth, and become more important.

As for software quality assurance, traditional test activities are still required, but their timing and definition must change. For example, will one

The function "walks" will involve activating a plot (SCENARIO), a series of objects, send messages, and implement a specific function

can. Testing an OO system is another topic that requires further research. Release a stable prototype requires different ways to control structure

Configuration management of the product.

Another problem that should be paid attention to is the appropriate tool support. An object-oriented development environment is necessary. At the same time

Including: a library browser, a gradual compiler, support class, and object semantic debugger, graphical branch of design and analysis activities

Hold and reference inspections, configuration management and version control tools, as well as a library of database applications.

The cost estimation is also a problem unless the history of object-oriented development is sufficient to provide data on resources and consumption. Calculate formula

Should be added to current and future reused costs. Finally, management must also understand the risk to be encountered during the transition of object-oriented methods.

Such as the explosion growth of messaging, messaging, dynamic memory allocation, and freight. There are also some starting risks, such as the right tool,

Familiarity with the development strategy, as well as the appropriate training, development of class libraries, etc.

8-directional transformation

This transition may be quite long. Training is necessary. An experimental guidance project is also necessary. Needless not to use

Structured and object-oriented image combination. 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 the previous software development technologies, and is extremely software development in many applications.

With future. Borrow MAURICE WILKES's speech at his map spirit awards ceremony: "The object is the most exciting since the software industry since the 1970s

One of the innovations of the heart. "(1996) However, object-oriented development is not a pilot of medicine, and its development is far from mature. But

Although OO technology has not yet been determined, some prophets in the early 1990s have been implemented. (WINBLAD 1990) Class library and application box

The rack has been available in the market. The transparent information access industry between the application and the environment has been implemented. Support users communicating between applications and

Object-oriented inheritance multimedia toolkit is emerging. With the accumulation of experience, the development of OO will become increasingly popular, and OO technology will also be increasingly mature.

Of course, OO technology may also be replaced or fused for a higher level of abstract development techniques. These are just guess. Although not far from

In the future, it is undoubtedly when talking about the object, but now, there are still many questions waiting for us to pay truly enthusiasm.

转载请注明原文地址:https://www.9cbs.com/read-50853.html

New Post(0)