25.07.2014 Views

Analysis and Testing of Ajax-based Single-page Web Applications

Analysis and Testing of Ajax-based Single-page Web Applications

Analysis and Testing of Ajax-based Single-page Web Applications

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DOM APIs, a technique that was called Dynamic HTML (DHTML), to add<br />

some degree <strong>of</strong> dynamism to the static browser interface. Significant browser<br />

compatibility issues regarding DOM implementations, however, discouraged<br />

web developers to make much use <strong>of</strong> DHTML beyond styling menus <strong>and</strong><br />

simple form manipulations.<br />

The latest version <strong>of</strong> the W3C DOM specification is Level 3, released in<br />

2004. Currently, web browsers support many features <strong>of</strong> the W3C DOM st<strong>and</strong>ard<br />

(mostly Level 2).<br />

1.2.2 Cascading Style Sheets<br />

Cascading Style Sheets (CSS) is a st<strong>and</strong>ard for specifying the presentation <strong>of</strong><br />

HTML (or XML) documents. While HTML is used to define the structure <strong>of</strong><br />

a document, CSS is used to specify how the structured elements should be<br />

displayed. The first version <strong>of</strong> CSS (Level 1) was adopted in 1996 by the WC3,<br />

to define attributes for specifying styling properties such as colors, margins,<br />

<strong>and</strong> fonts. The second version, CSS Level 2, was released in 1998, to define a<br />

number <strong>of</strong> advanced features, such as relative, absolute, <strong>and</strong> fixed positioning<br />

<strong>of</strong> elements. CSS Level 2 is supported by most modern browsers. A new<br />

recommendation by W3C, CSS Level 3, is currently under development.<br />

1.2.3 The XMLHttpRequest Object<br />

In 1998, Micros<strong>of</strong>t introduced Remote Scripting, a technology that allowed<br />

scripts running inside a browser, e.g., through a Java Applet, to exchange<br />

information with a server. Shortly after, in 1999, the XMLHttpRequest object<br />

was created as an ActiveX control in Internet Explorer 5. Other browsers (e.g.,<br />

Mozilla, Safari) followed with their own implementation <strong>of</strong> this object soon.<br />

The XMLHttpRequest object can be accessed in JavaScript to transfer text in<br />

various formats, such as XML, HTML, plain text, JavaScript Object Notation<br />

(JSON), <strong>and</strong> JavaScript, between the server <strong>and</strong> the browser (a)synchronously<br />

at the background without the need <strong>of</strong> a <strong>page</strong> refresh.<br />

1.2.4 A New Approach to <strong>Web</strong> <strong>Applications</strong><br />

The term <strong>Ajax</strong> was coined, in February 2005, in an article called ‘<strong>Ajax</strong>: A New<br />

Approach to <strong>Web</strong> <strong>Applications</strong>’ by Garrett (2005), <strong>and</strong> defined as:<br />

• st<strong>and</strong>ards-<strong>based</strong> presentation using XHTML <strong>and</strong> CSS;<br />

• dynamic display <strong>and</strong> interaction using DOM;<br />

• data interchange <strong>and</strong> manipulation using XML <strong>and</strong> XSLT;<br />

• asynchronous data retrieval using XMLHttpRequest;<br />

• <strong>and</strong> JavaScript binding everything together.<br />

Chapter 1. Introduction 7

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!