Rich Web-Based Application


Hey friends. Welcome back. This is the last blog of this chapter.  We will meet another new chapter. In this blog I'm going talk about Rich web-based  applications.

•Rich Web-based applications 

    •Use advanced GUIs     •Use Delta-Communication    •Provide rich user experience


•Most of the web-based applications nowadays are RiWAs.
•Rich GUIs in RiWAs use Delta-Communication to communicate with the server components
•DC happens behind the GUI
     •Eliminates page refreshes 
•DC can process asynchronously
     •Eliminates page freezing 
•DC works faster
     •Eliminates the work-wait pattern








Delta-communication Technologies

•Simple-Pull-Delta-Communication (SPDC) can be seen as the simplest form of DC
     •Used in AJAX
     •Single XHR request to the server
     •Client-side: Native JS support
     •Server-side: special technology is not needed

Polling is used to simulate data-push
      •Send XHR requests periodically to the server
      •Client-side: Native JS support
      •Server-side: special technology is not needed 
      •Can increase network traffic (less scalable)
      •Blank responses can waste resources

•Server-Sent-Events (SSE)is used (only) for true data-push 
     •Similar to Comet, but no client requests
     •Client-side: HTML5 provides native JS support 
     •Server-side: Need a streaming server. Special technology is not needed, can be implemented with         standard web technologies 
     •Reduce network traffic than polling/Comet (more scalable) •Blank responses and requests are              totally eliminated
WebSocket(WS)is bi-directional
     •Supports both data-pull and true data-push
     •Client-side: HTML5 provides native JS support Server-side: Need a WS server. Complex.                 •Reduce network traffic than polling/Comet/SSE (highly scalable, 10CK is addressed)


Architecture


•The client-side controller contains the eventhandlers for the GUI
•The events are triggered at the GUIs of the Views
•Views are in the client-side, thus the events are triggered at the client-side
•Therefore, placing the controller in the clientside can be seen as an optimal solution

•Some business-logic are not highly data centric, complex, or critical •Forms validations •GUI elements manipulations
•Delta-communication further improves the performance, increases the scalability, and as a result provides higher user experience.


SPDC/AJAX Jquery

1.jQuery.ajax() 
2.jQuery.get() 
3.jQuery.getJSON() 
4.jQuery.getScript() 
5.jQuery.post() 
6..serialize() 
7..load()


SPDC/AJAX JQUERY API


$.ajax( 
{   
        method: "POST",
        url: "targetScript.php", 
        data: { name: "Nalaka", ID: "1234" } 
}) 
.done(function( msg)
 { // Execute when the response is received successfully 
    alert(msg); 
});











Comments

Popular posts from this blog

How to run multiple Transformations from one Job in Pentaho

Distributed Systems

Data Persistence