[Chatter]: Using WebService for software layering

Source: Internet
Author: User

 

Chat with friends and learn that their company uses WebService to layer the software architecture.
This is true in the software architecture, but there is a slight deviation in execution.

 

1. on the server side that provides information, the WebService function directly fetches the database for return.
The function in WebService only establishes online data and obtains data. In this way, it only writes stored procedures in the program code.
In essence, it is still the database-oriented system of "fishing data + typographical display". It is just to change the "fishing data" section from SQL to WebService.
When using WebService, it should be the service that the software system provides to other systems 』.
The definition of the software system here refers to the system with its own domain know how, and then open the function to other systems to operate and read.

 

2. The client that obtains the information directly calls WebService where the data is to be retrieved.
The system is filled with a bunch of new xxxwebservice (). The whole system is closely tied to WebService.
When you want to switch the information provider, you can only perform the switch from the remote WebService.
The software system should cut the connection with the external system and separate it into a level similar to Dal.
The software system depends on its own Dal interface, and then injects the WebService object for implementing the Dal interface.

 

3. The server that provides information directly uses the WSDL generated by the Visual Studio project.
Because Visual Studio can automatically generate the WSDL, each modification function creates a new WSDL.
When another person is also developed according to the WSDL, it is easy to cause a difference in the WSDL when there is a change.
The WSDL should be independent from the project. Multiple groups of developers can write functions based on the same WSDL.

 

4 ......

 

This article emphasizes that it is right to use WebService to layer the software architecture.
In this article, we will discuss some deviations in execution.

 

Finally,
In this article, ". NET application architecture: designing applications and services.
The WebService should be located at the UI Layer and Dal layer, and the application logic layer in the middle should not contain WebService.
Basically, we should regard WebService as an "interface + proxy", rather than simply an "interface" for cutting dependencies 』.

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.