Wednesday, May 22, 2019



Client-side development 2 – RiWAs

Rich Internet Applications

A Rich Internet Application (RIA) is a Web application with many of the same features and appearances as a desktop application. A RIA requires a browser, browser plug-in or virtual machine to deliver a user application. Data manipulation is handled by the server, and user interface and related object manipulation are handled by the client machine.

An RIA usually does not require client machine installation. However, client machine operation requires installation of a platform - such as Adobe Flash, Java or Microsoft Silverlight. The RIA may request that the user download and install a required platform if the platform not present. Some RIAs run on several Internet browsers, while others run on specified browsers only.

An RIA usually operates in a sandbox, which is a designated desktop area in a client machine. The sandbox limits visibility and access to the client machine’s file system and OS. Sandbox parameters reduce inherent RIA security vulnerabilities.

Rich Web-based Applications

rich web application (originally called a Rich Internet Application RIA or Installable Internet Application) is a Web application that has many of the characteristics of desktop application software, typically delivered by way of a site-specific browser, a browser plug-in, an independent sandbox, extensive use of JavaScript, or a virtual machine.[1] The concept is closely related to a single-page application, and may allow the user interactive features such as drag and drop, background menu, WYSIWYG editing, etc. HTML5 is a current standard for delivering rich web applications, supported by all major browsers.



Adobe Flash
Adobe Flash manipulates vector and raster graphics to provide animation of text, drawings, and still images. It supports bidirectional streaming of audio and video, and it can capture user input via mouse, keyboard, microphone, and camera. Flash contains an object-oriented language called ActionScript and supports automation via the JavaScript Flash language (JSFL). Flash content may be displayed on various computer systems and devices, using Adobe Flash Player, which is available free of charge for common web browsers, some mobile phones and a few other electronic devices (using Flash Lite).
Apache Flex, formerly Adobe Flex, is a software development kit (SDK) for the development and deployment of cross-platform RIAs based on the Adobe Flash platform. Initially developed by Macromedia and then acquired by Adobe Systems, Flex was donated by Adobe to the Apache Software Foundation in 2011.

Java applet
Java applets are used to create interactive visualizations and to present video, three dimensional objects and other media. Java applets are more appropriate for complex visualizations that require significant programming effort in high level language or communications between applet and originating server.
JavaFX

JavaFX is a software platform for creating and delivering RIAs that can run across a wide variety of connected devices. The current release (JavaFX 11, Sept 2018) enables building applications for desktop, browser and mobile phones and comes with 3D support. TV set-top boxes, gaming consoles, Blu-ray players and other platforms are planned. Java FX runs as plug-in Java applet or via Webstart.

Microsoft Silverlight

Silverlight was proposed by Microsoft as another proprietary alternative. The technology has not been widely accepted and, for instance, lacks support on many mobile devices. Some examples of application were video streaming for events including the 2008 Summer Olympics in Beijing,[2] the 2010 Winter Olympics in Vancouver,[3] and the 2008 conventions for both major political parties in the United States.[4] Silverlight was also used by Netflix for its instant video streaming service.[5] Silverlight is no longer under active development and is not supported in Microsoft Edge, Microsoft's most recent browser.
 
Delta communication

Every company must report to the Work Minister, external insurance companies, and other management entities the details of industrial accidents that occur to employees. Regulations require that companies report these industrial accidents through Delta reports within a given timeframe.
There are three types of Delta accident reports:
·       Industrial accident report where the company must send a report that lists all employees with absences due to an industrial accident (PAT).
·       Industrial accident report where the company must send a report that lists employees involved in an industrial accident resulting in no absence (RATSB).
·       Report that lists employees who have finished the industrial accident absence because of medical discharge or death (RAF).
Human Resources for Spain provides Delta communication functionality that enables you to efficiently communicate to management entities the information about industrial accidents. This functionality helps speed the distribution of information, reduce costs, and simplify communications while guaranteeing the confidentiality of the content of documents.
The basic flow of industrial accident data is as follows:
1.    The accident takes place and the person informs the company with or without a sick note.
2.    The company records all incident and injury details about the industrial accident in the system.
3.    The company generates the appropriate XML file and sends it to the management entities.
4.    If errors exist the management entities return their copies to the company.
5.    The company corrects the errors and resends copies to the management entities.
Using Human Resources for Spain, you record all data necessary for the Delta accident reports through components in the Human Resources Health and Safety business process. The Health and Safety business process enables you to create and track incidents related to health and safety for employees and non-employees. It also enables you to associate multiple individuals with a single incident. Specifically, use the Incident Details component and the Injury Details component to enter the necessary data for XML file generation. Through the Incident Details component you can enter or update industrial accident data. Through the Injury Details component you can enter the necessary data about people involved in an industrial accident.
Once you have entered all of the data necessary for Delta reporting, you can use the Print Delta XML File Id ESP component for Delta reporting. Within this component, you can search for employees and incident types matching your filter criteria, select the employees for whom you want to send data to the insurance company, and generate the XML files. Human Resources for Spain provides a unique XML file template for each of the Delta accident reports. The template provides the file structure in XML format.
If you make changes to the report data or the management entities find errors in the report and return the XML file, you can use these same components to correct the errors and resend the XML file.
The Delta communication functionality is integrated with other PeopleSoft applications for integral management of data. In addition, both the Delta communication functionality and the Contrata functionality share components related to data setup, XML file setup, and XML file generation. The Contrata documentation provides further details about these topics.

Delivered XML Codes for Delta Reporting

The Spanish social security administration delivers tables with a simple structure of code equals value, with each of these tables containing numerous values. Human Resources for Spain delivers the social security tables as XML code tables for Delta reporting, providing many of the table values as sample data. During implementation, you must review the setup data to ensure that it complies with your company's requirements.
The following table describes the data tables within the XML Code Tables component that relate to the Delta communication functionality:

Delivered XML Nodes for Delta Reporting

Human Resources for Spain delivers XML file structures for Delta communication management functionality. You can also define your own XML file structures through this component by creating additional nodes and relating them to each other.

Delivered XML Templates for Delta Reporting

Human Resources for Spain delivers three different types of communications for Delta reporting. Use the XML Template Table component to define templates for the types of communication that you use for XML file generation. You can define as many XML templates as necessary to meet your company needs. Human Resources for Spain delivers as system data the following XML templates:
XML Template
Description                  
DELT@ PAT
Used for communication of industrial accident with sick note.
DELT@ RATSB
Used for communication of industrial accident without sick note.
DELT@ RAF
Used for communication of discharge or death.
Related Links

Steps to Manage Industrial Accident Information

This topic describes the steps necessary to enter industrial accident data and generate the related XML files for reporting.
To manage industrial accident information:
1.    Complete the prerequisite setup for the Delta communication functionality.
2.    Set the Delta data Preventive option for a company on the Company Setup page.
3.    Enter the insurance company code on the Establishment Address page.
4.    Use the Incident Details component to complete these steps:
a.     Enter the incident number of the accident, incident date, and incident time, and select whether the incident is a recurrence on the Incident Details - Incident page.
b.     Enter a long description of the incident in the Description text box on the Incident Details - Description page.
c.     On the Incident Details - Location page enter the location, address, and establishment information where the accident occurred, and, if applicable, select the Car Incident check box to indicate that the incident is a car accident.
d.     Enter any other data related to the incident on the remaining pages of the component.
5.    For an PAT incident, use the Injury Details - Injury component to:
a.     Access the Injury Details - Injury page and specify for each accident the employee or non-employee involved, the date reported, and the time reported.
b.     Select the PAT value in the Incident Type Esp field.
c.     Specify the absence begin date, working hours, and whether the incident is a relapse occurrence.
d.     Click the Accident with sick note link to access the Detailed PAT Data page, where you must specify PAT data details about the employee, employer, and place of incident.
e.     Enter an end date on the Injury Details - Injury page so that the PAT becomes a RAF only if the PAT results in a medical discharge or death.
f.      Click the Medical Discharge or Death link to access the Detailed RAF Data page, where you must define the reason for discharge, the injury grade, and the diagnosis code.
g.     Move to the Injury Details - Details page and click the Accident with sick note link to access the Detailed Pat Data page, where you can specify further details of the PAT incident.
h.     Move to the Injury Details - Diagnosis page and click the Accident with sick note link to access the Detailed PAT Data page, where you can specify medical assistance and economic data for the PAT incident.
i.       Enter any other data related to the injury in the remaining pages of the component.
6.    For an RATSB incident, use the Injury Details - Injury component to:
a.     Access the Injury Details - Injury page and specify for each accident the employee or non-employee involved, the date reported, and the time reported.
b.     Select the RATSB value in the Incident Type Esp field.
c.     Move to the Injury Details - Details page and click the Accident without sick note link to access the Detailed RATSB Data page, where you can specify further details of the RATSB incident.
d.     Enter any other data related to the injury in the remaining pages of the component.
7.    If you make changes or corrections to an XML file that requires you to resend the Delta communication report, use the Print Delta XML File Id ESP component to regenerate the modified XML file.
Note: For the system to include a person in XML file reports that the Delta service generates, the person must work for a company where you have specified the Delta data option on the Company Setup page.
Related Links

Prerequisites

Before you can use the Delta communications functionality first you must define Spanish workforce data related to Delta accident report XML files in the appropriate setup pages. This Spanish workforce data includes XML templates, codes, and nodes.
Related Links

Synchronous Transmission

In synchronous transmission, data moves in a complete paired approach in the form of chunks or frames.  Synchronisation between the source and target is required so that the source knows where the new byte begins since there is no space between the data.
Synchronous transmission is effective, dependable and is utilised for transmitting a large amount of data.  It offers real-time communication between linked devices.
A comparison of synchronous transmission would be the transfer of a large text file.  Before the file is transmitted, it is first dissected into blocks of sentences.  The blocks are then transferred over the communication link to the target location.
Because there is no beginning and end bits the data transfer rate is quicker but there’s a possibility of more errors to occur.  Over time, clocks will get out of sync and the target device would have the incorrect time, so some bytes could become tampered due to lost bits.  To resolve this issue, there is a need for regular re-synchronisation of the clocks as well as the use of check digits to make sure that the bytes are correctly received and translated.

Characteristics of Synchronous Transmission

·        There are no spaces in between characters being sent.
·        Timing is provided by modems or other devices at the end of the transmission.
·        Special syn characters goes before the data being sent.
·        The syn characters are applied between chunks of data for timing functions.

Examples of Synchronous Transmission

·        Chatrooms
·        Video conferencing
·        Telephonic conversations
·        Face-to-face interactions

Asynchronous Transmission

In asynchronous transmission data moves in a half-paired approach, 1 byte or 1 character at a time.  It sends the data in a constant current of bytes.  The size of a character transmitted is 8 bits where a parity bit is added each at the beginning and at the end which makes it a total of 10 bits.  It doesn’t need a clock for integration; rather it utilises the parity bits to inform the receiver how to translate the data.
It is straightforward, quick, cost-effective and doesn’t need a 2-way communication.

Characteristics of Asynchronous Transmission

·        Each character is headed by a beginning bit and superseded by one or more end bits.
·        There may be gaps or spaces in between characters.

Examples of Asynchronous Transmission

·        Emails
·        Forums
·        Letters
·        Radios
·        Televisions

DC implementation

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
Comet is used to simulate data-push
 • Long-lived XHR requests
•Client-side: 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 (more scalable)
 •Blank responses are eliminated
•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)

History and the evolution of the XHR and AJAX.

AJAX.
Ajax (also AJAX /ˈeɪdʒæks/; short for asynchronous JavaScript and XML)[1][2] is a set of web development techniques using many web technologies on the client side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously (in the background) without interfering with the display and behavior of the existing page. By decoupling the data interchange layer from the presentation layer, Ajax allows web pages and, by extension, web applications, to change content dynamically without the need to reload the entire page.[3] In practice, modern implementations commonly utilize JSON instead of XML.
Ajax is not a single technology, but rather a group of technologies. HTML and CSS can be used in combination to mark up and style information. The webpage can then be modified by JavaScript to dynamically display—and allow the user to interact with—the new information. The built-in XMLHttpRequest object, or since 2017 the new "fetch()" function within JavaScript is commonly used to execute Ajax on webpages allowing websites to load content onto the screen without refreshing the page. Ajax is not a new technology, or different language, just existing technologies used in new ways.
XHR

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. In fact, this tab becomes more interesting when you use it on a page like mentioned above (Instagram or Pinterest), because you could actually see AJAX at work, every time the page hits the bottom and sends another request to the server.
But how did this all start?
XHR is short for XMLHTTP Request. While developed by Microsoft’s Outlook Web Access, some of the earliest instances of this type of request were used in your Gmail inbox. It was pretty revolutionary to see your inbox update without having to refresh your page. The way it worked was every 20–30 seconds, a new request was sent to see whether or not you had new mail.

DC-Bus

DC-BUS is technology for reliable and economical communication over noisy DC or AC power lines. The DC-BUS was originally developed by Yamar Electronics Ltd.[1] together with the DC-BUS Alliance,[2] for low cost sub-networks in vehicles, using the battery lines for in-vehicle data communication. The DC-BUS converts the digital input data into phase modulated signals, protected against errors generated by noise over the powerline. On the receiving side, the received signal is demodulated into the original digital data.[3] Gradually it became a popular[dubious ] means of communication[4] in a plurality of applications within aerospace, automotive, solar energy management and lighting. It is also used as an alternative to RS-232 and RS-485 networks in some cases. The common goal for all these applications is reducing wires, saving space, lowering cost and increasing reliability.

Ajax


Traditionally webpages required reloading to update their content. For web-based email this meant that users had to manually reload their inbox to check and see if they had new mail. This had huge drawbacks: it was slow and it required user input. When the user reloaded their inbox, the server had to reconstruct the entire web page and resend all of the HTML, CSS, JavaScript, as well as the user's email. This was hugely inefficient. Ideally, the server should only have to send the user's new messages, not the entire page. By 2003, all the major browsers solved this issue by adopting the XMLHttpRequest (XHR) object, allowing browsers to communicate with the server without requiring a page reload.
The XMLHttpRequest object is part of a technology called Ajax (Asynchronous JavaScript and XML). Using Ajax, data could then be passed between the browser and the server, using the XMLHttpRequest API, without having to reload the web page. With the widespread adoption of the XMLHttpRequest object it quickly became possible to build web applications like Google Maps, and Gmail that used XMLHttpRequest to get new map tiles, or new email without having to reload the entire page.
Ajax requests are triggered by JavaScript code; your code sends a request to a URL, and when it receives a response, a callback function can be triggered to handle the response. Because the request is asynchronous, the rest of your code continues to execute while the request is being processed, so it's imperative that a callback be used to handle the response.
Unfortunately, different browsers implement the Ajax API differently. Typically this meant that developers would have to account for all the different browsers to ensure that Ajax would work universally. Fortunately, jQuery provides Ajax support that abstracts away painful browser differences. It offers both a full-featured $.ajax() method, and simple convenience methods such as $.get()$.getScript()$.getJSON()$.post(), and $().load().
Most jQuery applications don't in fact use XML, despite the name "Ajax"; instead, they transport data as plain HTML or JSON (JavaScript Object Notation).
In general, Ajax does not work across domains. For instance, a webpage loaded from example1.com is unable to make an Ajax request to example2.com as it would violate the same origin policy. As a work around, JSONP (JSON with Padding) uses <script> tags to load files containing arbitrary JavaScript content and JSON, from another domain. More recently browsers have implemented a technology called Cross-Origin Resource Sharing (CORS), that allows Ajax requests to different domains.

                              https://www.researchgate.net
                              https://learn.jquery.com/ajax/