So far we have discussed about various types of tags and objects of HTML documents but haven’t come across any methodology which can control the data embedded in them. In a simple HTML document the web browser cannot separate data from the content and thus the user can’t manage and manipulate it. In order to solve this issue the concept of Data Binding was introduced. Via data binding one can associate the data of a database with the HTML pages. Once the web page is downloaded and opened by the web browser the data associated with that page can be differentiated from the any other content and the user has full control over it. Data binding offers a vast array of new methods and properties for HTML tags which can be used to associate a database with the web page.
Data binding involves three basic steps:
1) Adding a data source to the HTML document
2) Binding HTML elements to the data source
3) Developing scripts to control the bonded database table
Adding the Data Source object to the web page
The first and foremost step towards data binding is to identify the data source and add it to the web page. In order to accomplish this The Data Source Objects (DSO) are used. DSOs are provided by Microsoft and are used for supplying data to the web browser. In order to do this, the DSO identifies the data source through various methods such as SQL queries, URLs etc.
Apart from this DSOs are also used to manipulate the data. It is used to give the user complete control over the data. DSO offers a large number of properties, events and methods in order to accomplish this.
The Microsoft’s Internet Explorer comes with two built-in DSOs. The first one is the Advanced Data connector (ADC) and the other one is the Tabular Data Control (TDC). ADC is meant to access the database via server and ODBC (Open Database Connectivity) components. TDC is used to access tabular data stores in the form of comma-delimited text files. Without the DSO no web page can get and access the data.
Binding HTML elements to the data source
It is very crucial to associate the HTML page to the Data source Object. With the help of DATASRC and DATAFLD attributes, the data can be bonded with the HTML elements. The DATASRC refers to the Data Source Object (DSO) and the DATAFLD refers to a specific column of the database. Both of them have to be defined in the HTML code in order to associate a database table with the web page.
Scripting of Data Source Objects
Once the data source has been identified and associated with the HTML document, the final step is to create a script for that which will allow the user to control the data in a particular manner. Without scripting the user cannot manipulate the data. Scripting is done by using different types of properties and methods of Data Source Object.
HTML is used to create and design static web pages. It proved to be very useful and easy to understand and soon after its evolution it gained world wide popularity rapidly. But with the growth of internet and its related applications the internet users demanded something more in the websites. Web surfers were vigorously expecting more interactive, entertaining and exciting web content. Thus DHTML was introduced. Some people call DHTML as an advanced version of HTML, but some did not consider it a language or a new specification of HTML. Rather, they perceive DHTML as a new way of controlling the HTML commands and functions. DHTML is basically an amalgamation of four different techniques i.e. HTML, Scripting, Cascading Style Sheets (CSS) and Document Object Model (DOM). Using all these tools we can create more interactive and animated web pages to arrest the attention of the internet users. DHTML is used to insert special effects to a website such as mouse rollover effects, drop down lists, animations, advanced marquee effects etc. It allows you to control the HTML elements and change them.
The four techniques which are harmonically used in DHTML are:
1) HTML: DHTML uses the standard HTML code as its base.
2) Scripting: A client side scripting language such as Java Script is used to control the elements in DHTML
3) CSS: Cascading Style Sheets are also used to define and manage the style and layout of the web pages.
4) DOM: Document Object Model allows you to access any portion of a DHTML document and change its properties.
DHTML adds life to static HTML pages. The user feels that he is interacting with the website in real time. DHTML can add an effect with any event. For example when you click on an image, it background changes. In this the effect is related with the mouse click event. Similarly a lot of events such as mouse rollover, drag n drop, scroll etc. can be associated with one or more DHTML effects.
The four properties of DHTML are:
1) DHTML is used to modify and control the standard HTML tags and their attributes.
2) DHTML gives you real time interactivity with the web page. It can position different objects, images and text dynamically within the web page.
3) DHTML is also used dynamic fonts. Only Netscape Navigator supports this function.
4) Another important feature of DHTML is Data Binding. With the help of this property the web surfer can easily access databases from the websites. This feature is only supported by Microsoft’s Internet Explorer.
It is clear from the above discussion that DHTML has many advantages and some disadvantages too. DHTML is more complex than HTML. The DHTML editors are very costly. Apart from this some of the features of DHTML are browser specific but still DHTML is used worldwide as it has proved itself a great utility to enhance the quality and usability of web pages. Anyone can use DHTML in any form. From a small piece of creativity to large complex codes, DHTML can be used to make web sites better than ever before.