Developing with PHP
by Jesse Davis, UNT Student
When developing a Web site, there is no shortage of available languages to use. A language, in this sense, is the genre of code used. A new language is always being released, or already-established languages are being updated. Since there are so many options available, your choice is usually affected by your familiarity with a given language and what you are trying to accomplish with your site. For me and the Web site, www.trepid.net/engl4180 , that my group produced that choice was to use PHP.
About PHP. PHP is a server-side interpreted scripting language. PHP comes with a huge library of functions for accomplishing any number of tasks. Access to such a large library of functions allows me to spend time developing, instead of trying to figure out and create my own functions that do the same menial tasks. A code library is similar to a real-world library; these libraries are collections of organized and developed codes to help solve a particular type of problem.
Other languages, such as C and C++, do have extensive libraries available to them, but it can be difficult to find a library that provides a solution. Those libraries also come at the cost of potentially bloating your program with a huge library when you only need to use a handful of the functionality it provides. PHP takes my mind away from that side of programming and let me invest my time in a more worthwhile manner.
PHP Advantages. Another advantage of developing with PHP is the integration the language has with MySQL databases. A MySQL database is like any other database in that it stores information, but the advantage comes with the ease of use when partnered with PHP. Using PHP, I can develop a content-dynamic backend with a great deal of ease. I do not have to use a clumsy command window to look at the status and structure of a given database. As a matter of fact, there are PHP-developed utility sites that provide a user-friendly way to interact with a MySQL database.
To create an effective site, both the Web master and the users need this interface of site front-end and back-end. The advent of Web 2.0 has made everyone’s expectations of a site higher than what they were five or ten years ago. Static site and static content are a thing of the past, and users want a site they can interact with. The site I worked on for LSC does not quite fit that description, yet the management of the site can still be simplified with a content-dynamic system. Again, database support is absolutely available in a number of other languages, but the simplicity by which it is accessible in PHP is highly desirable.
PHP Support. The amount of support for PHP is also quite impressive. The official PHP manual is readily available online at the PHP Web site (www.php.net). The online PHP manual lets users provide helpful comments for the entire PHP library. Imagine your car’s owner’s manual filled with procedures and tips from mechanics, and you will have an idea of the PHP manual’s usefulness.
General ease of use is perhaps the greatest appeal PHP has for me. The huge library mentioned earlier is great, but the simple approach of the language is undeniable. You do not need to have a strong programming background to understand PHP. A primary strength of languages like C and C++ is that you have such unfiltered access to solve your problems. Those types of languages give the programmer much control over how to perform or manage a particular situation. The cost of doing these things comes at a huge learning curve. It takes an enormous amount of time to learn how to use those languages to your advantage. Using PHP, you do not have to worry about garbage collection, memory management, user system dependency, and so on. I believe you could take anyone with no formal programming education and teach them to use PHP in a few hours.
Conclusion. You can use PHP to do many things and do them quickly and easily, but there are some goals that are outside the scope of PHP. This is why I mentioned that the language used also depends on the goals for the Web site. For me, I knew I wanted to develop a dynamic site that was driven by a simple backend for creating the content. I knew that PHP was capable of the things I wanted to do for this site, and I am more familiar with PHP than the other available server-side languages. My main goals were to develop a site that was simple to use and provide transparent site workings to whoever manages the site. I did not want the newsletter editor and staff to worry about whether their HTML syntax was correct, if they accidentally removed something when copying and pasting, what files to update, and so on. I wanted to make a site where the editor only needed to worry about the content, and not how to handle content.