Creating a Distributed Application learning experience

Source: Internet
Author: User
Program | create | distributed | Experience today, you can learn about the architecture, design ideas and characteristics of distributed applications for distributed applications by learning the walkthrough program provided by the MSDN 2003 Help document-Creating distributed applications.
Through the study of this exercise article, I mainly in the following areas have made some progress and experience:

Ø Distributed Application Architecture level

Ø Planning for distributed applications

Ø ways to create Web service

Ø the method of using Web service in Web application

Ø ways to use Web service in Windows application



1. Structure hierarchy of distributed applications

The primary principle of distributed applications is to divide application logic into three tiers:

² presentation Layer (user interface layer)

² Business Logic Layer

² data Access and Storage tiers



Represents a service:

The presentation layer includes a rich client interface to the application or a thin client interface. Fat clients provide a complete programming interface for the functionality of the operating system and use components extensively by using the Microsoft Win32 API directly or indirectly through Windows forms. Thin clients (Web browsers) are rapidly becoming the interfaces that many developers prefer. Developers can generate business logic that can be executed on any of the three application tiers. With ASP.net Web applications and XML Web services, thin clients can provide a rich, flexible, and interactive user interface for Applications in visual form. Thin clients also have the advantage of providing a greater degree of portability between platforms.

Business Logic Layer Services

This layer is divided into application servers and services that can be used to support clients. You can use the. NET Framework to write WEB applications to take advantage of COM + services, Message Queuing (MSMQ), directory services, and security services. Application services can, in turn, interact with several data services on the data access layer.

Data access and storage layer services

Data services that support data access and storage include the following:

L Ado.net provides simplified programmatic access to data by using a scripting language or a programming language.

L OLE DB, a universally recognized, generic data provider developed by Microsoft.

L XML, marking criteria for specifying the data structure

System Services

The elements in each part of the model are fully supported by the. NET Framework and the Windows operating system. Some of the many services it has are directory, security, management, and communication services across 3 tiers. The programming tools that make up the Visual Studio. NET development system enable developers to build application components that span multiple tiers.



The features of these three hierarchies are well represented in this walkthrough, and the hierarchy diagram below clearly reflects the hierarchical structure of distributed applications






You can see clearly in this diagram the three hierarchies of distributed applications: User interface, intermediate business object processing, and data tier



2. Planning for distributed applications

In the process of planning distributed applications, application architects and developers will make a great deal of design decisions and technology choices. Sometimes the application prescribes decisions, and at other times there are more options. Ironically, a problem arises when there is a lot of choice. In these cases, the question that the Application Designer and developer must answer is not "which option is feasible?" "But what is the most feasible option?" ”。 The topics in this section focus on making smart decisions when planning distributed applications.

The steps for planning your application include:

Choosing a development and programming language

• Modeling applications and data

• Design world-ready applications

• Design accessible Applications

The world-ready application is a link to topics that have guidance on planning and developing common applications. Designing accessible applications refers to links to topics focused on developing applications that can be used by the widest range of users.



3. Ways to create Web Service

This article describes how to create the ASP.net Web Services under Visual Studio.NET 2003, using the language for C #

1 Open Visual Studio.NET 2003 to display the Create Project dialog box by starting a new project or menu-new-project for the start page

2 Select the development language as Visual C #, so select the project type as Visual C # project and select ASP.net Web service in the template column to the right of the dialog box

3 Enter the Web server name and your project name in the position box

4 at this time the system will automatically generate a Service1.asmx file, you can change its Name property to suit the requirements of specific applications

5 Add the method to the XML Web Service

In

[WebMethod]

public string HelloWorld ()

// {

Return to "Hello World";

// }

Note the following by adding

[WebMethod]

Public ReturnType methodname (paramters)

{

To add a method

6 Generate output project files through debugging

7 at this point, a very simple Web service was successfully established, and the next thing to do is to use the public methods in this service by adding references in asp.net application and Windows application



4. Ways to use Web service in Web application

1 Create a new "asp.net application"

2 in this solution view of the application, right-click the project file and add the Web Service created above by adding a Web reference

3 by adding a Web Reference dialog box, you can check that the local machine is currently running the Web service and select the Web service created above to add to the Web Reference folder

4 The above Web service namespace and a local Localhost.webservice namespace can then be found through the Object Browser

5 The public method of Wen service can be accessed by instantiating the Web service

6 then you can pass the information to the XML Web service via the credentials attribute of the XML Web service, and then pass the data to the data server through the Web service

5. Ways to use Web service in Windows application

method is roughly the same as in the Web application, no longer repeating

Through today's study, the feeling of the distributed application has a preliminary understanding, I will work harder to learn every knowledge point of





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.