Last time, in the Doctrine ORM Repository Hydration article, we discussed how to use the Doctrine ORM to separate our SQL code into a repository layer. This enabled us to pass a strongly typed DTO to the UI layer as opposed to stringly-typed arrays.
This article will be focused on designing phpunit tests for the previous article. We will focus our efforts on these four repository implementations:Continue reading →
With most web applications, there comes a time when your administrative users need reports. These statistics go beyond the typical domain entities and properties that you deal with day-to-day. They consist of aggregate functions (i.e. SUM and MAX) that return numeric scalar values. Lets look at a common MVC solution to expose this data in PHP, and explore how we might refactor that code into something that is maintainable. Our goal is to find the highest quality code that is simple and easy to test.Continue reading →
Writing software that scales with little effort can be a daunting task. The days of “throw hardware at the problem” are here, and managing a web farm with dozens of servers is a real problem for PHP developers. When moving from one to many web servers, the first task is managing PHP session consistency. We will discuss how to accomplish this using the Redis PHP Session Save Handler.Continue reading →
Building scalable and secure e-commerce websites is a complex endeavor. There are enough problems to worry about when managing PCI compliance, firewalls, DDoS attacks, and malicious hackers. Today we are going to tackle the low-hanging fruit that can help you avert fraudulent credit card orders or cyber-attacks from outside your country of origin.Continue reading →