| WCF (Windows Communication Foundation) is a Service-oriented framework for distributed applications. It unified the current .NET distributed technology and the call mode. Developers can configure it through XML files. It implements all of the WS-* industry standard. During the design process of WCF, developers have always followed the purpose of service-oriented. A service-oriented distribute solution can be constructed by the Architecture of WCF.In this paper, the research of the general issues in software development process has been done, including the duplex communication problem in Http Mode, how the service proxy effect the channel, information carrier and the O / R Mapping, and the transmission of information carrier substance and related issues. We can understand some technical implementation of the mechanism in WCF, analysis the issues, at the same time give some solutions about the issues. These solutions are only some references for developers to help them to improve the software development process in the WCF development efficiency, increase the stability of the software.The HTTP-based WCF duplex communication is only a duplex communication in form. Its essence is still the two simplex communications to complete, that is, two requests and responses. In WCF the second request is sent by the service, and the client gives the response. Compared with the TCP, it is not real duplex communications because it uses two different connections to communications. When we develop software with WCF, the client UI process will remain in a wait state after sending a request. The server calls the services, at the same time sends a new request to callback, and waits for the response, however, the UI process could not give the response. So the client and the server wait for the responses, lead to deadlock. The deadlock occurs is a result of HTTP means of communication. Developers can use Multi-threaded side to solve the problem, or change the communication way. The client or the server needs not the response.The client calls the service side through the service agents in WCF. The service agents should be closed when the service is carried off. In distributed environment,a large number of service agents call the service at the same time will result in service access time-out. This is because the WCF service proxy has limited the maximum number of concurrent, the default number is 10, and developers could change the value too. This requires us to control the right service agent and the close it in time. The existence of too many service agents will seriously affect the throughput of the session channel and the acceptance of the work of follow-up data. Service agent do not effect on message channel, and WCF does not control maximum number of concurrent in message channel.Information carrier and the O/R Mapping are two different parts in the process of WCF software development. Information carrier is used to carry Information between client and service side. O/R Mapping is used to construct mappings between the entity and the database. We use the way of assembly and decomposition to unify the two parts, simplify the business information and reduce the degree of coupling. In the design of complex entities, object-oriented design concept has been used. Information carrier object divided by category and defined by the way of inheritance. Developer could reduce a large number of redundant data, improve software development efficiency, improve software development efficiency, reduce software maintenance costs and improve system stability.WCF use data contract to define custom entity. The developers use label to tell WCF which entity could be used to carry the information. Entities serialize themselves through data contract serialization in a certain way. The entity will be change into XML files. And then WCF change XML documents into binary stream by Encoding. The data will be sent out according to de information in endpoint. After the server received the data, WCF will change binary stream into XML documents, and rebuild the entity through reflection. But the server can only know the basic data structure. In other word, the transmission of data does not support nested. Developers must use label to tell WCF how the structure of entities are.Through the study of these issues and discussion, this paper gives an example of insurance business management system. The reader could understand the issues in a specific example, and how to solve the problems in the insurance business management system. The architecture of the system base on WCF, so at the first, insurance business is abstracted. Insurance is divided into three parts, business services,basic services and internal management services. Business services include all the operations of insurance companies. Internal management services, mainly for internal personnel, organization management, etc. Basic services, is responsible for these two types of services to support the provision of public services. The program structure can be roughly divided into four parts, client,server,DAL and GlobalObject.Clients mainly through the UI interface with the user information exchange, and information through the WCF to eradicate EndPoint described in the information sent to the server.Server-side included contract, services and host 3 parts. Contracts are mainly exposed to the client service interface through which to define the service operation means of communication, service behavior and some other communication of information. Services are implementation of the contract interface and the behavior of specific services. Host remains all the services in a process so that the client calls. DAL is responsible for interaction with the database for data, we use the framework of IbatisNet using O / R Mapping the way to the database to add, delete, modify, query and a series of database operations.GlobalObject include the level of O / R Mapping of the entity and the entity for information carries.The system uses the HTTP-duplex communication mode based on WCF. Service agent is applied using a managed approach to carry out. The GlobalObject also used the design of assembly and disassembly and object-oriented way of combining. Hundreds of kinds of insurance types are classified. Now WCF has been an increasing number of IT enterprises to accept and use the WCF development of distributed applications, this article is only aimed at WCF in the software development process issues a brief analysis and study, and hopes through the study of these issues even further understand the WCF implementation of the mechanism, while for the WCF software development workers provide a reference to the use of WCF to develop more flexible, more stable enterprise-class distributed solutions. |