PHP Articles

Abstract Factories for Rapid Development

April 30, 2015

Zend Expressive, like the Zend Skeleton project before it, is a great platform for building robust, maintainable, highly scalable applications. But it’s generally not the platform you’d think of for rapidly application development. However one little technique can change all that. Today, let’s learn that technique and begin changing your perception.

Reflections on Being Part of the PHP Community

Reflections on Being Part of the PHP Community

April 26, 2015

Despite being developing with PHP since a chance encounter in 1999, I’ve only recently gotten myself involved in the community. So here’s a reflection on what’s changed since getting involved.

Why a Commitment to Continuous Deployment Pays Off

Why a Commitment to Continuous Deployment Pays Off

April 22, 2015

Recently, I was asked to build an application with a rapid turnaround time and modest budget. Being the sole developer, here’s the approach I took to make the development process as simple and efficient as possible

How to Test Zend Framework Applications with Codeception

April 19, 2015

Testing is essential for creating reliable software. Whether you’re writing a small application for your local club or an application to back your startup, it needs test coverage to ensure it works properly. In this series, I show you how to test Zend Framework 2 applications using the comprehensive testing framework - Codeception.

Why Microframeworks Create Lean Applications

April 3, 2015

Recently I built a new application using SlimPHP, a PHP microframework, instead of a full-stack framework, such as Symfony or Zend Framework 2. In this post, I start discussing how taking this approach has lead to a leaner application design.

Happy 20th Birthday PHP

Happy 20th Birthday PHP

April 9, 2015

I’m a bit late with this, as it was PHP’s 20th birthday a few days ago now. But this morning,

First Time Conference Speaker

First Time Conference Speaker

April 22, 2015

It was a great time at PHP UK Conference 2015, with so many great speakers, starting right at the opening

Building and Executing SQL Queries In Zend

April 8, 2014

<p>Whilst there are many ways for building and executing <!-- raw HTML omitted -->SQL<!-- raw HTML omitted --> queries in Zend Framework 2, the two that I usually use, and which are also used in the ZF2 manual, are <strong>closures</strong> and the selectWith function. <!-- raw HTML omitted -->I previously <!-- raw HTML omitted --><!-- raw HTML omitted -->wrote a three part series<!-- raw HTML omitted --><!-- raw HTML omitted -->, showing how to get started using the <!-- raw HTML omitted --><!-- raw HTML omitted -->\Zend\Db\Sql<!-- raw HTML omitted --><!-- raw HTML omitted --> classes with Zend Framework 2, but I didn’t cover how to actually <!-- raw HTML omitted --><!-- raw HTML omitted -->run them<!-- raw HTML omitted --><!-- raw HTML omitted -->. So in today’s tutorial, let’s do that.</p>

Simplify Form Validation and Reuse, Use Validation Groups

April 15, 2014

Do you need to use different elements of a Zend Form, in multiple locations? Are you keen to reuse the same form class and avoid code duplication but don’t know how? Come learn about validation groups.

Do We Use Magic Methods or Not?

April 12, 2013

Are magic methods in PHP, and by consequence Zend Framework, worth using? When you use them, can you truly write testable code? Let’s explore one side of the argument today.

Using Traits for Code Reuse in Zend Framework 2

April 1, 2013

This is a post I’ve been meaning to write for a feels weeks now after I first started using Traits for simple reuse, as it solved a need I had at the time. After a while it seemed to be not too bad of a solution also. What Are Traits? If you’re not familiar with Traits the PHPmanual describes them as: Traits are a mechanism for code reuse in single inheritance languages such as PHP.

Zend Framework 2 - The New HTML5 Form Fields - Part 2

April 11, 2013

In today’s post, we look at more HTML5 Form fields in Zend Framework 2: Month, Range, Color, Week and Number, as well as element properties and attributes. Come look around more of the great new elements available.

Simple Translations with Oxid eSales

Simple Translations with Oxid eSales

April 27, 2013

<p>You may already be all over this one, but if you’re new to Oxid eSales or new to website internationalization, then today’s tip is one not to miss.</p>

10 New Year's Resolutions Every Web Developer Should Make – Reviewed

10 New Year's Resolutions Every Web Developer Should Make – Reviewed

April 28, 2012

<p>I was going through <!-- raw HTML omitted -->PHPDeveloper<!-- raw HTML omitted --> this morning and found a great post from NetTuts from December 27th, 2011 entitled: <a href="http://net.tutsplus.com/articles/general/ten-new-years-resolutions-every-web-developer-should-make/">10 New Year’s Resolutions Every Web Developer Should Make</a>.</p>

Why Errors Are Your Best Friend

April 3, 2012

As developers, we can believe errors are negative reflections on our applications. But are they really so? In today’s post, I show you how they’re anything but negative, they’re actually very very positive, when interpreted correctly.

Painless Data Traversal with PHP FilterIterators

April 25, 2012

There’s load of ways to traverse data, especially in PHP where there are a variety of loops available; including while, do while, for and foreach. These are fine for normal structures, such as scalar and associative arrays. But what if you want to get a bit more fancy? Enter the FilterIterator

Make Freelance Business Administration Easy - Use FreeAgent

April 22, 2012

Whether you’re a casual freelance php developer or running a professional freelance business, you’ll know just how much work can be involved. Not only do you have applications to design, develop and support. But you’ve also got business functions such as marketing, advertising, finances and networking as well. In this post we show you a tool to massively reduce your workload - FreeAgent.

Shifting Direction (Slightly)

April 15, 2012

So many of us are great technically, but find the prospect of running a freelance business anything from difficult to down right scary. So we’re aiming for Malt Blue to become a key resource for Starting, Building and Growing a Successful PHP Freelance Business.

Why Kohana is an Excellent Alternative to Zend Framework

April 20, 2012

As you know from reading Malt Blue, I’m rather a Zend Framework fan. Whether it’s the controller plugins, easily adding RSS feeds to applications, configuration with Zend Config or more – I really believe it’s one of the best PHP framework choices. But well, it’s a bit heavyweight. Enter Kohana!

Zend Form Mastery with Zend Config – Part 3 Standard Form & Element Options

April 22, 2012

– Part 3 Standard Form & Element Options Options We’ve looked at custom form filters and we’ve looked at the core form configuration. But what about the other form properties? What about: setting an element as readonly an element as required ignoring an element and love them or hate them, what about decorators Element Options Outside of the options that we’ve looked at previously, there are a number of other options that we can consider implementing when configuring a Zend Form.

Zend Form Mastery with Zend Config - Part 1 Custom Filter Paths

April 27, 2012

When you’re working with Zend Form you keep your configuration as much out of code as you can - right? Well, if you’ve been working withZend Form for more than a little while, you know that Zend Config really makes that pretty simple - well, some of the time. In this series we look, comprehensively at how to do it all with Zend_Config.

Beginning cloud development with cloudControl – Part 4 – Memcache

April 9, 2012

<p>Here we are at part four of the <em><strong>Beginning Cloud Development with cloudControl</strong></em> series and in this part, we’re adding <strong><a href="http://uk3.php.net/manual/en/book.memcached.php" title="php Memcached">Memcached support</a></strong>. In <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol" title="Beginning cloud development with cloudControl">part one of the series</a>, we laid the foundation for the application and got up to speed with what <a href="http://cloudcontrol.com/?utm_source=maltblue&utm_medium=Banner&utm_campaign=MaltBlue" title="cloudControl: web - application - platform">cloudControl</a> is, why it works and how to get started using it.</p> <p>Then <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part2-mysql" title="Beginning cloud development with cloudControl – Part 2 – MySQL">in part two</a>, we started to flesh out the application that we started building in part one and added MySQL support to it. We showed how to work with cloudControl to manage the key requirements, such as enabling MySQL support, connecting to the MySQL database and keeping the database up to date from a maintenance perspective (creating the database schema and loading data in to the database).</p> <p>Then in <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part-mongodb" title="Beginning cloud development with cloudControl – Part 3 – MongoDB">the third part of the series</a>, we replaced MySQL with mongoDB support. Now, in this, the third part of the series, we’re going to finish up with adding <strong><a href="http://uk3.php.net/manual/en/book.memcached.php" title="php Memcached">Memcached support</a></strong>. As the core of the work’s already been done in the application, this tutorial will be shorter and simpler than the previous three. So, get out the code that you worked through from <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part2-mysql" title="Beginning cloud development with cloudControl – Part 2 – MySQL">part 2</a>, or download a copy of it from <a href="https://github.com/maltblue/cloudcontrol-project" title="Malt Blue on github">the github repository</a> and let’s get started.</p>

Beginning cloud development with cloudControl – Part 3 – MongoDB

April 2, 2012

<p>Here we are at part three of the beginning cloud development with cloudControl series and in this part, we’re adding <strong>mongoDB support</strong>. In <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol" title="Beginning cloud development with cloudControl">part one of the series</a>, we laid the foundation for the application and got up to speed with what cloudControl is, why it works and how to get started using it.</p> <p>Then <a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part2-mysql" title="Beginning cloud development with cloudControl – Part 2 – MySQL">in part two</a>, we started to flesh out the application that we started building in part one and added MySQL support to it. We showed how to work with cloudControl to manage the key requirements, such as enabling MySQL support, connecting to the MySQL database and keeping the database up to date from a maintenance perspective (creating the database schema and loading data in to the database).</p> <p>In this, the third part of the series, we’re replacing MySQL that we introduced in part two with mongoDB support.</p>

Beginning cloud development with cloudControl - Part 2 - MySQL

April 16, 2011

<p><!-- raw HTML omitted -->In <!-- raw HTML omitted -->part one of the series<!-- raw HTML omitted --> we got a birds eye view of a great cloud development solution for <!-- raw HTML omitted -->PHP<!-- raw HTML omitted --> - <!-- raw HTML omitted --><!-- raw HTML omitted -->cloudControl<!-- raw HTML omitted --><!-- raw HTML omitted -->. We looked at the concept of what it is, what you can do with it and ran through a basic deployment with a rather basic application. If you missed the first part, I strongly encourage you to read it before continuing on with part two. When you’re done, come on back and work through it here.<!-- raw HTML omitted --></p> <p><!-- raw HTML omitted -->In this, part two of the series, things start to get more serious. <!-- raw HTML omitted -->In this part, we’re going to start to flesh out the application started in part one, adding in MySQL support - showing just how simple cloudControl makes this for us.</p>

Beginning cloud development with cloudControl

April 8, 2011

<p>##.</p> <p>Don’t forget to grab the other parts as well:</p> <ul> <li><a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part2-mysql" title="Beginning cloud development with cloudControl – Part 2 – MySQL">Beginning cloud development with cloudControl – Part 2 – MySQL</a></li> <li><a href="http://www.maltblue.com/php/beginning-cloud-development-with-cloudcontrol-part-mongodb" title="Beginning cloud development with cloudControl – Part 3 – MongoDB">Beginning cloud development with cloudControl – Part 3 – MongoDB</a></li> <li><a href="http://www.maltblue.com/zend-framework/beginning-cloud-development-with-cloudcontrol-part-4-memcache" title="Beginning cloud development with cloudControl – Part 4 – Memcache">Beginning cloud development with cloudControl – Part 4 – Memcache</a></li> </ul> <hr> <p>So you’ve heard all about the cloud. In the current day and age, you’d have to be living under a rock to have not encountered it by now. Whether it’s the ads from <em>Amazon</em>, <em>Rackspace</em> or <em>Microsoft</em>, the extensions to your favourite framework, such as <em>SimpleCloud</em> in Zend Framework or <em>iCloud</em> from Apple – <strong>The Cloud is Everywhere!</strong></p> <p>But these aren’t the only options available to us as developers. In this series I want to introduce you to and help you get started with another cloud service - <a href="http://cloudcontrol.com/?utm_source=maltblue&utm_medium=Banner&utm_campaign=MaltBlue"><strong>cloudControl</strong></a>.</p>

Do you i18n?

April 5, 2010

<p>What’s your attitude to <strong>i18n</strong>? Are you not quite sure what i18n is? Well, according to <!-- raw HTML omitted -->Wikipedia<!-- raw HTML omitted -->, it’s:</p> <blockquote> <p><strong>Internationalization</strong> is the process of designing a software application so that it can be adapted to various languages and regions without engineering changes. <strong>Localization</strong> is the process of adapting internationalized software for a specific region or language by adding <a href="/wiki/Locale" title="Locale">locale</a>-specific components and translating text.</p> </blockquote>