Category: dependency management

Re-Introducing Composer – the Cornerstone of Modern PHP Apps

In this article, we will tackle the basics of Composer, and what makes it such a powerful and useful tool. Before we go into detail, there are two things that we need to have in mind: What Composer is: As we can see on their website: “Composer is a tool for dependency management in PHP. It allows you to declare...

How Do You Keep Your JavaScript Dependencies Up-to-date?

This is the editorial from our latest JavaScript newsletter, you can subscribe here. Recently, security researchers analyzed 133,000 websites for outdated JavaScript libraries. Their findings, presented in a whitepaper, Thou Shalt Not Depend on Me: Analysing the Use of Outdated JavaScript Libraries on the Web, do not ...

10 Tips and Tricks That Will Make You an npm Ninja

While there is much excitement about Facebook’s new Yarn project, the continuing success of Node.js owes much to its original package manager, npm. A few simple npm commands is all it takes to initialize a folder (npm init), download packages (npm install) and create tests (npm test) and custom scripts (npm run) ...

Disco with Design Patterns: A Fresh Look at Dependency Injection

Dependency Injection is all about code reusability. It’s a design pattern aiming to make high-level code reusable, by separating the object creation / configuration from usage. Consider the following code: <?php class Test { protected $dbh; public function __construct(PDO $dbh) { ...

Sourcehunt #4 – Reflection, Authorization, Crons, and more

We skipped January’s Sourcehunt, but we’re back now, ready to boost the stardom of more projects! mult1mate/cron-manager [125 ★] mult1mate/cron-manager is a flexible tasks manager designed for MVC-type applications. It’s used instead of crontab and its purpose is to provide an easy way to manipulate repetitive...

How to Build Your Own Dependency Injection Container

A search for “dependency injection container” on packagist currently provides over 95 pages of results. It is safe to say that this particular “wheel” has been invented. However, no chef ever learned to cook using only ready meals. Likewise, no developer ever learned programming using only “ready code”. In...

How to Solve the Global npm Module Dependency Problem

The Node Package Manager (a.k.a. npm) has given web developers easy access to a lot of awesome JavaScript modules and has made our lives considerably easier when trying to find and manage dependencies for our applications. It also makes it easy for developers to create and publish their own modules, meaning that other ...