This is Part 3 of a 3 part series: - Part 1: Codebase, Dependencies, Configuration and Backing Services. - Part 2: Build Release Run, Processes, Port Binding and Concurrency. - Part 3: Disposability, Dev/prod parity, Logs, Admin Processes. This series takes the development guidelines specified in…
Read more... This is Part 2 of a 3 part series: - Part 1: Codebase, Dependencies, Configuration and Backing Services. - Part 2: Build Release Run, Processes, Port Binding and Concurrency. - Part 3: Disposability, Dev/prod parity, Logs, Admin Processes. This series takes the precepts specified in the 12 Factor…
Read more... This is Part 1 of a 3 part series: - Part 1: Codebase, Dependencies, Configuration and Backing Services. - Part 2: Build Release Run, Processes, Port Binding and Concurrency. - Part 3: Disposability, Dev/prod parity, Logs, Admin Processes. In this series we’re going to look at ways of building sc…
Read more... We like to stay on the cutting edge, so when Laravel 5 was released in February 2015, it wasn’t a question of whether or not we would migrate our 4.x applications across… it was just a matter of when. After a few slightly painful (but successful) migrations, we decided to put together a comprehens…
Read more... In most web apps, we encounter situations where we need to implement repetitive CRUD-type use cases across multiple entities. In our recent projects at Slashnode, we’ve been experimenting with different patterns to try to make it easier and quicker to build out these CRUD-type use cases. The repet…
Read more... The repository pattern has recently taken on a life of its own in the echo chamber of PHP architecture and development blogs. It seems that just about every PHP developer with a blog has ingested the proverbial [flavoured drink mix](https://en.wikipedia.org/wiki/Drinking_the_Kool-Aid) and written a…
Read more... I was recently reading the excellent tutorial by Peter Suhm which describes a possible behaviour driven development workflow with [Behat and PHPSpec](http://code.tutsplus.com/tutorials/a-bdd-workflow-with-behat-and-phpspec--cms-21601). While I think he illustrates the workflow in a coherent way and…
Read more... One of the most important things for you to consider when planning the deployment of your application into production is how to handle detecting the “environment.” The environment name is a string identifier that is unique for each deployment environment. Typically, descriptive names such as “prod…
Read more... Laravel provides some great tools for simplifying the development of web applications. One of them is the Response facade, which allows us to quickly and easily send information back to the requester (browser window in the case of a normal user, third-party application in the case of API access). …
Read more... This is the continuation of a previous post based on Fabien Potencier’s tutorial on [creating your own framework](http://fabien.potencier.org/article/50/create-your-own-framework-on-top-of-the-symfony2-components-part-1) on-top of the Symfony 2 components. In the last lesson, we covered the first …
Read more... If you have the time, I highly recommend you work through all of the lessons in their original form. With that said, this post aims to provide a summary of what you’ll learn in each section, as well as a link to the completed code after each exercise. This will make it a breeze for you to work out …
Read more... Speaking very broadly, every computer application is basically a data manipulation tool. The application accepts data from the outside world, performs some transformation on it and then pushes some different data right back out. The data inserted into an application can come from a peripheral devi…
Read more... I like the repository pattern (link), but find it tedious in a lot of ways. We employ the pattern because it enables us to break the dependency between our controllers and/or service layer code and the ORM (typically Eloquent). Unfortunately, it usually involves writing a lot of redundant boilerpla…
Read more... ## What you’ll learn - How to manage dependencies on third-party vendor libraries using Composer - Loading, namespacing and autoloading dependency managed code using Composer’s built-in PSR-0 autoloader - Publishing your own libraries via Packagist ## What is Dependency Management? Web applicati…
Read more... One of the most important aspects of setting up your development environment is the notion of **DEV-PROD parity**. This refers to the practice of making sure that the system that you develop an application on is as close as possible to the system that the application is eventually going to run on w…
Read more... Within the PHP MVC framework community (and the Laravel community in particular), it seems to be in vogue at the moment to write about dependency injection and how it can be used to make controllers testable. In general, I agree with these authors, but find some of the examples and discussions pres…
Read more... For one of my website projects I wanted to create a very basic content management system. The plan was to have a header and footer template class, and include these from the ‘index.php’. The bit between the header and footer (‘content’) would then be pulled from another file, depending on the URL. …
Read more... ## Introduction As a web developer, securing your web applications is one of the most important and complex tasks you’ll regularly undertake. You may need to use some security mechanism to make sure the visitor has valid credentials (authentication) within the domain of your application. You may a…
Read more... Most web applications like to persist things, and as a web developer, you’re going to be spending a good portion of your development time pulling things in and out of databases. If you’ve worked on more than a couple of projects, you know how quickly interfacing with your database becomes a bore. …
Read more... As a web developer, forms will either be your favourite thing or the bane of your existence (and sometimes both). But the reality of the situation is that in order to get data from users into your application, you’re probably going to be using a lot of forms. Symfony, being the smart framework that…
Read more... Since the beginning of computing the single most error-prone and unreliable component of the system has been something that isn’t really part of the system at all. Talk to anyone who’s worked in tech support and they’ll tell you the most common problem when troubleshooting computer malfunctions: op…
Read more... Writing PHP and HTML together is sooo 1998 – which is why Symfony uses the Twig templating language by default. This means instead of writing ugly code like this: <Gist id="2576062" /> … we can use this: <Gist id="2576065" /> Much nicer. Twig not only allows us to use a “friendlier” syntax when…
Read more... In this article we’re going to talk about Symfony’s routing system. Because you’ve read our comprehensive dissection, you already know that Symfony uses a front controller (you have read it… right?). This means that all URLs are serviced by a single script – typically contained in the “app.php” fil…
Read more... The intention of Symfony is to make things easier for developers. One of the big pain points when developing large and complex web applications is keeping track of the physical location of classes, templates and assets within your project. Symfony helps us out here by providing logical names for co…
Read more... In this article we’re going to get our hands dirty poking around inside the Symfony 2 front controller. Scalpels ready? What’s that? A question? ## What's a front controller? If you’ve worked with a few web applications in your time you’ve probably already encountered the front controller pattern…
Read more...