Home >Backend Development >PHP Tutorial >Five Concepts PHP Developers Should Be Familiar with_PHP Tutorial
There is a difference between the knowledge of grammatical structures in textbooks and actual programming. Real knowledge must be obtained in actual development. Every PHP developer should be familiar with the following five things before starting to develop web applications:
1. Framework
The framework can be said to be one of the most important in PHP development question. There are many ways to develop web applications with PHP, and there are many open source frameworks that can be used to help rapid development and maintain higher consistency and effectiveness. Among the better frameworks include cakephp, Symfony and CodeIgniter. Many frameworks also follow the MVC design pattern. If you have worked in this pattern, you will be very familiar with it. After a while, you can even create the framework according to your needs.
2. Template Engine
If you are not using a framework to implement a specific design pattern, then you want to use a template engine. Whether you create your own or use an existing template (such as Smarty), the template engine will keep your logic code independent of the HTML page (and related CSS/js/etc.). This greatly simplifies your code, makes modifications to the entire program quick and easy, and makes it easier for non-developers to modify your program.
3. Code Reuse
As I mentioned before, PHP has the best code reusability among all the languages. From multiple small and medium-sized documents to entire database classes, PHP developers can freely choose to reuse existing code when needed. In fact, you can almost build an entire application without writing a single line of code.
4. Don’t redevelop existing things
It’s obvious that only a few PHP developers know that PHP itself has a lot to offer. Forget new libraries, or complex code routines - look at the PHP manual first. For example, have you ever heard of number_format(), parse_url(), wordwrap() or bbcode_parse()? Take a look at the entire function reference, pick a category, browse and you're sure to find something.
5. IRC is a pleasant thing
When you have a complex problem that cannot be solved, you can go to IRC. PHP's unofficial support channel, many experienced developers are fascinated by it. You'll need an IRC client. If you're using Firefox, ChatZilla is a great plugin. When you need help, paste your code with irc://irc.freenode.net/php as the header. Post your question and wait patiently; some kind person (or people) will give you the answer. Once you have the answer, consider the questions of other people who need help. For PHP's huge function library, no one is the master; on IRC, pooling everyone's knowledge can solve any problem.