Expert advice: tips for becoming a good PHP developer

Expert advice: tips for becoming a good PHP developer

December 1, 2017

PHP is a language particularly suitable for someone at the start of a career.  Due to the low entry threshold and specifics of the language, many developers begin their professional path there, but then get lost and do not learn to code properly.

Like all languages, PHP encompasses both strong and weak points. While there are many discussions of PHP’s weak sides, such as memory leaks, scalability and speed, the bigger issue I can identify from my experience is an implicit one.

General programming recommendations

My advice for newbie developers is that learning to code properly is more important than learning the syntax. You should concentrate on general programming practice as much, if not more, than learning PHP itself.  Here are some of these important practical elements that you will not understand in the beginning, but should nonetheless learn to master:

  1. Data structures – Similar to design patterns, data structures help you solve certain problems.  Much too often, developers do not know the available data structures, nor when to use them. This causes poor performance, and ugly code.
  2. Algorithms – You will want to minimize your algorithm complexity to improve performance. In many cases developers use algorithms provided by 3rd party libraries  without understanding how they work. While studying at university, I spent time doing what is called algorithmic programming and taking part in ACM ICPC competitions, which helped me to achieve better understanding. (By the way, it isn’t necessary to win.  Learning how to solve just a subset of those challenges will help you a lot.)
  3. SQL – In large projects, there is usually a specific person handling database queries, especially complicated ones. Until you are fortunate enough to benefit from that type of staffing, you will need to do this yourself. As you become more experienced, you should understand how the ORM transforms requests into queries. Sometimes it is better to write your own.
  4. Patterns – Concentrate on when to use patterns and when not to use.  You want to reach the level where you can automatically recognize when certain patterns should be used. (Re-read each time you think you’ve reached a new level).  
  5. Web Functionality – You should direct attention to “How the web works” that is on a comfortable level for you. You should start with basics and get deeper into each subject with time.
      1. How requests travel from your browser to the server and data is returned.
      2. Cookies/Sessions.
      3. SSL/HTTPS.
  6. Other Principles – Here are some principles that are recommended to follow:
      1. DRY.
      2. KISS.
      3. SOLID.
      4. OOP principles.
  7. English – Whether for reading manuals, understanding requirements, or for talking with the clients, you will need it.

PHP specific advice

When developing, it is extremely rare that one will code using pure PHP.  Generally, you would be using one of the following approaches:

  1. Frameworks (such as Symfony, Laravel, ZF, Yii)

  2. CMS (such as WordPress, Drupal, Typo3) 
  3. Platforms (such as Magento)

By understanding how to develop in PHP, one should be able to develop in either of the above-mentioned options. Nevertheless, there is a certain learning curve for each of these approaches, meaning efficiency in one technology stack does not automatically mean efficiency in another.  Take your time.  Do not rush to learn them all at once.  Choose one that fits the way you think. Usually developers would specialize in only 1 or 2 of them.

In terms of literature, there is a lot of reading out there for general programming, algorithms, patterns, etc., and much has been recommended in a previous series of DOU articles for other technologies. I can recommend the following PHP specific sites for starters.

  1. http://php.net/manual/en/
  2. http://www.phptherightway.com/

Incidentally, I just needed the documentation from the official php.net to pass the PHP Certification.

Deputy Production Director, CoreValue

Tags

CoreValuePHP

Share


Recent Articles

SPRING BOOsT. Simplifying Java Applications for Everyone

February 22, 2018 | Andrew Petryk

SAFE HARBOR (DISCLAIMER) All information described in this article is delivered with author’s best knowledge. CoreValue Services and the author disclaim all liability of any kind for possible misuse of provided information. Test it for personal experience before moving to production.   AUTHOR’S NOTE During recent visits to various Java-conferences, I was able to get […]

CoreValue Announces Opening of Research and Development Unit

February 21, 2018

Understanding the importance of investment in the future, CoreSearch is a new R&D initiative launched by CoreValue. The department’s research and development activities will make innovations more accessible, as well as perform focused research on existent demand from experimental and innovation-sensitive customers and niche markets.

© Copyright - CoreValue 2018
Salesforce, Sales Cloud, and others are trademarks of salesforce.com, inc., and are used here with permission.
Used with permission from Microsoft.