Good book finishing series - design mode: can be used for object-oriented software base 6

zhaozj2021-02-08  212

Chapter 6 Conclusion Perhaps someone will think of this book and contribute. After all, it did not propose any new algorithms or new programming techniques that have never been seen. This book has neither a strict system design method has not proposed a new set of design theory - it is just some of the existing design documentation. Maybe you will think it is a suitable entry guide, but there is no more help to experienced object-oriented designers. We hope that you will not have the above ideas. This is because of the classification of design patterns, it provides a standard name and definition for the various technologies we use. If we don't study the design patterns in the software, you cannot improve them, it is more difficult to make new design patterns. This book is just a beginning. It discusses some of the most common design patterns used by object-oriented design experts, and people often hear and learn these design patterns when they are verbally or analyzed. Some people have read the first draft of this book and write it down, so this book should have the role of throwing jade. We hope that this will mark the beginning of a documentation of software practitioners expertise and skills. The discussion of this chapter includes what we believe is a huge impact of design patterns, design patterns and other design work, and how you find and organize design patterns. 6.1 Design patterns will bring any experience based on our daily design models, we believe they will affect the way you design the object-oriented software in the following aspects. 6.2 A set of common design vocabulary for programming experts using traditional languages ​​shows that their knowledge and experience are not simply organized around the grammar, but surrounded by algorithms, data structures, customary language [AS 8 5 , C OP 9 2, C UR 8 9, SS 8 6] and a larger conceptual structure such as plan [SE 8 4] satisfying a particular target is organized. Designers may consider more not to record design, but how to match the current design issues with known plans, algorithms, data structures, and habit. Computer scientists naming and categorize algorithms and data structures, but we are rarely named after other types of patterns. Design patterns are discussing, writing documents, as well as exploring a wide range of design vocabulary. The design pattern allows you to talk about a system at a higher abstract level than the design representation or programming language, thereby reducing its complexity. The design pattern improves your design and your level to discuss these designs. Once you absorb the design patterns in this book, your design vocabulary is almost certainly necessary to change. You will use the names of these modes to represent a design, such as you will say: "Here we use the observer mode", or "Let's take a S T R a T E G Y from these classes. 6.3 Writing documents and learning assistance methods Learn about the design patterns in this book allows you to easily understand existing systems. Most large-scale object-oriented systems use these design patterns. People who often complain about the use of inheritance and difficult to understand the control process during the study of object-oriented programming. This is largely due to the design mode in the system. Learning these design patterns will help you understand the existing object-oriented system. These design patterns can also improve your design level. They provide you with some common problems. Of course, if you have long been working for an object-oriented system, you will learn these design patterns sooner or later. But you can learn faster through this book. Learning these patterns will help a newbie to make the same design as an expert. Moreover, in accordance with the design pattern used by a system, the system can make it easy to understand, otherwise, the design of the system must be reverse engineering to clarify the design mode of its use. The advantage of a universal design vocabulary is that you don't have to describe the entire design pattern, and just use its name, you will understand your design when others read this name. Of course, if the reader does not know this design pattern, he must first find this mode, even if it is still more likely to rebound. We use these patterns in our design and find that they have a lot of benefits. We also use these design patterns in some delatable naive ways. We use them to name, think, and teach excellent design, and use a series of design patterns to describe our design.

It is easy to come up with more complex ways to design a design mode, such as a mode-based C A S e tool or hypertext document. However, even if there is no complex tool, the design pattern is still very helpful to us. 6.4 A supplementary object-oriented design method for existing methods can be used to promote good design, teaching newers how to design, and standardize design activities. A design method usually defines a group (notation) that is used to model the modeling of design problems, and what kind of rules that use these marks in what way to decide . Design methods typically describe problems in a design, how to solve these problems, and how to assess a design. But the design method also cannot describe the experience of design experts. We believe that the design model is an important part of the object-oriented design method. These design patterns show how to use basic technologies such as objects, inheritance, and polymorphisms. They also show how to parameterize a system in algorithm, behavior, status, or need to generate. The design pattern allows you to more describe "why" this design is not just record your design results. The applicability, effects, and implementation of design patterns will help guide you to make various necessary design decisions. Design mode is especially useful when converting an analytical model into a realization model. Although many people claim that object-oriented analysis can smoothly convert to design, practice shows far less. A flexible accessibility design often contains some objects in the analysis model. In addition, the programming language and class library you use will also affect the design. Therefore, in order to make the design can be reused, the analysis model is often required. Many design patterns describe such problems, which is why we call it a designed pattern. A mature design method not only has a design mode, but also other types of patterns, such as analytical modes, user interface design patterns, or performance adjustment modes, and more. But the design model is the most important part, which is overloaded before. 6.5 Reconstructive Target Development Reuse Software is that developers often have to reorganize or reconstruct the [O J 9 0] software system. Design patterns can help you reorganize a design while reducing future reconstruction work. The life cycle of object-oriented software is often divided into several phases. Brain Foote divides them into prototype stages, expansion stages and

Three stages of consolidation stage [F O O 9 2]. In the prototype phase, a rapid prototype is first established, on this basis, the incremental modification is performed until a set of basic needs and then enter "Youth". At this point, the class hierarchy in the software usually reflects the individual entities in the original problem domain. The main multiplexing mode of this stage is to be reused by inheriting. Once the software enters adolescence and delivered, its evolution is determined by the following two mutual conflicts: (1) The software must meet more requirements. (2) The software must be easier to reuse. New demand often requires the addition of new classes and operations to even increase the entire class level. So the software will have to meet new needs through an extension phase. However, this extension does not last long. The continuous expansion of the software will make it become too dead and difficult to further modify. Software levels no longer match any problem domain, but a mix of multiple issues domains, and many unrelated operations and instance variables are defined in the class. The software must be reorganized if the software will continue to evolve, which is referred to as reconstruction (R E f A C T O R I N g). The framework often appears at this stage. Refactoring work includes a component split into a dedicated and universal component, and puts the individual operations in the class hierarchy or off to the appropriate class, and rationalize the interfaces of each class. This consolidation phase will produce many new types of objects, which are usually obtained by decomposition rather than inheriting the original object. Therefore, the black box reserves replace the white box multiplexed. Meet more demand and reach more reusable requirements to promote object-oriented software to continuously expand and consolidate these two phases - expansions to meet new needs, and consolidate make software more common (see below). This cycle is inevitable. But good designers not only know which changes will cause reconstruction, and also know which classes and object structures can avoid reconstruction - their design is robust to demand changes. Thorough analysis of demand helps to highlight those needs that are easily changed in software life cycles, and a good design should be stable to these changes. Our design model records many reconstructed design structures. These modes can be used to prevent future reconstruction in the initial stage of design. But you can use these patterns even after the system is built, they can still teach you how to modify your system. Design patterns provide a goal for your reconstruction. 6.6 This book is a simple historical classification design pattern to start with the doctoral thesis [Gam91, Gam92] of E R I C H. His paper has a pattern of half of this book. When O O P S l A'9 1 was held, it was officially a separate job, and R i c h a r d has been joined in this work with E R I C H. Soon J o h n is also added. When O O P S l A'9 2, R A L P H has also been added to this group. We have tried to make our work results on E C O P'9 3, but we will soon realize that the papers of the space too long are not hired. So we simplify it into a summary to publish it at that time. After that, we decided to write a book in the pattern of our classification.

Further reuse further needs to generate prototypes In this process, we changed some names. "WR APPER" becomes "D ecorator", "g LuE" becomes "f acade", "s lyret" becomes "s Ingleton", and "Wa Lker" becomes "Vi Sitor", and Deleted a few seem to be less important. However, since 1 992, this classification system has contained in which patterns have not changed, but the models themselves have improved. In fact, it is noted that something is a mode or a relatively easy part of the entire work. All our four people often engage in the construction of an object-oriented system, and find that the discovery mode is not difficult when exposed to a sufficiently system. However, the description mode is much more difficult. When you go back to see some systems you have built, you will find a model in your work. However, it is very difficult to describe them to make unfamiliar people and realize why they are important. Experts can immediately realize their value from earlier versions of our model, but only those who have actually used these modes can understand them. Since one of the main purposes of this book is to teach design a newcomer for object-oriented design, we must improve the classification description of the model. We expand the space of each model, where the example and sample code of the specific instructions are joined, and the trade-off of the mode and the different ways of implementation mode are also checked. This makes the pattern easier. Another important revision made in the past year is a more powerful question. The mode is a problem solution, which is the technical means that can be reused. This is easy to understand; how difficult is to use this mode under what circumstances, that is, to portray the problem for this mode and its context In this context, this mode is the optimal solution. In general, understand "What to do" is easier than "why"; and a model "why" is what it wants to solve. It is also important to understand the purpose of a model. It can help us choose the model to use, or help us understand the design of the existing system. As a model, even if you already know the solution, you must return your head to determine and portray the problem solved by this mode. 6.7 Models We are not the only group of design patterns interested in design patterns to write books. We belong to a larger circle, and people in this circle are very interested in the model, especially the software. Christopher Alexander of architects studied the model of buildings and communities and developed a "mode language" to generate them. His job hempily inspired us again. So it is necessary to compare our work with his work, then we will look at other work on software models. 6.8 Alexander's mode language Our work is similar in many ways and A L e x a n d e r. Both are on the basis of observing the existing system, discovering the model, have a template for describing the mode (although our template is very different), it is use natural language and many examples instead of using the form language. The description mode gives the principle behind each mode. However, our work is also different from the mode language of A L e x a n d e r: 1) Human is engaged in building activities for thousands of years, and many classic cases are available for reference. Relative to the history of the construction of a software system is short, there are few systems that can be called classic. 2) Alexander gives his mode of use, and we don't. 3) The Alexander mode emphasizes the problems targeted, and the design mode describes the solution more detailed.

4) a l e x a n d e R claims that his mode can generate a complete building, and we can't say that our model can generate a complete program. A l e x a n d e R claims to design a house by simply using his mode using his mode. This is similar to some object-oriented design methodologists, and they also give the rules for software design steps. A l e x a n d e r does not deny the necessity of creation, and some of his modes require designers to understand the living habits of the user designed buildings. Moreover, his belief in designing "poetic" hinted to have a professional level that is higher than the model language itself. However, what is the description of how to generate the design is meant that the mode language makes design activities a determinative and repeatable process. A l e x a n D e r View inspiration We focus on the trade-off problem - a variety of "force" jointly determine the final design results. Under his influence, we carefully considered our design mode applicability and its effects. This also makes us no longer try the formal representation of the definition mode. This is because, although this formal representation will make mode automation possible, it is more important to explore new modes instead of interacting patterns. According to the view of A L e x a n d e r, the pattern of this book cannot form a pattern language. Considering the diversity of the software system built, it is difficult to give a "complete" pattern collection to guide people to design a complete application step by step. Although we can do this for some specific types of applications (such as report generation systems). However, the model system of this book is just a collection of related modes, and we cannot view it as a mode language. In fact, we think never have a complete software mode language. Of course, we can make the mode system more complete, if you can join the framework and how to use the frame [J oh 9 2], user interface design mode [BJ 9 4], analysis mode [C OA 9 2], and the software development process Other aspects of all aspects. The design pattern is just a part of a larger software mode language. 6.9 Software Mode Our First Collection Software Architecture is a seminar presided over Bruce Anderson in the OO P S L A'9 1. The discussion is committed to preparing a manual for software architectural designers (from this book, we believe that "Architecture Encyclopedia" is better than "Architecture Manual"). Since then, a series of conferences have been held, and the recent is the first programming language conference held in August 1994, which established a group, and its interest is to document software. Of course, there are other people to have the same goal. Danald Knuth's "Art of Computer Programming" [K N U 7 3] is one of the earliest attempts to classify software knowledge, but he focuses on the description algorithm. It turns out that even this work is still a great engineering. "Graphics Gems" series [GLA90, ARV91, KIR92] is another design knowledge classification system that is also focused on algorithms. The US Defense Department's field special software structural program focuses on the collection of information about architectural structures. Knowledge-based software engineering communities attempt to express software related knowledge. There are also many other groups to work hard to be similar to our similar goals. James Coplien's "Advanced C : Programming Styles and Indioms" [C O P 9 2] A book also has an impact on us. Compared to our design mode, the mode described in this book is more targeted for C languages, and there is also a number of low-layer modes. However, as it has pointed out in our model, there are some repetitions. J i m is active in the pattern industry and is currently studying the models used to describe the role of people in the software development organization. You can also find a description of the pattern from many other places. Kent Beck is one of the pioneers who first advocate the work of studying Christopher Alexander in the software community.

In 1 993, he began to write 2 3 6 design mode in "The Smalltalk Report": Refer to the object-oriented software for the "The Poetry of the Language" [AIS 7 7] write about S MALLTALK mode A column. Peter COAD started collection mode for a while. In our view, his paper about the model is mainly discussed by analysis mode [C O A 9 2]. We know that he is still working in this area, but we didn't see his latest results. We also heard that there are several books about models are writing, but they have not seen it at present, so we can only tell you that they have to appear. One of the books will come from P A T T T E R NLANGUAGUE OF Programming Conference. 6.10 Invitation Parts If you are interested in the pattern, what can you do? First, you can use these design patterns in your design and look for other available design patterns. In the next few years, there will be many books and articles related to the model, so I don't have a new mode. Continuously accumulating and using your pattern vocabulary, you can use them when discussing your design with others, you can use them when you think and write your design. Second, put forward your criticism. This design pattern system is the result of many people's hard work. In addition to us, dozens of comments put forward feedback. If you find the problem, please contact us if you find the problem or feel that some places need to be further explained. Similarly, for other mode systems, please give you feedback. An important advantage of the pattern is that it provides design decisions no longer a fuzzy intuitive intention, the authors of the model can clearly explain his trade-offs in the demand elements. This provides convenience for discovering and discussing the deficiencies of the model. You can make full use of this superiority. Once again, look for the model you have used and write them down. Take them as your part of your document, give others. You don't have to explore mode in research institutions. In fact, if you don't have a practical experience in an area, it is almost impossible to find related patterns. Although you write your pattern system, you must let others help you make it! 6.11 Emphasize the best design to use many design patterns, which are integrated to form a larger whole. Just as C H R I S t o p h e ras said: It is possible to build a building in a loose manner to build a building. Such buildings are just some models of stacking, not compact. This is not deep enough. However, there is another way of combination mode, many modes overlap in the same physical space: such a building is very compact, integrating many connotations in a small space; because of this compact, it becomes profound.

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

New Post(0)