you should become familiar with two core ideas:
- follow coding standards. Assume you have developed a website for a client. For whatever reason, not necessarily bad, they hire another programmer to to make some changes. The other programmer informs the client it will cost more to make the repairs due to your poor coding. If you didn’t have a bad name before, you do now.
- document your code for the same reason as #1, but also because if you are hired to go back and make some changes in six months or a year, you will want to know what the purpose of everything was. PHP Documentor makes this tremendously easy
When I code a website, I do so on my personal computer which acts like a web server. I use AppServ for Windows. You can also use XAMPP for Windows or MAMP for OS X. With PHP, you do not need a program to write the code (though there are many available). Code can be written using any text editor including Notepad. PHP makes communicating across a website easy by sending data via session variables or cookies. This, essentially, is bits and pieces of information that the website needs to function. For example, if you have a contact form you would most likely use PHP to send that form data to either (or both) the MySQL database or via email; either of which are very easy.
With PHP, you can control what type of attachments are submitted with that form. Let’s say you operate a social media website and your visitors have the ability to upload images. Yet, you don’t want them to be over 100kb and they must be in JPEG or GIF format. PHP makes this easy, also. In addition, you can use PHP anywhere within an HTML document or even a CSS document (provided that PHP is told to do so). This allows you to effectively customize a website around a user’s particular preference.
PHP Frameworks CakePHP is a free PHP framework developed by a non-profit organization based in Nevada. When needing to customize a website solution, CakePHP is my first choice.
Zend Framework is another free PHP framework sponsored by Zend Technologies. Zend tends to lead the PHP framework field by not only having a larger community, but also developing coding standards as mentioned above.
Though you still must have adequate knowledge of PHP and it’s abilities, both frameworks make streamlining applications tremendously easier. There isn’t one huge advantage of one over the other. I use CakePHP because it was the first one I got my hands on.
MySQL MySQL is a backend database most frequently used in combination with PHP. MySQL is a flat file database meaning which essentially means it operates from files as opposed to a relational database such as Microsoft Office Access. However, this does not limit MySQL’s capabilities and, in fact, can be made to act relational by using such methods as hierarchical data trees. MySQL allows the storage of website information without the need of individual files – say a visitor’s preferences, for instance. This saves disk space and even makes processing speeds slightly faster.