|
Beyong basic webpage markup and styles, a web programming specialist will probably use a variety of more advanced languages in order to enhance the functionality of a website, offering more dynamic features to the user.
Advanced web programming languages fall into two categories:
- Server-side (executed on a computer that stores and hosts a website's files)
- Client-side (executed within a user's web browsing application, within the user's own computer system)
The accessibility advantage of server-side scripting
As server-side scripting is executed on the website's host computer but not on the user's computer, it is not necessary for the user's computer to see such code, so server-side scripting is invisible to regular web users.
Client-side code, on the other hand, is executed within the user client (browser) and is therefore read by the user's computer. Client-side scripting is visible within the web page's source code, along with styles and basic markup.
As some browsers don't interpret anything beyond simple (X)HTML, client-side scripting creates features which are not accessible to all web users. Server-side scripting is more universally accessible because it processes scripts on the web host computer and then delivers the output as standard markup to the user.
PHP (PHP: Hypertext Preprocessor)
The etymology of 'PHP' is rather confusing, as the first 'P' stands for another 'PHP'. The wider 'PHP' stands for 'PHP: Hypertext Preprocessor', where the sub-acronym 'PHP' means 'Personal Home Page Tools' which was the original meaning of the wider acronym.
In contrast with its etymology, PHP is one of the more simple server-side scripting languages to learn, and it's specifically designed for creating most dynamic websites with ease.
The 'include()' and 'require()' functions
Even if you're fairly new to programming in general, PHP, like most server-side web programming languages, has some simple features that can dramatically improve the content management of large-scale websites, making site-wide updates take a few seconds rather than a few days, even if you're editing the source code manually. Be sure to learn the 'include()', 'include_once()', 'require()' and 'require_once()' functions when studying PHP; be sure to learn the equivalent when learning any other language (there's an 'include' function or similar in most programming languages).
Reading, writing, creating and deleting files
Another key advantage of using a server-side scripting language such as PHP is the ability to write a script to automatically read, write, create and delete files on the web server computer. Key uses of this dynamic ability are:
- Recording visitor statistics (and making associated analytical calculations)
- Reading and interpreting other web pages (for example, to automatically, periodically check for the downtime of another web host)
Advantages of client-side scripting
Client-side scipting isn't all bad, in fact, it has many advantages such as:
- Extra browser control
- Quick response times following user input
Disadvantages of client-side scripting
The main disadvantages of client-side scripting are:
- Draining the working memory (RAM) of a web user's computer system, slowing their system down and sometimes causing it to crash.
- As mentioned above, less browsers support client-side scripting than those which can interpret basic output as generated by server-side scripting.
|