Tuesday, May 21, 2019

Client Side Development 2- RIWAs



                   A rich Internet application (RIA) is a web application that is designed to deliver the same features and features that are related to desktop applications. A rich Internet application (RIA) usually runs within the Web browser and does not require the installation of client-side software. Rich Internet Applications (RIA) are very complex Web based systems. RIAs are covered by different types of components, integrated in different ways, making RIA more complex systems. Numerous technologies and techniques (TTs), frameworks, libraries and tools have been introduced over the past decade to develop these RIA components. However, these TTs, frameworks, libraries and tools do not improve core concepts in the RIA core, and the complexity remains due to the lack of implementation of the abstract architectural formalism of the RIA.
                                                                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 RIAs run their client parts within an area that is specifically and isolated from a client desktop called sandbox for security purposes. Sandbox limits the visibility and access to the file and operating system on the client application server on the other side of the connection. This approach allows the client system to manage local activities, calculations, reformatting, reducing the amount and frequency of client-server traffic, especially in comparison with client-server implementations built around so-called thin clients.

Key Features of Rich Web based Application are;
                           

  • Google Gears. 
  • Open Laszlo and WebTop, 
  • Oracle Web Center
  • Adobe Flash, Flex and Adobe Integrated Runtime (AIR) 
  • Microsoft Silverlight. 
  • Curl (an object-oriented language with embedded HTML markup)


Different technologies used to develop the client side components of Rich Web based Application are;
                  o   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.


                      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.


  •  Synchronous Transmission 
                                


                                 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 predened 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.

  •  Asynchronous Transmission



                                   Asynchronous transmission is the transmission of data in which each character is a self-contained unit with its own start and stop bits and an uneven interval between them. Asynchronous transmission is also referred to as start/stop transmission. Asynchronous transmission uses start and stop bits to signify the beginning and ending bits. The additional one at the start and end of a transmission alerts the receiver to the occurrence of the first character and last character. The asynchronous transmission method is deployed when data is sent as packets as opposed to in a solid stream. The start and stop bits have opposite polarity, allowing the receiver to understand when the second packet of information has been sent. The two main characteristics specific to asynchronous communication are: Every character is preceded by a start bit and followed by one or more stop bits Spaces between characters are common.

                                AJAX technique uses the data-pull mode, and supports both synchronous and asynchronous modes by API. Through experiments we have noted that the DC technique implemented by AJAX  is  the  simplest  form  of  the  DC. Furthermore, the underlying concept used to implement the AJAX technique can be developed in other environments – Like desktop applications – using other TTs like WS or C#, even without JS and/or XHR object. We have successfully developed and tested the technique using C#.Net, to develop a desktop application component, which communicates with server components  using  datapull  DC,  asynchronously. Moreover, the same DC technique is utilized in other Advanced DC technologies like WS, for the data-pull mode. To  denote  the  abstract  concept of  this  simplest implementation  of  the  DC  model,  we  propose  the  term “Simple  Pull  Delta-Communication”  (SPDC).  Since  the SPCD concept is abstract, it is TTs independent and can be developed for both browser-based and non-browser-based clients.
                                  One of JavaScript’s greatest strengths is its ability to make asynchronous requests. AJAX. Microsoft invented Ajax in 1999.AJAX can be seen as the beginning of the JS based RIA development approach, and it became a major breakthrough in the web development area (Salva & Laurencot, 2009). After its introduction, developers were learning how to use AJAX to create desktop-like GUIs in the web applications such as Google Maps; and later they subsequently used AJAX even to create entire enterprise RIAs (Lawton, 2008). Using the JS’s ability to manipulate the Document Object Model (DOM) in HTML documents, AJAX achieves and enhances the interoperability capability of the web applications (Salva & Laurencot, 2009). It should be noted that the AJAX itself is not a technology, it is a technique; and the technology behind AJAX is the XHR object with its JS API. The AJAX is a data-pull technique, employing the traditional request-response model. Combining HTML and CSS with JS, AJAX has become a powerful tool in RIA development, providing the fundamental implementation of the DC.

                                 XHR is also known as XMLHttpRequest. The XMLHttpRequest object was initially dened as part of the WHATWG’s HTML effort. (Based on Microsoft’s implementation many years prior.) It moved to the W3C in 2006. Extensions (e.g. progress events and cross-origin requests) to  XMLHttpRequest  were developed in a separate draft (XMLHttpRequest Level 2) until end of 2011, at which point the two drafts were merged and  XMLHttpRequest  became a single entity again from a standards perspective. End of 2012 it moved back to the WHATWG.On Chrome or other browsers, if you were to inspect any page, you could head over to the Network tab, then notice a sub-tab called XHR. Within this tab, you could see the status of requests, how long requests take, and plenty more. Microsoft  was  working  on  a  technology  named XMLHTTP in their Exchange 2000 project [18], and it was rst introduced to the world as an ActiveX control in Internet Explorer 5.0 in March 1999 [19], [20]; and later it was called the  XMLHttpRequest  (XHR)  object,  which  has  an Application Programmer Interface (API) in JS. The XMLHttpRequest object can be used to request data from a web server.



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.


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:
          The required URL parameter species the URL you wish to load.
          The optional data parameter species 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: "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  "demo_test.txt" into a specic <div> element:

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:

·      $.ajax()           :                               Performs an async AJAX request
·      $.ajaxSetup()  :                               Sets the default values for future AJAX requests









No comments:

Post a Comment

Client Side Development 2- RIWAs

                   A rich Internet application (RIA) is a web application that is designed to deliver the same features and features tha...