Thinking in AJAX (2) - Based on the WEB design AJAX

Related Tags:

  1, AJAX is most commendable asynchronous interaction, rather than a refresh 

  Many people are not optimistic about AJAX technology refresh, and even agree to do AJAX is not the refresh.    This perception is wrong and what is not refresh?    Refresh page is not without overloading, then what is asynchronous interaction?    Asynchronous interaction is a simple multi-thread, when you see articles in a blog at the same time can be carried out without use of AJAX to refresh the answerer seems, has not updated, but here the most important thing is asynchronous, that is, you can see the side of the article, submitted to the server side you can restore the information, make good use of this asynchronous, can be grasped the essence of AJAX.    Many occasions, no refresh is the user is presented with the visual experience, and it is unknown asynchronous interaction in the work of Taiwan, which led to a wrong interpretation of the majority of the weight of AJAX points. 

  Second, on the recommendation of the WEB lightweight AJAX Application 



  The famous picture storage site Flickr is choreographed to wonderful use of AJAX.    The reason why I say that is because I think Flickr well aware of the pros and cons of AJAX, and firmly grasp their own web site features, and failed to AJAX and AJAX, but drive-in technology-oriented, AJAX into website , the web site offers better features.    If Flickr, whether in multi-or single-page list map detailed map pages, change the title picture and description of the application of AJAX technology, which allows users without Jump to separate the editorial page, click Save edited, also use the asynchronous interactive approach to data submitted at this time, the page displays a Loading character, the other parts are not subject to any influence, it is too intimate services. 

  Again based on the Tag professional Technorati Blog search service providers also use the AJAX, in the search for a Tag, leading some pages will be instantly displayed in the database Technorati for all of the data entries in the column on the left side will show two - Loading icon, in a moment, the two Loading will Display specific content, this shows the Tag-related pictures and bookmarks Flickr site (Furl & del.icio.us) links, as these are part of the contents of from the other sites, if the server to obtain data in uniform and show the pages, will be the impact of slower network speeds through asynchronous interactive AJAX immediately indicating that the local data first, and then to the client and Flickr, Furl, del.icio.us deal obtain their data, which saves bandwidth without affecting the flow of user access speed, is smart. 

  Through the successful application of these two foreign AJAX web site, we found that they are using a lightweight AJAX, this is the one simple interactive, data-less operation.    This also accords with the intention of AJAX, although like www.backbase.com bindows in the RIA and on the performance of astonishing ability, but slow, poor search engine support, development is difficult or impossible to illnesses such as user satisfaction, please remember Accommodation: AJAX ultimate goal is to improve the user experience, in order to facilitate user interaction, and not due to technical and technology. 

  Third, the MVC architecture design AJAX 

  Many people think that in the framework of the application of mature AJAX framework would undermine the integrity of the more common is a three-tier structure of the damage in the MVC WEB application model, in fact otherwise.    MVC theory I do not say more, the classic three-and five-we are familiar with in the WEB application, because the browser / server inherent to such a request / response model off-network communications, a decision in the Model-View can not take the initiative to achieve a data update of the incident, it is generally common framework of the mature MVC MVC classical theory will be some modifications: from Model-processing business after notice Control layer, and then layer by the commitment to the View Control Send obligation to update data.    But AJAX born with monitoring function, AJAX Asynchronous OnReadyStateChange response to the incident that is in the client program will monitor events in function.    Now want to use AJAX realization of the MVC model are as follows Figure this: 

  Idealized design as follows: 

  •   The corresponding three-tier document Target: view.jsp (view), action.do (Controller), model.java (model) 
  •   View.jsp is that the user interface, and through built-in asynchronous mode AJAX object to the request sent action.do, started listening AJAX.OnReadyStateChange 
  •   Action.do view.jsp received the request from the (GET or POST method), through the Request sent to the judge after the corresponding business / data model model.java 
  •   Model.java started business operations, and finished view.jsp pages sent directly to the data update notification, the notice may be news of the XML data package, may also be a text, or even a section of the html code, of course, Since using MVC, do not recommend a Model send HTML, XML or a recommendation package business data can be. 
  •   View.jsp page AJAX object OnReadyStateChange receive notifications of updates to the data, according to the actual situation with a DOM show pages updated. 
  Through the above steps coherent, based on a typical three-tier MVC interaction is complete.    Of course, familiar with the MVC framework WEB users, such as familiar with the Struts Java developers may not accustomed to the Model-View sent directly to the data update notification, it can be changed to Let, Model layer business will be disposed of first notice sent to the update Control, Control to notify View also. 


Related articles:

Thunderbird air show examples of animation
  Step 1    Please students painted a Thunderbird aircraft, and then turn it into Graphic and then Layer1 named "Thunderbird"    Done for a period of 60 grid Frame length animation, animation content in the window, select Frame Motion, Option will Orient to path...
Li marked with the CSS style control
  List-style-type version: CSS1/CSS2 compatible ***: IE4 + + inherited NS4 ***:    Syntax:    List-style-type: disc | circle | square | decimal | lower-roman | upper-roman | lower-alpha | upper-alpha | none | armenian | cjk-ideographic | georgian | lower-greek | hebrew | ...
Acquaint AJAX
  Previously read relevant things today understand what I did not expect people who have been lazy today and the rookie-level encounter problems, in the hope that the downloaded code simple, no database, they can click to open, the results failed to do so, AJAX need to put the code is running ...
Establishment of the basic knowledge: DNS on incomplete summary
  A few years ago first contact with the Active Directory, it is the leaders of the Active Directory deployment time.    Although the hand and several books, but the time constraint does not have enough time for careful study.    Edge to Edge run dcpromo watch on the activit...
Ajax and REST, Part 2
  Ajax was the prevalence of explosive growth.    Web is the old framework to support themselves Ajax innovation, the new pure Ajax framework under development, many organizations are considering Ajax, or have already begun the process of building Ajax applications work.   ...