Ajax benefits of ASP. NET 2.0 ~ Atlas framework

Source: Internet
Author: User
Tags object serialization website server web hosting
Document directory
  • Preface
  • Ajax non-synchronous technology
  • Ajax example
  • Understand Ajax applications and ASP. NET Atlas framework
  • Overview of ASP. NET Atlas framework
Msdn Program Development Forum: Ajax benefits of ASP. NET 2.0 ~ Atlas framework

Author: Ji jiangyu

  • [ASP. NET Website Design and C #] creator
  • DOTNET opened the blog temple priest
Preface

Routine
Sort routine sort

Since 2002. net version 2002, the micro-blog website Technology officially changed from ASP to the new ASP. net milestone, Asp. net has become the mainstream in just a few years, focusing on the development of media and online programming, deep understanding of everyone's love and attention, at the same time also created a global share. net flood, at this time you see this article, the next generation of VS 2005 and ASP. NET 2.0 has been officially released (US 11/7), due to the previous generation of ASP. NET 1.0 technology success, it is natural that everyone has long cited ASP. NET 2.0 optimized full-featured performance metrics coming soon, but if you only know ASP. NET 2.0, VS 2005 products or technology trends, you are currently in ASP. NET technology is dangerous, because there is a huge advantage behind your back, an accidental Puncture of your technical armor, is there such a problem? I don't want to renew it! Because it is an ASP. net beginners only need to be skillful in using this advantage, in some asp. net website design allows you to design your website program with profound skills. However, you do not know where your website is, so what is the name of this free trial? It is called "Atlas" and is an Ajax framework. mastering this advantage is like mastering the Qingming hacker in the movie "Tiger and Tiger, the most popular online developer (equivalent to the design of the website) in our workshop. The following describes what Ajax is used for you, what is Atlas framework.

Ajax non-synchronous technology

Ajax is formed by the beginning of the English text "Asynchronous JavaScript and XML" and is a non-synchronous technique, on the surface, it seems that there are three things: "non-synchronous", "JavaScript", and "XML". It seems nothing amazing !? People have been familiar with JavaScript more or less. Some people are familiar with JavaScript, and XML is also familiar, it seems that synchronization is not important. A few months ago, when I first saw the word "ajax", I thought this was the case ~ Are you going to have a new bottle of wine or a cold bread? So I caught a glance at an article outside China and took it over in a hurry, however, three days later, the word "ajax" was put forward by a bunch of experts in the msdn blog of the US micro-engine, and I felt that I was not right, I don't even know the technical skills that I don't know (if Ajax is very important and powerful), So I went deep into study's Ajax principles and techniques. Oh ~ My God! It's really about power.

We all know that JavaScript is the old king of the client. net is the master of the new generation of servers. In most cases, the two are irrelevant because they are doing different jobs, ajax does not seem to have any technical skills on the surface of "Asynchronous JavaScript and XML, the key point is that AJAX can skillfully concatenate the client and the server together. Once the client can invoke the server application, you will see that the configured network strength will not affect the source, but this uses the traditional ASP or ASP. net seems to be "impossible", because the Web is not fully accessible, so the browser and web server do not have any dynamic connections, there will only be some response requests and response lines, and the memory management space and pattern of the two are basically two worlds, so JavaScript should and. net Code cannot be merged without authorization. It is too likely, but thanks to the power of the Ajax non-synchronous mode, JavaScript can freely call C # and VB. net or web service capabilities, and then can be returned. net-type other objects such as dataset are processed by JavaScript. In addition, Ajax non-synchronization technology only needs to handle a small amount of data back to the server, unlike the PostBack mode, which must be used to handle the entire problem on the server, the PostBack mode can be used to say bye to the PostBack mode, it's a coincidence that we can't think about it! (But it does not mean that callback PostBack is required. Instead, callback requires ajax to be used for better response ).

OK! How can I use Ajax? First, I want to clarify that AJAX is just a "concept ", it means that all things made through the "Asynchronous JavaScript and XML" technologies can be called Ajax instead of a specific component or product, as far as I know, there are several ways to implement Ajax:

  • Self-built Ajax by hand: It is too difficult and time-consuming for most people, and Ajax knowledge is also very lacking at the same time.
  • Callback: Only ASP. NET 2.0 is supported, and the functions are incomplete.
  • Use the existing Ajax Library: However, the library is actually just a library, which is a little bit better than the framework. However, it can be obtained without authorization, and ASP is used at the same time. NET 1.0 and 2.0.
  • Micro-engine Atlas framework: the focus is on framework deployment. The preliminary plan and design scope are complete. At the same time, both client and server are involved and considered, sorry, only ASP is supported. NET 2.0.
Ajax example

To make everyone understand what Ajax is, the following is a manual example of AJAX (meaning that no library or Ajax framework is referenced ), this example is easy to understand, and its role is to control the web server's data source or performance changes immediately through the client browser, as long as you have done this again, you can understand how powerful Ajax is in Web development.

Step 1: create a web hosting case
First in. NET 2003 (or VS 2005) is used to create a web attack case. The website name is "simpleajax", or you do not have a vs development tool. You can also use the development script directly.

Step 2: Create a client interface
Add a client-side interface "client.htm" to the Web Hosting case and set this interface as the start region, this interface will send a non-synchronous call request to the Web server and update the server's response information to the webpage element. The program is as follows:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


Route 1 client.htm plane

Step 3: Create a server processing program
In addition, add a receive. aspx webpage (including. CS) to the example. The program details are as follows:

Using system; using system. collections; using system. componentmodel; using system. data; using system. drawing; using system. web; using system. web. sessionstate; using system. web. ui; using system. web. UI. webcontrols; using system. web. UI. htmlcontrols; using system. diagnostics; namespace simpleajax {////// Abstract description of receive. ///Public class receive: system. web. UI. page {private void page_load (Object sender, system. eventargs e) {performancecounter mymemory = new performancecounter (); mymemory. categoryname = "Memory"; mymemory. countername = "available Kbytes"; string txtresult = "--> available server memory size:" + mymemory. nextvalue (). tostring () + "kb"; response. write (datetime. now. tolongtimestring () + txtresult );}}}


Receive 2 receive. aspx plane

The result of the rows:
It takes about five seconds to initialize the performancecounter object after the row is completed. Then, through Ajax, the server can be used to record changes per second, of course, some people may think of using the server side timer, but that method will cause the server's loading to surge. If there are many people, your server may also be broken down, however, Ajax has excellent flexibility and flexibility. Through Ajax, You can instantly change data or events, that is, the current website is deployed. For example, I have ten Web servers (only port 80 ), in Ajax mode, you can control the CPU, memory, or network traffic of ten servers on a single website. Is it very attractive.


Listen 3 servers record changes per second

Program description:
This application has the following features:

  1. How can JavaScript be called. for methods or web services on the Net Server, it seems "impossible" to read the methods or web services by using the traditional website program because JavaScript on the client side cannot be directly directed to the server side.. Net CLR.
  2. In the past, some people wanted to implement server timer to achieve the same effect, however, the people who have done this should feel that the server-side approach is too heavy and consumes the system resources. If multiple users are provided at the same time, the server authentication may be heavier.
  3. The Ajax program can call the server application or web service without any trace, and handle the response to quickly update the website information, it almost forgets that the client and server are separated.
  4. There will be a preliminary solution to the XMLHTTP operation later.

In order to allow everyone to understand Ajax and Atlas framework policies and policies, we will introduce the following two articles:

  1. Understand Ajax applications and ASP. NET Atlas framework
    This article introduced ASP. the development and limitation of the Net website program, introduce the Ajax technology overview and its endpoints, micro-engine has proposed a new Atlas framework for Ajax technology to develop Ajax programming programs, the final statement describes the architecture and functions of the Atlas framework.
  2. Overview of ASP. NET Atlas framework
    This article exposes the functional design and overall architecture of the Atlas framework, explaining the functional architecture of the Atlas framework client and server, it is a clever strategy for Atlas to concurrently integrate client and server functions at the same time, the reason is that the client-side JavaScript call or processing will definitely limit the development of Ajax applications. NET 2.0 all server clients, and program developers must maintain consistency with client front-end calls or handle complex workloads, this approach will be greatly compromised. Fortunately, the Atlas framework has taken the correct path since the beginning, and developed Ajax applications or functions through the Atlas control framework, you can use a program to complete the functions that you previously needed or that you could not start with (such as the automatic completion of the website ).
Understand Ajax applications and ASP. NET Atlas framework

I. Introduction

Ajax describes the development of a cross-platform, client-centric web application, in Ajax, programmers use client scripts to perform calls to the servo application, and the call uses XML-based response, micro-messaging "Atlas" is an Ajax development method used to apply and compile ASP. net Suite, this topic describes the relationship between the development of web applications to be solved by Ajax, the basic concepts of Web Ajax, and the introduction of ASP. net Atlas represents a major revolution and growth in Ajax development.

Development issues related to Ajax

Both the user and the developer can experience the limitation caused by the request-response mode of the application program on the website, because the website cannot be accessed, therefore, when the website information or user interface needs to change, the entire website must be post back to the server for updates, that is to say, the client and server must be connected between the client and the server. In particular, if there is a large amount of data between the client and the server, this will make the user feel very long waiting.

Another issue is that the HTML control in the Web browser is limited to the rich UI of desktop applications, many of the browser drivers include the HTML Control Handler of the add-on. However, the HTML Control Handler of the add-on tool is intended for a specific browser, therefore, if you want to obtain these rich UIs that are HTML-controlled, web application developers must create applications for specific plug-ins, this will be very difficult, so many developers will avoid creating features with specific client features in their networks, therefore, the user finds that the attractiveness of Web applications is much smaller than that of other types of applications. The Ajax development method provides solutions for the preceding two issues.

Ii. Ajax technical concepts

Ajax is built on a core concept: the use of non-synchronous calls, and the combination of XML to parse data and a large number of use of client scripts.

In Ajax technology, developers can initiate non-synchronous web service calls through XMLHTTP in the client-side scripts mode, XMLHTTP is usually used to block data into XML data types and send data over the network. Most of the metadata types are actually XMLHTTP, instead of creating a proxy object for incoming client calls and data sending and receiving, this type of call is performed through non-synchronous methods, the information and user interface in the website do not need to perform a round-trip between the client and the server, as a result, it has a small amount of data to send and improve the application performance, non-synchronous call can improve the responsiveness of the Web application, because when the call is still running on the server, in the client, the zookeeper performs operations.

On the other hand, Ajax uses a large number of client scripts, especially JavaScript, javascript is used for processing incoming client calls, processing client applications, and creating user interface functions of the incremental client.

The Ajax Solution uses JavaScript and works with other client-side technologies, including:

  • Document Object Model (DOM): Dom displays these elements as standard object groups (such as document and Windows) on the HTML webpage ), and can operate on them in a stylized manner.
  • Dynamic HTML (DHTML): when a user accesses the interface, DHTML extends the HTML interactive response capability through the client script, and makes it easier, and does not need to make a round trip.
  • Behavior (behaviors): This is the action of a stylized packet operator in the user interface (such as dragging the Drag and Drop line ), and can be connected to the online element.
  • Component: a custom JavaScript Object that provides the client-side User Interface feature.

Javascript, coupled with these client technologies, enables developers to build user interface features that match desktop applications, there are two examples for you to take the test:

  • Micro-engine Virtual Earth website: a website that provides computers.
  • Micro-messaging Outlook Web Access: a client-side interface for sending and receiving e-mail through the web browser.

Both demonstrate rich user interfaces and high-performance applications built with Ajax technology.

However, using these techniques to construct Ajax applications is quite straightforward, until now, the program developers must manually establish event processing, interest-sensitive warnings, and the token required to establish the rich user interface. In addition, because Javascript is not an object Definition Language (OOP), it does not have the characteristics of scripting, naming spaces, exception events, and its oop, for these features, developers often have to write their internal infrastructure-based architecture program libraries in other languages.

3. ASP. NET Atlas provides a new path

ASP. net. The answer to the question is: "Atlas", Asp. net Atlas provides all the Ajax capabilities, but it is designed to improve the concept step by step, and greatly reduce the attention of AJAX application development, at the same time, Atlas provides the client and server capabilities, as shown below:

(1) Client Side

Atlas provides a rich set of script libraries and provides the following features:

  • Development of Objects
    The libraries function of the client adds the object-oriented feature of objects to Javascript, such as type systems, resource types, naming spaces, and events, these features give developers a familiar Program Creation Mode, this allows you to develop programs with higher quality, higher scalability, and higher scalability.
  • Compatibility
    Libraries correspondence automatically handles compatibility issues with different zookeeper, eliminating the need to create scripts for specific zookeeper.
  • Line and client components
    Libraries Functions include common rows, including auto-completion, drag and drop, popup, and mouse hovering 」, at the same time, they also added components that could parse the information, so as to compile the business application programs for event creation.
  • Program used to handle remote calls
    Libraries Functions allow users to manage non-synchronous calls that pass through XMLHTTP, so that non-synchronous calls can be performed only when the script program completes.
  • Declarative Program Creation Mode
    Libraries correspondence allows you to use the declarative method when creating an atlas component, just as if you were creating an ASP. NET Server to control the ingress.

(2) on the server side

In terms of the server side, Atlas also includes the feature features of the rich servo components, which are insufficient to fully charge the library function of Atlas in client script libraries, including:

  • Web Server Control worker
    These ASP. the net Atlas server controls the ability of the worker to issue client scripts so that you can use the features of Atlas. If you are already familiar with the development of the servo program, these server control scripts will be very useful for you, or you do not have to manually create the Atlas client scripts.
  • Web Services
    Some Web servers can add very useful servo-side feature features to Atlas applications, such as ASP. NET 2.0 profiles.
Overview of ASP. NET Atlas framework

I. Introduction

Atlas is a new ASP. net web development technology, in ASP.. NET 2.0 Server development platform integrated client script libraries, atlas's Ajax policy for web development is to allow you to call the web application on the server from a client script, atlas can handle important parts of the application on the client without having to update the page layout on the server.

This development strategy allows you to build a new type of Web application, and has many benefits beyond the development of traditional Web applications, ajax-type applications provide excellent performance, cross-vendor failover, and allow you to build richer user interfaces.

ASP. net's Atlas applied this new policy to Web application building. At the same time, it added client-side and server-side development components to greatly increase the Ajax development capability of Atlas.

Ii. Atlas goals

The main goal of Atlas is to provide a wide range of application build zones for developers in the following two areas:

  1. Helps program developers establish Atlas applications.
  2. Integrates the Atlas client script features in ASP. NET on the server to provide a generic development platform.

(1) first goal

The first goal of Atlas is to help you build Ajax applications, because Ajax has a certain degree of flexibility, atlas manages the flexibility of Ajax applications for you. It provides the following features:

  1. APIS provides consistent and object-oriented features for JavaScript program development.
  2. Because of its compatibility, you do not have to write external programs and deployment components for multiple plug-ins, your web application can be merged across the browser.
  3. Provides client-side scripts APIs and components that support rich UI features, saving you from the need to write a large number of program downloads for Ajax applications, for example, Atlas provides commonly used drag and drop lines, and can minimize the number of programs you need when accessing these HTML controls.
  4. Atlas's declarative tracing method is similar to ASP. NET servo-side control's declarative tracing method, so that it can eliminate the possibility of writing a program for zookeeper.

(2) second goal

The second goal of Atlas is to integrate client scripting in ASP.. Net servo end program development, not in the past, the program development is not only in the client side, but also in the server side, at the same time, Atlas provides client-side and server-side tools. In any case, Atlas can help you handle the development of a large number of applications. asp. NET provides the following servo-end features for Atlas applications:

  1. The integration of Web Service and Atlas application programs will be very useful, such as the profiles server.
  2. ASP. the net website server controller will produce the client scripts required by the Atlas application program. Using these controls will make it easier to develop the Atlas application program, because it will reduce the work required to learn about Atlas client script APIs and components.
  3. Integrated development tools such as Visual Studio will provide a region, region, complete description, management, and productivity enhancement feature during the development period.

Iii. Atlas Architecture

The minimum requirements for web applications are as long as the Atlas client script library is used to call the services or applications on the Web server. But to be the best development choice and tool, you may want to use the ALTAS component on the server, while the Atlas architecture is also composed of the client script Library and the ALTAS component on the server, as described below:

(1) Atlas client components

The following figure shows the architecture of the Atlas client script Library:


Component 3 Atlas client-side component architecture component

The Atlas client script library is composed of some JavaScript (. JS), and provides the feature for program development. This is not the development environment of the previous scripting, it provides a new consistency and modulo operation. The Atlas client script library includes:

  1. Compatible compiler: Provides compatibility across the compiler for Atlas scripts.
  2. Atlas core server: contains some JavaScript extensions, such as class, namespace, event processing, hosting, resource type and Object serialization.
  3. Atlas baseline: Contains string builders, debuggers, timers, and tracing components.
  4. Network Connections: allows users to access web services and applications, and manage non-synchronous terminal method calls.
  5. Ui components: provides some capabilities of the Atlas client, including behaviors S, Atlas declaration methods, UI components, and information interfaces.
  6. Atlas control worker nodes: provides specific Atlas control nodes for client development, these control nodes can have data bound, scripted, and links to Atlas, such as drag and drop, such as auto-completion, general type control, listview control with data-bound, and batch control.

(2) Atlas servo end components

The Atlas servo-end components are mainly composed of ASP. NET web services and ASP. NET Server-controlled components. The following figure shows the architecture of the Atlas servo-end components:


Component Architecture of Atlas servo end

It means that all ASP. NET features are fully used by the Atlas application.

Atlas also contains ASP. net servo end components, including Web Services and server control components, which can be combined with client script libraries for operation, atlas can collect some benefits of web services, including:

  1. The profile service can be persistently stored on the server.
  2. The membership server can provide certification options.
  3. The role server can provide a role-based license for the Atlas application.
  4. The personalization service can persistently store user-specific information or website-specific information on the server.
  5. Globalization and culture-specific services can also be called by Atlas.

ASP. net also includes ASP. the net server controls the slave's Atlas server controls slave, but the Atlas server controls slave nodes to be able to issue client scripts, the Atlas server controls the production of the Atlas client script process, which is used by developers who want to activate the software on the servo end, atlas includes complete Server Control metrics such as button, label, option, Textbox, checkbox, hyperlink, validator, and ASP. net server controls are very close to the slave; some Atlas compiler can also generate JavaScript to generate the client, including hoverbehavior control, clickbehavior control, popup control, and autocompletebehavior control. All control groups will be integrated into Visual Studio. Therefore, you can use the design mode. Using it is as if you are using an ASP. NET Server to control partitions.

The Atlas framework security suite has also been used in offline versions. Five hands-on-lab are provided to understand the Oracle version of the Atlas framework, the author is actually using the security software. When the first three labs are completed, still, I still cannot clearly understand what the difference between it and manual or other Ajax libraries is, and I want to say that it is a word that is too powerful in my mind? However, after finishing the fourth lab, the feeling of Atlas is coming. We can clearly understand how to migrate to the Atlas environment, and there is indeed a taste of framework testing, instead of writing a library function, it is just like opening an English text key like a sub-dictionary in the Textbox Control Panel on the web, next, I listed the related English text for selection, or I was asked by a friend who wanted to log on to ASP. NET 1.0 textbox controls the number of opening orders in the console, and then the plane will be... I told them directly from the relevant information records listed on the documents for selection by employees ~ I won't. Two years later, the answer is here ~ Atlas framework, which is too simple to be considered. The core part of the Atlas framework is only two-stroke models... it is enough to beat the skill that I could not have done before to fix the problem ~ Just a few minutes later. I still have a chance to renew my account !).

After reading the functions and architecture of the Atlas framework, do you want to be creative! I understand the instant success of the current generation. I have no patience. I will try again after one and a half years of study on Ajax, so in the next phase, I will introduce the labs for implementing the Atlas framework, and teach you how to directly dance over the advantages of ATLAS. What is Atlas, with sense, you may be more interested in making a deeper discussion of Ajax. See you later.


4.1.5 Automatic completion of Atlas servo

Related Website:

Micro-engine Atlas portal website
Http://atlas.asp.net

ASP. NET 'Atlas 'preview documentation
Http://beta.asp.net/default.aspx? Tabindex = 7 & Tabid = 47
Understanding Ajax applications and ASP. NET "Atlas"
ASP. NET "Atlas" Overview

Related Article

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.