Even if you have no chance to study the design pattern carefully, you have heard of the Design Pattern of "Gang of Four". The four great authors of the "Design Patterns" put the Object-Oriented Software Design Code Reuse is pushed to a new level. For the first time, the design mode is standardized and upgraded to the theoretical level. Although the software design pattern focuses on code snippet reuse, the SOA Implementation discusses service reuse, which is a problem of two different levels in software development, however, because object-oriented software design is also a pillar of SOA, there are commonalities here. There are many good ideas for the design model, which are worth learning from in service reuse of SOA. In the object-oriented software design, Details The application software uses a lot of class code. Build . The design pattern theory is to guide how to effectively organize class code to form specific application software. For example, using strategy pattern to define a series Algorithm Encapsulation class, so that they can be replaced with each other, so that the algorithm changes can be independent of Customer Composite pattern is used to combine objects into a tree structure to represent part-whole structure, so that the use of a single object and composite object is consistent. In SOA implementation, the specific application system consists Good The composition of services defined by interfaces, and the effective way to organize these services, also requires theoretical guidance, or can also define the SOA model. For example, whether an effective model can be defined to set a low-level service group to a high-level service, while at the same time taking into account the replacement of the low-level service, in order to maintain sufficient Business Flexibility. When defining the SOA model, you can also learn from the principles of the design model. For example, the liskov substitution principle Principle in Object-Oriented Software Design applies to sub-classes (
Let Q (x) be a property provable about objects X of type T. Then Q (y) shocould be true for objects y of type s where S is a subtype of T. ). The same principle is also very meaningful for SOA. Services that expand functions on the basis of the original services should maintain good compatibility, so that the service-consumption relationship of the original system can be applied to the new service without changing. Taking this as an example, the application of many mature principles can accelerate the evolution of SOA. Equivalent to the design pattern, defining the SOA pattern is actually sharing with pattern Experts Knowledge. As a new thing in SOA, at the beginning, only a few experienced technical experts and business experts were able to master the essence of SOA and skillfully applied it to specific business fields to build excellent SOA systems. If the best practices for SOA application are extracted from the successful projects implemented by experts, that is, the "pattern", through a wide range Promotion Mode usage is equivalent to quickly copying expert experience. On the one hand, people with less experience will not be at a loss because they start from scratch. They can implement SOA Based on patterns to improve the success rate and improve their own level while learning the experience of experts. On the other hand, the pattern enables SOA to serve as a carrier of expert knowledge. In the extensive application process, it has the opportunity to be further corrected and improved, and will eventually become more perfect and applicable after a thousand trials. So who will promote the definition of the model? As a carrier of expert knowledge, the model may be developed by the SOA platform tool vendor. Community And enterprises. These three sources have different emphasis on the model definition: The Platform tool manufacturers define a pattern that maximizes the use of its platform features, supplemented by the corresponding development tools; the development community often discusses general patterns to help develop standards for defining patterns. Enterprise patterns are the most practical and closely integrated with industrial applications. Regardless of the source, the same result of pattern definition is accelerating the popularization of SOA system construction knowledge.