Advanced

Ruling the Swarm (of Tests) with Codeception

Managing Tests with Codeception

Designing and building a great web application means that our workflow and architecture allow for constant improvement to the product. In order to make our products stable and to have confidence that new commits have no adverse-effect on existing code, we use automated testing practices. And just as we need a proper architecture for our application, we need to design a proper architecture for our testing platform.

Practical Aspects of the Adapter Pattern

Practical Aspects of the Adapter Pattern

We cannot prevent change. You may think that your system is designed perfectly to cater to all of its requirements, but there will always be a change request that ruins your perfect design. The Adapter pattern is a design pattern which is commonly used to manage changes in development, and in this article you’ll see its usage to minimize the impact of changes and how you can benefit from it.

Integrating Open Authentication using Opauth

Integrating Open Authentication using Opauth

Opauth is an open source library created to standardize the authentication process among various service providers. This article explores how to effectively use Opauth to standardize your authentication strategy. Its discussed in the context of CodeIgniter here, but once you understand the necessary details for integration then adapting to any framework is super simple.

PCI Compliance and the PHP Developer

PCI Compliance and the PHP Developer

PCI is a set of security guidelines drawn up by credit card companies and industry security experts to outline what precautions an application should take when handling credit or debit card information. This article dispels a couple of persistent myths about PCI, takes a 20,000-foot look at what PCI encompasses, and then zeros in on the requirements that are most pertinent to a PHP developer.

Building ePub with PHP and Markdown

Building ePub with PHP and Markdown

The ePub format is a publishing standard built on top of XHTML, CSS, and XML. And since PHP is well suited for working with HTML and friends, why not use it to build ebooks? In this article you’ll see how to build a tool for creating ePub packages. Maybe it’s your next best selling cyber-sci-fi novel or documentation for your latest code project… because we all write good documentation for our projects, don’t we?

Preventing Code Rot 101: Unit Testing

Preventing Code Rot 101: Unit Testing

Since it’s infeasible to fully comprehend all problems that your codebases solve, as well as all their solutions, something needs to be done to help prevent code rot. One way or the other: the code needs to be refactorable to live happily ever after. And that’s where unit tests come in; they provide a simple way to write proofs that your code works as intended. But what should tests cover? Find out here, and make sure your code is protected today!

Working with Slim Middleware

Working with Slim Middleware

Slim that offers routing capabilities for easily creating small PHP applications. An interesting, and powerful, feature is its concept of Middleware. Slim middleware can be written that wraps the application, and has access to and can affect the app’s environment and request and response objects in a chained manner. Middleware is an eloquent solution for implementing various aspects of a Slim app. See how Slim middleware works and how you can implement your own custom filter-like services.

Simplifying Test Data Generation with Faker

Simplifying Test Data Generation with Faker

Testing is an iterative part of the development process that we carry out to ensure the quality of our code. Actual data for our application comes in when we release it to production, but during the development process we need fake data similar enough to real data for testing purposes. The popular open source library Faker provides us with the ability to generate different data suitable for a wide range of scenarios.

Logging with PSR-3 to Improve Reusability

Logging with PSR-3 To Improve Code Reuse

Logging is a ubiquitous task; we use logs to track error messages,debug problems, and record important events. Unfortunately, having calls to a logging library scattered throughout our code makes the code dependent on the availability of that library, a clear violation of the Dependency Inversion Principle. In this article, learn how the PSR-3 logger interface allows us to write reusable code that isn’t dependent on any particular logging implementation.

Dependency Injection with Pimple

Dependency Injection with Pimple

Managing dependencies can be one of the most difficult tasks in web app development. We can use Dependency Injection, but that comes with its own hassles though, which Pimple solves by providing a lightweight container for creating and storing object dependencies in a DRY manner. In this article we’ll look at the problems with hard-coding dependencies, how dependency injection solves them, and how to use Pimple to keep code that takes advantage of dependency injection more maintainable.

© 1998-2012 SitePoint Pty. Ltd. All Rights Reserved