Using the onload() event of the body tag, a web developer can create an event driven application model using standard javascript. There are many reasons to set your application into an “Event Driven” Model, including the ability to reduce bandwidth and server-side processing by moving away from the “Request/Response” Model that most web pages deploy today. The R/R Model, when described in a non-technical manner is thus: When a user clicks on a link or other item, a request is sent to the web to fetch a new web page. When that new web page is then displayed, the user clicks again, and the process starts again. This method has been the preferred method of web page development since the web’s creation. This is called ‘the interactive web’. However, as of 2010, most browser manufacturers have implemented the standards promulgated by the World Wide Web Consortium (W3C). When web developers adopt those same standards, the applications developed will operate and present themselves the same across those browsers, without the need to use “browser sniffing” nor “state management” techniques that in and of themselves are quite complex, and not without faulty results.
Each browser is, in effect, a “Runtime Compilation Environment”, or RCE, very much like those 3rd and 4th Generation Programming Languages (3GL, 4GL), developed in the 1980’s, and still in use today. Examples of 3GLs are Paradox, dBase, Foxpro. 4GL examples are Visual Basic, Visual Foxpro, etc., though each of these have precompile options for speedier execution. The language used within modern browsers is Javascript. In and of itself, Javascript is neither 3GL nor 4GL. It is more complex than 3 and 4GLs in that their is no plain language coding capability, nor is there any visual development environment, nor database component. It can be used to manipulate the User Interface, post transactions in the background (much like client-server), manage “cursors” of data at the client, and store libraries of execution code.