Today, learn from learning
MSDN 2003
Help documentation The drill program provided - Create a distributed application, has a preliminary understanding of the program structure, design ideas, and distributed applications about distributed applications.
Through the study of this exercise article, I mainly have some progress and experience in the following aspects:
Ø Distributed application structure level
Ø Plan for distributed applications
Ø Create a web service method
Ø Method using Web Service in Web Application
Ø Method using Web Service in Windows Application
1. Structural level of distributed applications
The main principle of distributed applications is to divide the application logic into three levels:
2 indicate layer (user interface layer)
2 Business logic layer
2 Data Access and storage
Represents service:
Represents the layer of fat client interface or thin client interface to the application. The fat client provides a complete programming interface for the operating system by using the Microsoft Win32 API or indirectly via the Windows form, and uses the components widely. The thin client (web browser) is quickly becoming a number of developers prioritized interfaces. Developers can generate business logic that can be performed on any one of three application layers. With ASP.NET Web applications and XML Web Services, thin clients can deliver rich, flexible and interactive user interfaces with visual forms. The thin client also has the advantage of providing greater portability between the platform.
Business logic layer service
This layer is divided into application servers and services that can be used to support clients. You can use the .NET Framework to write a web application to take advantage of COM services, Message Queuing (MSMQ), Directory Services, and Security Services. The application service is in turn to interact with several data services on the data access layer.
Data Access and Storage Layer Service
Support data access and storage data services include the following:
l ADO.NET provides simplified programming access to data by using a scripting language or programming language.
l OLE DB, a recognized general data provider developed by Microsoft.
l XML, used to specify the mark standard for the data structure
system service
The elements in each of the model are fully supported by the .NET Framework and Windows operating systems. Some of many of its services are: directory, security, management, and communication services across 3 layers. The programming tools that make up the Visual Studio .NET development system enable developers to generate application components across multiple layers.
The three-level structure is characterized by this drill process, and the structure of this structure is clearly reflected in the hierarchy of distributed applications.
Everyone can clearly see the three hierarchies of distributed applications: user interface, intermediate business object processing and data layer
2. Distributed application planning
In the process of planning a distributed application, applications designers and developers will conduct a large number of design decisions and technological options. Sometimes the application specifies decisions, and there is more choices in another time. Ironically, the problem will occur when there is a lot of choice. In these cases, the problem that the application designer and the developer must answer "which option is feasible?", But "which choice is most feasible?". The subject of this section focuses on making savvy decisions in planning distributed applications.
The steps to plan the application include:
Choose development and programming languages
l modeling application and data modeling
l Design World General Application
l Design accessible application
Among them, the design of the world's general-purpose application is to provide links to the topics with guidance on planning and development of general applications. Design accessible applications refer to links to the topic of the development application, and the developed applications can be used by the most widely used users. 3. Create a web service
This article mainly describes how to create ASP.NET Web Services under Visual Studio.net 2003, use language to C #
1) Open Visual Studio.Net 2003, to display the establishment project dialog box by new project or menu through the start page
2) Select the development language to Visual C #, so select the project type as "Visual C # item", and select "ASP.NET Web Service" in the template column on the right side of the dialog.
3) Enter the web server name and your project name in the location box.
4) At this time, the system will automatically generate a service1.asmx file, you can change its Name property to accommodate specific applications.
5) Add the method to XML Web Service
in
// [WebMethod]
// public string helloworld ()
// {
// Return "Hello World";
//}
Note below
[WebMethod]
Public Returntype MethodName (paramters)
{
} To add methods
6) By debugging to generate output project files
7) At this time, a very simple web service is successfully established. The following works is to use public methods in this service by adding references in ASP.NET Application and Windows Applications.
4. How to use Web Service in Web Application
1) Create a new "ASP.NET application"
2) In this application's solution view, right-click this project file, add the Web Service created on the Add "Web Reference"
3) You can check that the local machine is currently running Web Service by adding a Web Reference dialog box. Select the web service to be established above Add to Web Reference Folder
4) Then you can find more than the Web Service namespace and a local localhost.webservice namespace with the object browser.
5) You can access the Wen Service public method by instantiation Web Service.
6) You can then pass the information to the XML Web Service via the XML Web Service, then passed the data to the data server via the Web Service.
5. How to use Web Service in Windows Application
Methods and roughly in Web Application, no more
Through today's learning, I feel that I have a preliminary understanding of distributed applications, I will learn more about every knowledge point.