Tute 11


Client Side Development 2- RIWAs


 Rich Internet application (RIA) which is the Web application which is designed to deliver the same features and functions associated with desktop applications. A rich internet application (RIA) usually runs inside a Web browser and does not require software installation on the client side to work. Rich Internet Applications (RIAs) are very complex Web based systems. RIAs are encompassed with various types of components, integrated in diverse ways, making the RIAs more complex systems. Numerous Technologies and Techniques (TTs), frameworks, libraries, and tools had been introduced over the last decade for the development of these component of RIAs.  However,  these  TTs, frameworks,  libraries,  and  tools  do  not improve  the fundamental concepts  in the  core of the  RIAs and  the complexity  remains due  to  the  lack  of  realization of  the abstract architectural formalism of the RIAs. The term “Rich Internet Application” had been first used by Jeremy Allaire at Macromedia, in 2002; introducing their new technology named “Macromedia Flash MX”, which is a clientside application development platform with dedicated TTs. As per Jeremy, the RIAs are supposed to have “media rich power of the traditional desktop with the deployment and content rich nature of web applications.
Most of the RIAs run their client portions within an area which is special and isolated of the client desktop called a sandbox for security purposes. The sandbox limits visibility and access to the file and operating system on the client to the application server on the other side of the connection. This approach allows the client system to handle local activities, calculations, reformatting, lowering the amount and frequency of client-server traffic, especially when compared to the client-server implementations built around so-called thin clients.
  
  
Key Features of Rich Web based Application are;    o  Adobe Flash, Flex and Adobe Integrated Runtime (AIR)    o  Microsoft Silverlight.
o Curl (an object-oriented language with embedded HTML markup)
o Google Gears.  o  Open Laszlo and WebTop,
o Oracle Web Center
 


Different technologies used to develop the client side components of Rich Web based Application are;  
         Node.js web development frameworks  
         Node.js is an open source server environment 
         Node.js is free 
         Node.js runs on various platforms (Windows, Linux, UNIX, Mac OS X, etc.) 
         Node.js uses JavaScript on the server
  
o Tensor flow
Tensor Flow is an end-to-end open source platform for machine learning. It has a comprehensive, flexible ecosystem of tools, libraries and community resources that lets researchers push the state-of-the-art in ML and developers easily build and deploy ML powered applications. o Symphony web application framework.
Symphony is an open-source PHP web application framework, designed for developers who need a simple and elegant toolkit to create full-featured web applications. Symphony is sponsored by SensioLabs. It was developed by Fabien Potencier in 2005.
 
o ASP.NET web application framework- What Is ASP.NET?
.NET is a developer platform made up of tools, programming languages, and libraries for building many different types of applications.
ASP.NET extends the .NET developer platform with tools and libraries speci cally for building web apps.
 
Key Features of Rich Web based Application are;  
                          Adobe Flash, Flex and Adobe Integrated Runtime (AIR)  
                          Microsoft Silverlight.
                          Curl (an object-oriented language with embedded HTML markup)  
                          Google Gears. o  Open Laszlo and WebTop,



Delta Communication- Rich Communication model of the Rich Web based Application. It is used to communicate with the server-components, to exchange only the needful dataset – for a particular feature executed at the time. Once a page is  loaded to the  browser, all  the communications  with  the  server,  for  all  the  features implemented on that page, can be done using DC, eliminating page refreshes until the  page is refreshed  or redirected to another  page,  explicitly  by  the  user  or  by  an  internal component.
Rich Internet Applications (RIAs) have become popular with their increased user experience delivered through rich GUIs and faster responses. The key concept behind the fast responses is the Delta-Communication (DC), which enables the communication of necessary data between the client and the server components, in either synchronous or asynchronous modes, supporting both data-pull and push modes There are various Technologies and Techniques (TTs) available for developing the DC in RIAs. These TTs have been already discussed in different forums, and also many tutorials are available to demonstrate the development of them.
However, proper comparisons of these TTs are not available towards supporting decision making in selecting these TTs for the RIA development.
  
De nition - What does Synchronous Transmission mean?
Synchronous transmission is a data transfer method which is characterized by a continuous stream of data in the form of signals which are accompanied by regular timing signals which are generated by some external clocking mechanism meant to ensure that both the sender and receiver are synchronized with each other.
Data are sent as frames or packets in xed intervals.
Synchronous transmission is transmission of signals in a xed interval based on a prede ned clocking signal and is meant for constant and reliable transmission of time-sensitive data such as VoIP and audio/video streaming.

This method of transmission is used when large amounts of data need to be transferred quickly since data is transferred in large blocks instead of individual characters. The data blocks are spaced and grouped in regular intervals and preceded by synchronous characters that a remote device decode and use to synchronize the connection between the end points. After synchronization is complete, the transmission can begin.








 jQuery - AJAX load () Method


jQuery load () Method

The jQuery load () method is a simple, but powerful AJAX method.
The load () method loads data from a server and puts the returned data into the selected element.

Syntax:
$(selector).load (URL, data, callback);
The required URL parameter speci es the URL you wish to load.
The optional data parameter speci es a set of query string key/value pairs to send along with the request.
The optional callback parameter is the name of a function to be executed after the load () method is completed.
 
Here is the content of our example le: "demo_test.txt":
<h2>jQuery and AJAX is FUN!!!</h2>
<p id="p1">This is some text in a paragraph.</p>
The following example loads the content of the le "demo_test.txt" into a speci c <div> element:
 
Example
$("#div1").load ("demo_test.txt");
It is also possible to add a jQuery selector to the URL parameter.
The following example loads the content of the element with id="p1", inside the le "demo_test.txt", into a speci c <div> element:
 
Example
$("#div1").load ("demo_test.txt #p1")
The optional callback parameter specifies a callback function to run when the load () method is completed. The callback function can have different parameters:
responseTxt - contains the resulting content if the call succeeds statusTxt - contains the status of the call xhr - contains the XMLHttpRequest object
The following example displays an alert box after the load () method completes. If the load () method has succeeded, it displays "External content loaded successfully!", and if it fails it displays an error message:
 
Example
$("button").click(function(){
  $("#div1").load("demo_test.txt", function(responseTxt, statusTxt, xhr){     if(statusTxt== "success")
      alert("External content loaded
successfully!");     if(statusTxt== "error")
      alert("Error: " + xhr.status + ": " + xhr.statusText);  }); });
  
  
  
AJAX is the art of exchanging data with a server, and update parts of a web page - without reloading the whole page. The following two are the jQuery AJAX methods:
 

Performs an async AJAX request

Sets the default values for future AJAX requests
                                               








The XMLHttpRequest object is a developers dream, because you can:
Update a web page without reloading the page
Request data from a server - after the page has loaded
Receive data from a server  - after the page has loaded Send data to a server - in the background
  

  
  
Simple Pull Delta- Communication is the basic abstract of Delta-Communication technique, based on the data-pull mode.  It describes the simplest form of data-pull DeltaCommunication, based on the request-response model and this technique is technology independent.
 AJAX technique as a JS implementation of the SPDC, which is limited to the browser based applications. XHR object has the ability to develop the rich communication not only in asynchronous mode, but also in synchronous mode, since the XHR API contains a setting to configure the synchronous/asynchronous mode. However, even using the asynchronous setting of the XHR object, still AJAX features can be developed and presented to the users to perform DC in synchronous manner, and the mode of the DC is determined by the way the feature is designed.
In later rich communication development technologies like WS, a similar setting is not included, and the developers are given the flexibility to determine, in  which mode  the DC should be developed. Based on these facts, considering the outdated and limited impression of the term “AJAX”, we propose the term (JS-SPCD), in place of the term “AJAX”. The term JSSPCS indicates that it utilizes the SPDC technique, and developed using JS.
When the RIA bus is used all the AJAX requests are directed to a dedicated file, which is assigned for the RIA Bus. As the system grows, the developers can maintain separate files for multiple RIA-buses for different modules. Then the JavaScript in AJAX engine has to use the direct URLs for these dedicated RIA bus files. There are two drawbacks here 1-there will be multiple URLs to maintain, 2- the physical addresses of these files are exposed to anyone which is not a good practice. Using a small PHP code snippet in the index file the data in the parameter segments can be extracted. According to the first URL parameter the module can be identified and the
 
Writing regular AJAX code can be a bit tricky, because different browsers have different syntax for AJAX implementation. This means that you will have to write extra code to test for different browsers. However, the jQuery team has taken care of this for us, so that we can write AJAX functionality with only one single line of code. jQuery AJAX Methods



Comments

Popular posts from this blog

Tute 3 Answers

tute 4

tute 9