Archive for September, 2008

At first glance, the concept of PHP appears similar to that of JavaScript and other scripting languages that can be imbedded in traditional html code. It adds new capabilities and makes more complicated operations possible within the web environment.

However, the process of removing much of the processing from individual computers has some important benefits.

WORKLOAD

The user’s computer is not required to do much of the processor-intensive work. This can speed page load times and generally ease the browsing experience. As well, PHP does not put a strain on servers. The code is optimized to make the server’s job easier.

This fact and the cost savings that come with the open-source license are speeding the adoption of PHP over competitors like Microsoft’s ASP.NET and Visual Basic.net and Sun Microsystems’ Java.

CENTRALIZED DATA

By moving the processing onto the server, PHP makes the collection and use of data much more convenient. Data can be readily stored in databases and used in novel ways. Users have access to this centralized data. Web sites can be created that tap into this central reserve much more efficiently.

Developers benefit by streamlining the development process. PHP gives them much more freedom to create light, feature rich web sites that reuse common elements while still being connected to extended data sources.

DYNAMIC CONTENT

The main reason for centralized databases is the creation of dynamic websites that can react to user input. As a program language, one of the main functions of PHP is storing variables. The scripts can encode and store user inputs into variables that can be passed on to other code to execute. The code can query databases to draw out data and perform comparisons.

Through these means, PHP can take user input and change a website in response to input unlike hard coded html which is generally static.

PLUG-INS

Like JavaScript, one of PHP’s primary benefits is a lack of reliance on external programs to run the code.

Media files like sound, video and flash require plug-ins to function. Some browsers come with the necessary plug-ins pre-installed, but many do not. This requires users to find and download the necessary software to view components of websites.

PHP is executed exclusively by the server and therefore requires nothing from the end-user. Servers must have PHP installed, but developers would not use the code on servers unable to implement it. The dynamic features are enabled without effort by the user. A server will parse the code at its source, execute the code, and send properly formatted html to the client computer. The user’s browser only sees code it understands.