Get Programming with PHP
Get Programming with PHP by Simon Asher is a good resource for learning about programming best practices. It's a great book if you're just getting started and want to know more about PHP, or if you already have some experience with it but want to learn more.
PHP Best Practices
PHP Best Practices is a free online course created by the folks at Toptal. It teaches you how to write clean, structured and efficient PHP code that's easy to understand and maintain.
If you're new to programming, this is a great resource for learning best practices that will help you become a better programmer. If you've been coding for awhile, it can be useful for teaching yourself or your team about the latest best practices in PHP development.
The goal of PHP Best Practices is not just to teach what's right or wrong but why certain approaches are more effective than others -- especially as they relate specifically to how we build web applications using PHP 7+. The course teaches by example using real-world scenarios so that attendees get an idea of how these concepts might apply in their own projects (or other projects).
Zend Framework 2 Best Practices Book
The Zend Framework 2 Best Practices Book
I first came across this book at a local PHP meetup. This book is not only filled with useful information and tips, but also includes a handy companion website that allows you to test your skills as we progress through the chapters.
Slim3 Best Practices
Use composer
Use a package manager
Use namespaces
Phptidy your code, so it's easier for other people to read and understand. You can use phptidy with the command line or with a plugin for your IDE (code editor). If you're using PHPStorm, there are several plugins available. One recommended one is Propel and Symfony2 Propel Bundle. This will allow you to run phptidy on your code base automatically every time you update it after every commit.
Run phpcs (PHP Code Sniffer) against each new pull request before merging into master branch or develop branch depending on how often they're merged into master branch
ruby-bestpractices.com is the way to go for ruby practices. Is there something similar for php?
In the PHP world, there are no common practices and everyone has their own way of doing things. The best way to learn them is by reading through the source code of established projects and making your own decisions.
There are some resources that are worth mentioning though:
php-bestpractices.com: This website contains many useful tips on how to write clean and maintainable code in PHP. It's from a developer who has been working with PHP for more than 10 years, so he knows what he's talking about! He also provides real life examples for all of his recommendations, which makes it easier for you to understand why something works that way or not.
php-fig/standards: If you're interested in writing code that adheres to certain standards then this repo might be worth checking out since it contains a bunch of useful style guidelines for the various frameworks available at this point (e.g Symfony2 vs Laravel vs CakePHP).
Does anyone know of a good resource to learn best practices in php?
It's a good question. There are many ways to get help when learning PHP, but one of the best ways is to read and learn from experienced developers. You can learn from books, tutorials or even blog posts. The following resources are great places to start:
PacktBooks - A series of books on various aspects of programming in PHP including security, testing, debugging and more!
PHP-FIG - An international group that standardizes php syntax across all projects so everyone can be on the same page (pardon the pun). They also work on improving new features coming out in future releases as well as improving documentation for existing functions/classes etc...
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.