最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。
Design patterns (Design pattern) represent best practices and are often adopted by experienced object-oriented software developers. Design pattern is the solution to the general problems faced by software developers in the process of software development. These solutions are summed up by many software developers after a long period of trial and error.
Design pattern is a set of repeatedly used, well-known, classified and cataloged summary of code design experience. The purpose of using design patterns is to reuse code, make it easier for others to understand, and ensure code reliability. There is no doubt that design patterns are win-win for others and systems. Design patterns make the code really engineering. Design patterns are the cornerstone of software engineering, just like the bricks and stones of a building. The rational use of design patterns in a project can perfectly solve many problems, and each pattern has corresponding principles in reality, and each pattern describes a problem that occurs repeatedly around us. And the core solution to the problem, which is also the reason why design patterns can be widely used. In 1994, Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides co-authored a book called Design Patterns - Elements of Reusable Object-Oriented Software(中文译名:设计模式 - 可复用的面向对象软件元素) The concept of design patterns in software development is mentioned for the first time. The four authors are collectively called GOF(四人帮,全拼 Gang of Four) . The design patterns they proposed are mainly based on the following object-oriented design principles. Program the interface rather than the implementation. Priority is given to object composition over inheritance. Two main uses of design patterns in software development. Design patterns provide a standard system of terminology specific to specific scenarios. For example, the singleton design pattern means using a single object so that all developers familiar with the singleton design pattern can use a single object, and in this way you can tell each other that the program is using the singleton pattern. Design patterns have been developed for a long time, and they provide the best solutions to general problems faced in the process of software development. Learning these patterns can help inexperienced developers learn software design in a simple and quick way. Reference books based on design patterns Design Patterns - Elements of Reusable Object-Oriented Software(中文译名:设计模式 - 可复用的面向对象软件元素) There are 23 design patterns mentioned in. These patterns can be divided into three categories: creative pattern (Creational Patterns), structural pattern (Structural Patterns) and behavioral pattern (Behavioral Patterns). Of course, we will also discuss another type of design pattern: the J2EE design pattern. Serial number Pattern & description Include 1 创建型模式 These design patterns provide a way to hide the creation logic while creating the object, rather than instantiating the object directly using the new operator. This makes the program more flexible in determining which objects need to be created for a given instance. Factory mode (Factory Pattern) Abstract Factory pattern (Abstract Factory Pattern) Singleton mode (Singleton Pattern) Builder mode (Builder Pattern) Prototype pattern (Prototype Pattern) 2 结构型模式 These patterns focus on the combinations and relationships between objects and are designed to solve how to build flexible and reusable class and object structures. Adapter pattern (Adapter Pattern) Bridge mode (Bridge Pattern) Filter mode (Filter, Criteria Pattern) Combination mode (Composite Pattern) Decorator mode (Decorator Pattern) Appearance mode (Facade Pattern) Shared meta-mode (Flyweight Pattern) Agent mode (Proxy Pattern) 3 行为型模式 These patterns focus on the communication and interaction between objects, and are designed to solve the responsibility distribution between objects and the encapsulation of algorithms. Command mode (Command Pattern) Interpreter mode (Interpreter Pattern) Iterator mode (Iterator Pattern) Intermediary mode (Mediator Pattern) Memo mode (Memento Pattern) Observer mode (Observer Pattern) State mode (State Pattern) Null object mode (Null Object Pattern) Policy Mode (Strategy Pattern) Template mode (Template Pattern) Visitor Mode (Visitor Pattern) 4 J2EE 模式 These design patterns pay special attention to the presentation layer. These patterns were identified by Sun Java Center. Business Representative Model (Business Delegate Pattern) Composite entity Mode (Composite Entity Pattern) Data access object pattern (Data Access Object Pattern) Front controller mode (Front Controller Pattern) Interception filter mode (Intercepting Filter Pattern) Service Locator Mode (Service Locator Pattern) Transfer object Mode (Transfer Object Pattern) Here is a picture to describe the relationship between design patterns as a whole: 1、开闭原则(Open Close Principle) The principle of opening and closing means: 对扩展开放,对修改关闭 . When the program needs to be expanded, you can’t modify the original code to achieve a hot-swappable effect. In short, it is to make the program scalable and easy to maintain and upgrade. To achieve this effect, we need to use interfaces and abstract classes, which we will mention later in the specific design. 2、里氏代换原则(Liskov Substitution Principle) Richter substitution principle is one of the basic principles of object-oriented design. The principle of Richter substitution says that wherever a base class can appear, a subclass must appear. LSP is the cornerstone of inheritance reuse, only when the derived class can replace the base class, and the function of the software unit is not affected, the base class can really be reused, and the derived class can add new behavior on the basis of the base class. The Richter scale substitution principle is a supplement to the opening and closing principle. The key step to realize the opening and closing principle is abstraction, and the inheritance relationship between base class and subclass is the concrete realization of abstraction, so the Richter substitution principle is the specification of the concrete steps to realize abstraction. 3、依赖倒转原则(Dependence Inversion Principle) This principle is the basis of the open-close principle, the specific content: programming for the interface, relying on the abstract rather than on the concrete. 4、接口隔离原则(Interface Segregation Principle) This principle means that it is better to use multiple isolated interfaces than to use a single interface. It has another meaning: reduce the coupling between classes. Thus it can be seen that, in fact, the design pattern is a software design idea that starts from the large-scale software architecture and is easy to upgrade and maintain. it emphasizes reducing dependence and coupling. 5、迪米特法则,又称最少知道原则(Demeter Principle) The principle of least knowledge means that an entity should interact with other entities as little as possible so that the functional modules of the system are relatively independent. 6、合成复用原则(Composite Reuse Principle) The principle of composite reuse refers to the use of composition / aggregation as much as possible, rather than inheritance. 6.2.1. What is GOF (Gang of four, all spelling Gang of Four)? ¶
6.2.2. The use of design patterns ¶
6.2.3. Common platform for developers ¶
6.2.4. Best practic ¶
6.2.5. Types of design patterns ¶
6.2.6. Six principles of Design pattern ¶