Wednesday, January 23, 2008

PHP Research

Introduction
PHP (Hypertext pre-processor) is a server side scripting language that allows web developers to create dynamic and interactive websites. When someone visits a PHP webpage, the host server will processes the PHP code. It will then interpret which parts it needs to show to a user (content and images) and hides the other content (file operations, math calculations, etc.) it then translates the PHP document into a HTML one. After the translation into HTML, it sends the webpage to a user’s web browser(3). This means the user only gets code that’s relevant to them and their specifications.

PHP.net describes PHP as “an HTML-embedded scripting language. Much of its syntax is borrowed from C, Java and Perl with a couple of unique PHP-specific features thrown in. The goal of the language is to allow web developers to write dynamically generated pages quickly.”(1)

PHP can be combined with a number of different databases, such as; MySQL, Oracle, Informix and Sybase. PHP and MySQL are cross platform technologies, this means they can be developed on one operating system such as Windows, but serve on a completely different one like Unix.

Some advantages to PHP are:
Free to download and use(2)
Open source software (OSS) this permits users to use, change, and improve the software, and to redistribute it in modified or unmodified form(2)
Supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)(2)
Runs on different platforms (Windows, Linux, Unix, etc.)(2)
Compatible with almost all servers used today (Apache, IIS, etc.)(2)
Reduce the time to create large dynamic websites(2)
You can create a customized user experience for visitors based on information that you have gathered from them(3)
Allows creation of shopping carts for e-commerce websites(3)
If you have basic knowledge of HTML the code is not that difficult to learn(3)
Operates on the server side so can save bandwidth

Some disadvantages to PHP are:
Can support too many ways to do the same things(4)
The naming conventions for functions and variables are not always consistent(4)
Error handling is not standardized and requires more effort(5)

Conclusion
As you can see from the bullet points the advantages of using PHP far outnumber the disadvantages. I think the main reasons a web developer would use PHP are; because it is free to use and to change in any way, so that it suits you and your needs. It is cross platform compatible, so anyone who wants to access the information would be able to do so. It allows a developer to create a more focused website that is more suited to a users requirements rather than a standard web page that may contain irrelevant information.

After researching PHP I have decided to develop a specialist car website where a user will select a number of different options such as; car make, engine size etc. and it will display their chosen car depending on the criteria they pick with a corresponding image. Once they have a car they can go onto a mini guestbook section where they can comment on the car they have chosen and view other people’s car choices and comments. This will allow me to use basic and more advanced PHP techniques.


References
1. www.php.net
2.
www.w3schools.com
3.
www.tizag.com
4.
www.gamedev.net
5. www.oreillynet.com

No comments: