Scripting Languages

There are two additional scripting languages you will encounter at various points in this book. JavaScript is a client-side scripting language. Web sites that allow you to interact with the interface in real time are using JavaScript. For example, a drag-and-drop function uses JavaScript to engineer the movement of an object within the page. In many cases, it is possible to completely avoid JavaScript and still have the site display exactly the content you want in exactly the way you want. If you want to alter the behavior of a page, however, you may need to learn a bit more about this scripting language. Fortunately, sophisticated libraries are available that will allow you to write complicated behaviors quickly and with relative ease.

To create a Drupal template, you will also need to know a little bit of the scripting language PHP. This server-side language is never visible on the Web site, but rather is rendered by the Web server. When you use the PHP function, "print", the PHP script will create a page that is built from one or a combination of the three previously described languages (XHTML, CSS, or JavaScript), which are in turn rendered by the browser for everyone to see. As a consequence, you can use PHP to completely hide content from Web site visitors. Unlike the other scripting languages, PHP produces hidden content that is truly hidden!

Was this article helpful?

0 0

Post a comment