WCF recording (1)-from object-oriented to service-oriented

Source: Internet
Author: User
Tags software ag

The origin of WCF

To understand a technology, you must first understand why it was born. Any technology is not born out of thin air and must have its own value. The same is true for WCF. It is neither an existing concept nor a completely new concept. It is also born with the change of old technology.

Before the advent of the WCF technology, the application development of distributed communication was in a chaotic Warring States Period. Microsoft is also one of the leaders, from. Net remoting, webserivce, to WSE, enterprise service, and MSMQ. This series of products all show that Microsoft is constantly innovating and changing new initiatives. In particular, the emergence of webserivce has brought distributed development to a new application height. Compared with the previous technology, it can not only achieve cross-network, cross-platform, high system integration, not limited by communication protocols, but also have better security. The Simple Object Access Protocol (SOAP) has become a standard message exchange protocol in the industry thanks to support from companies such as IBM, Lotus, and Compaq. In addition, the Web Services Description Language (WSDL), which is used as the service description, can be unified throughout the world. With its powerful technology and market advantages, Microsoft has firmly grasped the entire distributed development field with standards, making it far from the enemy.

We will not talk about whether such monopoly is a negative factor for the industry, but its advantages are obvious. We no longer have to worry about choosing one of the many solutions, because Microsoft has done everything for us. I personally think that this kind of unification brings more obvious positive significance. Compared with the immature market, a stable and powerful technical guarantee is the most necessary. Microsoft has always adhered to the style. He did not stop on the old road of Web Service, but immediately launched a more powerful bomb when the opponent had not had time to breathe. This is the Windows Communication Foundation ). From this name, we can see Microsoft's ambition. Facts also prove that it will unify the distributed communication field in the future under the Windows platform.

Introduction to SOA

The SOA (Service Oriented Architecture) Service-Oriented Architecture cannot be left alone when talking about WCF. W3C defines SOA as "a service provider completes a set of work and delivers the final results required for service users. The final result usually changes the user's status, but may also change the provider's status, or both parties have changed ". Although this sentence is such a detour, it can be seen from here that its core is service.

As mentioned at the beginning of this article, SOA is never changed overnight. In the book "learning from the principles to practices of WCF", we will talk about "the path to SOA is a gradual accumulation of silicon steps ". It evolved only when enterprise needs were deepened to a certain stage. Before that, people have been talking about (OOP) Object-oriented. During this period, the enterprise needs departments to departments, departments to individuals. System requirements are constrained by changes in business needs, so class encapsulation is the core.

When the complexity of the system is further deepened, it extends to the component-Oriented Programming of the component (Component Oriented Programming). It only exposes its interface to the outside, but has its own physical unit. However, this still does not completely solve the problems of message transmission, security, and cross-platform. The final task of solving this problem is back to the Service-Oriented Architecture (SOA) supported by web service and WCF. It connects different functional units (called services) of an application through contracts and interfaces. An interface is defined in a neutral way. It is independent of the hardware platform, operating system, and programming language that implements the service. This allows services built in various such systems to interact in a unified and universal manner.

This architecture achieves loose coupling between services, and it is more capable of responding to changes in various services across the system. It can also flexibly adapt to changes in the external environment and business needs. The interface described through WSDL makes the presentation of this flexibility uncertain. Shows the position of a service-oriented architecture in a layered system.

We can see that a service layer is added to the traditional business logic layer. Different from the traditional architecture, the service layer makes the business logic layer no longer directly exposed to the client, but accessed through the service intermediary. In this way, when the business logic changes, as long as the service is stable, the system becomes relatively stable, and the customer layer is service-oriented rather than service-oriented, therefore, no major changes are required. Even if the customer uses different technologies, such as Java or others. As long as the interfaces provided by the Service are the same, you do not need to worry about access failure. In addition, each service is an autonomous unit in the system (a region is divided by dotted lines). Therefore, the entire service can be moved and replaced, this enhances the system's ability to respond to changes.

WCF and SOA

For SOA, the relationship between WCF and SOA is like that between automobile and engine. The most direct factor that determines a good car is the engine (which is also the main reason why the car cannot be turned over ). Of course, through the optimization design, ordinary engines can play the maximum effect on a vehicle (the framework design is also an important factor that determines the system energy ). However, to make a qualitative change, we still need to solve the heart problem. Although many solutions have already appeared in the industry before, such as Microsoft, IBM, Bea, Sun Microsystems, Oracle, tibco, HP, Canon, Commerce One, and Fujitsu, software AG, Nortel, Verisign, and webmethods (this also shows the market value of SOA ). However, WCF is a collection of all standards and functions. The architecture for developing SOA using WCF does not require developers to think too much about difficult things such as networks, platforms, and security. Instead, it is easy to use a configuration file to do everything. Most importantly, with the help of the WCF contract and interface, the configuration file fully implements a loosely coupled architecture and is more suitable for the actual needs of the SOA system. In the subsequent sections, we will explain in detail the application of this architecture.

WCF brings us a new design experience for the service-oriented architecture. It integrates all of Microsoft's previous technologies. It can be considered that Microsoft's SOA strategy has entered an important stage. It also provides users with a simple, excellent, and complete development platform.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.