JavaScript is a scripting language used to enable programmatic access to objects within other applications. As opposed to a procedural language, JavaScript is distinguishably an interpretive language, able to jump from process to process in an agile fashion.
There are three coding subsets that broadly define the levels at which programmers operate in.
The difference between DHTML and Ajax is where the mechanism for the behavior comes from. In the case of DHTML, dynamic behavior originates from client-side technology (ie: JavaScript and DOM). In the case of Ajax, the interface for dynamic behavior resides on the client-side while the values reside server-side (ie: PHP or MySQL database). In DHTML the inability to save variables to a database means the application will always begin from its inherited state on load. DHTML always initiates from a predefined source. Ajax on the other hand allows a user to begin with a unique web experience because the dynamic state resides on a server.
| Talk | Manipulate | Receive | Send | |
| Conventional | Resident Page | Limited | User | Via Form |
| DOM / DHTML | Resident Page | Full | Ajax | No |
| Ajax + XML | JavaScript |
No | Yes | Yes |
Each layer of JavaScript can overlap and intermingle with the others. Each layer also builds on the dimension of the other. So how do they talk? The above table illustrates the relations, dependencies and limitations of each method. Below is a more detailed explanation.
The four relational dimensions associated with JavaScript comprise of the resident HTML page, JavaScript itself, the user and an external database . This creates enormous scope.
Conventional JavaScript is limited to the HTML page it resides on. Conventional methods are limited to send via a form submission but not receive, unless user prompts are considered. DOM talks to its resident page with the ability to fully manipulate its properties. DOM is limited to receive Ajax calls which stores data additional to the resident properties. DOM cannot send data anywhere other than its resident. Ajax on the other hand has full capability to send data to and receive data from external destination directories anywhere permitted. Ajax cannot talk to the resident page unless DOM is involved.
And so we come to the end of our tutorial. I hope you enjoyed the read. Please feel free to use the star-rating system to leave your mark.
blog comments powered by Disqus