Developer's blog

Dependency Injection is the best pattern ever

Dependency Injection is the best pattern ever
4 min read
2226

A deep understanding of the dependency injection design pattern is the most important thing for an awesome developer. Problem The first problem that you can see is the single responsibility principle. In OrderProcessing we are using the logger logic. Let’s move this logic to the single class. Small refactoring and we can reuse the Logger class in the different parts of our application. But we can’t change the Logger storage…

How to cook autoload for the WordPress

How to cook autoload for the WordPress
3 min read
2913

If you have hundreds of require or include functions in your projects, you should definitely read this article. Autoloading is a really simple tool, but I found many problems with it in other people’s code. Why do you need autoloading? Autoload is needed to get rid of require or include functions and stop changing the order of their inclusion forever. The main solution is to forget about connecting files, you…

WordPress Coding Standards(WPCS) is the Best Team Tool

WordPress Coding Standards(WPCS) is the Best Team Tool
7 min read
9672

WordPress Coding Standards(WPCS) the list of PHP_CodeSniffer (PHPCS) ruleset (sniffs) to check your code inside WordPress. It can improve your code quality and adhere to basic code conventions for WordPress. Do you work in a team or want to upgrade code quality? Then it would be best if you thought about a single coding standard. I’m afraid you, but if there is more than one person in your team, it…

Great practice for the plugin bootstrap file

Great practice for the plugin bootstrap file
5 min read
919

After a hot discussion around the plugin bootstrap file’s vision inside a Mark Jaquith tweet, I’ve decided to show my vision for the plugin bootstrap file. I agree with a lot of points, but about these, it will be later. Before discuss I had a draft of my plugin boilerplate for WordPress. The code of the main file is plugin-name.php was: and main class is PluginName\Plugin was: The huge problem…

Subscribe to news. I promise not to spam :)
Follow me, don't be shy