![]() |
|
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
|
|
JavaScript demoJavaScript functionality is now so deeply embedded in web development that it has become almost invisible and, sadly, is rarely hard-coded by web designers. A pity - it started life as a general-purpose language.JavaScript functionality is now so deeply embedded in web development that it has become almost invisible, and the combined HTML/JavaScript/style-sheet/layering technology that is behind most web pages is now generally known as Dynamic HTML (DHTML) and, sadly, is rarely hard-coded by most web designers, since Dreamweaver and other WYSIWYG editors offer off-the-shelf solutions for the most commonly encountered JavaScript situations. All of which is a pity, because JavaScript is a general-purpose language that offers (at the least) a useful learning tool for budding programmers, requiring no special tools to develop other than a text editor. It is also distinctly easier to integrate with server-side technologies when hard-coded. As a historical note, JavaScript's role as a largely client-side language was by no means inevitable. If the struggle between Netscape and Microsoft had come out differently, JavaScript might have become a language of choice for server-side development, while VBScript took on its client-side responsibilities, rather than the reverse we now see. Ironically, Microsoft's ASPs now offer one refuge for server-side JavaScript (usually referred to as JScript in this context). Our demo example shows how to use client-side JavaScript with our simple stars database. This technique requires the entire database to be downloaded with the web page, which is clearly unviable when this is large or there are issues of security. However, it is a valuable option when used with server-side technologies that allow (say) a sub-set of a database to be selected. The user can manipulate the data at will without encountering any delays referring back to the server - we think you will find this example distinctly faster than the others we have provided. |