ghacks Technology News
  • Author: Jeremiah
  • Published: Feb 16th, 2009
  • Comments: 4

PHP – what it does and what it doesn’t

PHP is a Server side scripting language. Its primary competitors are ASP (Microsoft), JSP (Sun), CFM (Adobe), and Perl (often called cgi by hosting companies, although it is not the only cgi language).
PHP was originally created in 1995, so as a technology it is fairly mature. Version 5.x is the latest stable version and 6 is under development. It is currently running almost 20 million websites including big names like Facebook.

The most common server architecture on which PHP is found is called LAMP (for Linux + Apache + MySQL + PHP). All of the elements of LAMP are open source, meaning that the source code of the application is freely available. This means that the cost of setting up a server running LAMP is reduced (No License Fees), so LAMP based web hosting tends to be the least expensive solution available.

The Internet is built on a client-server architecture. On the client side we have the user and the browser. One the server side we have the server and its script interpreter (In our case, Apache and PHP).
Because PHP runs on the server side, we cannot use it for flashy client side effects, things like animations and auto-complete cannot be performed by php because php is only running on the server. For client side programming we could use javascript, Flash/Flex, Silverlight, or JavaFX.

(more…)

Tags: , , , , , , ,
Categories: Tutorials Basic, Web Development

  • Author: Jeremiah
  • Published: Feb 1st, 2009
  • Comments: 1

Web Development: PHP – what role does it fill

Before we try to work with PHP we need understand the role it fills – what problem does it address. The World Wide Web is built on a client-server model. A client computer requests a page which is supplied by a Web Server. The browser then renders the page for the user to view. The simplest type of pages contain static (unchanging) content. The server could serve plain text files, and the browser wouldn’t have any trouble rendering them.

HTML is a markup language that lets us describe attributes of the text and blocks on our pages. This works great for simple requests, making pages much more interesting than plain text. However it leaves us with a very simple structure. One page from One url (address) results in one rendered content (every time this url is requested, the output is the same).

To give us more options we have programming languages. Some like PHP run on the server side. They modify the content that will be displayed before it is sent to the client and on to the browser. Others like JavaScript run on the client side and allow changes to be made in the browser after the page has been rendered – usually for interactivity or for adding a feature not normally available in that browser.

(more…)

Tags: , , , , , ,
Categories: Web Development



© 2005-2009 Ghacks.net. All Rights Reserved. Privacy Policy - About Us