- oriented. NET Program developer AJAX technology Platform strategy

Source: Internet
Author: User
Tags serialization

The method of the article 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 did not say much because in my mind I was a little surprised at present their architecture application Atlas It may not be a sensible choice, and of course this concern is 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-and server-side interaction analysis, your client has a lot of JavaScript code that accepts XML data, serializes objects, and then uses JavaScript to present the objects and data with other HTML techniques, or you might have a bunch of HTC or other The HTML presentation layer control for JavaScript. 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. 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.

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.