- oriented. NET Developer's AJAX technology platform strategy

Source: Internet
Author: User
Tags net serialization version client
Ajax| Strategy | Technology platform
Here I will try to examine the present. NET platform under the AJAX framework, I also try to summarize a method that allows you to be based on many. NET platform, find the right one for you in the AJAX Framework and toolkit, and also hope that you will be rational and purposeful in examining, researching and using these popular ajax-net frameworks.

I think the article's approach will help the. NET users who are currently using AJAX to improve your experience of using AJAX under the. NET Platform. Why, because the research director of one of my clients (who should be some customers) said to me recently that we are very interested in Atlas and want to learn more about it and how to start looking at Atlas because next month we will have an expert from Atlas to talk to us. Because I know this executive has a business application with an AJAX architecture in hand, and is currently considering migrating from. NET v1.1 to. NET V2.0,atlas to what extent can he or his team be helped? I'm not saying too much, because I'm a little surprised at the fact that the current architecture application of Atlas may not be a sensible choice, but it's a concern based on my current understanding of Atlas.

The frameworks and tools that I enumerate and discuss include Atlas (Ajax-net CTP), Anthem.net, Magicajax.net, Ajax.NET Professional and Wwhoverpanel control, This is basically my concern. NET platform for some of the Ajax frameworks and implementations. The other reason is that they are basically open source, which is very important, because without the source code, we will not know what happened. In addition, I have no intention of making this a comparative report like Daniel Zeiss.

First of all, to be straight to my point of view.

For open source or existing ajax-net technology or framework selection must be based on your current application of the architecture to select and consider, if your current architecture is "like Ajax", then you choose Now all the popular ajax-net technology must be very careful And if your current application is to use a traditional ASP.net application architecture (or to start creating new applications with ASP.net v2.0), then the current popular ajax-net framework and technology are universally appropriate, and the key is to choose a suitable framework or implementation at the right time.

In my eyes, the current popular ajax-net frameworks or implementations are add-in (Plug-in) patterns, meaning that these frameworks are used for all the latter, the traditional ASP.net application architecture (or to start creating new applications with ASP.net v2.0) It is awared, which is very advantageous and convenient. But for an "Ajax-like" architecture, the situation is different, and you need to measure it from a different perspective, with selective use.

So what is an "Ajax-like" architecture, which means that your application was created before the AJAX concept was presented. From client-server interaction analysis, your client has a large number of JavaScript code that accepts XML data, serializes objects, and then uses JavaScript to present these objects and data in conjunction with other HTML techniques, You may also have a stack of HTC or other JavaScript HTML presentation layer controls. Your server side is a façade (or adapter,observer) mode (HANDLER) controller that receives client JavaScript XML request data, parses the XML, and then invokes a corresponding service or business component. The results are then returned as XML to client JavaScript, which is processed and displayed after the client's JavaScript is received, because the HTML DOM and CSS can be used, and all the pages are animated.

This way the client is the Script-centric architecture or data-centric interactions described in <ajax in action>. And it's the same way that the Ajax list of Jesse James Garrett is the most similar, except that you or I didn't know it was Ajax, but now people misunderstand that Ajax,ajax has become a technology, a feature, and, above all, a kind of architecture for Web apps.

And the current popular ajax-net framework basically does not realize bidirectional serialization, because realizes a textbox the automatic completion client only uses receives the data the line, does not have to send back the data/object to the server side, also does an Ajax state progress bar also does not need, but these are Ajax, The standard we measure is asynchronous and the page is not refreshed.

I'm sorry I used that word to explain my point. Finally, if your application is already an AJAX architecture, you need to carefully choose to use the current ajax-net framework to ensure that it also provides bidirectional serialization capabilities that are compatible with your original application and architecture. If your application is not an AJAX architecture, then you can choose the Ajax-net framework based on some criteria.

And then we go back to the beginning of the article to see some popular ajax-net frames

1. magicajax.net

This is the current framework of the smallest version number of a ajax-net implementation, many people like it, and even hit, but really read the code after it, I am a little worried.

Magicajax.net is based on the strategy that __doPostBack will refer to the entire ASP.net page, which will cause the page to refresh, so Magicajax.net uses Ajaxcbo.dopostcallback to make a partial submission, The content in each ajaxpanel corresponds to the immediate HTML content of the client, because in Magicajax.net, the client can use only the HTML returned by the ResponseText server-side rendered (very passive).

Since Dopostcallback will submit viewstate and Ajaxpanelx$rbs_store, almost using XMLHttpRequest to simulate a normal commit, the server can create instances of the page based on ViewState Restore all control state, same ajaxpanel and Ajaxcontrol, and then receive _eventtarget from the client, _eventargument Go to the normal asp.net control process, such as control rendered, the final HTML output is passed back to the client, and then the client's eval display.

The whole process is very ingenious, which is almost asp.net __dopostback's "Hook asp.net" version and the enhanced version. And Httpmodel is mainly to solve the session and cross submission, the client JavaScript collation and injection, of course, is also here to receive the client's request, in the Application_EndRequest return results. The rest of the code is to process the design-time support of controls in vs Web designs. Ajaxcallobject.js and Webparts.js are uploaded to the client every time.

Magicajax.net some of the deficiencies and ideas:

1, __doPostBack of the enhanced version, suitable for ASP.net advanced users to use

2, because and ASP.net's page processing mechanism relies very closely, the control's default action changes may not work, such as a third party's custom control;

3, rely on ViewState, if it is encrypted viewstate, it may not work properly, I did not try, in the code seems not to see __viewstateencrypted

4, is to asp.net all the page to submit the optimization, realize the limited Ajax function, the scalability is not very

If it is based on the control and development provided by ASP.net, then magicajax.net is very effective and solves the problem of session and cross page state well. And the client's operation and work can be ignored, magicajax.net design close to the latest ASP.net version, currently does not provide calls to the client directly call the page method. As it develops, however, the advantages may be decreasing because the latest version of Atlas provides similar UpdatePanel controls.

[1] [2] [3] Next page



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.