Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Coding.bmail.net Blog:
Advanced logging system in PHP for careful developers
Aug 05, 2015 @ 12:19:51

On the Coding.bmail.net blog they've posted a guide to what they've called an advanced logging system in PHP for careful developers - essentially a logging system that's as "error proof" as possible and that works with as little user exposure as possible.

Being aware of all the activity and problems under the hood is essential when running big websites with lots of users, many features and, as it is usual in such cases, weak spots that must not be left untracked.

In order to be the first in knowing when errors or other events of interest happen we need a well designed logs manager. My code will provide such a feature, for PHP based websites.

They briefly outline how the complete setup will work, failing back to email if the database connection isn' available and logging based on environment. It also includes error levels and, on development only, a method for showing the errors being logged. While a good bit of this functionality could be handled by something like Monolog they do include some additional features like the email fallback, output of the errors in development mode and custom error/exception handlers.

tagged: logging advanced system custom database email environment tutorial

Link: http://coding.bmain.net/tutorials/php/advanced_logging_system_in_php_for_careful_developers

SitePoint PHP Blog:
Symfony2 Pre-registration and Invite System
May 07, 2015 @ 08:25:48

The SitePoint PHP blog has kicked off a new series of posts today with part one of a set of tutorials showing you how to create a registration and invitation system with Symfony2. While they've talked about general Symfony2 development before, this series will focus more on the security side, on authentication and authorization.

In this article series of two parts, we are going to talk about a very important area of web application development: Authentication and Authorization. Symfony2 has a very detailed elaboration of these two topics in its official documentation. Anyone who is seriously looking into this is encouraged to read through that official document after absorbing the essentials from this tutorial.

The author starts with a brief list of common user management tasks including registration via a form, sending confirmation emails and verifying the user's login. He helps you create the underlying "user" table (complete with the SQL) and talks a bit about the contents of a few of the columns. He includes the settings you'll need to put into your "security.yml" configuration file and a bit of detail on what each section and its settings mean. He then moves on to the "User" entity and class file, adding some functionality to the standard generated class. He also includes the code needed to create the invite and registration actions.

tagged: registration invite system symfony2 tutorial user management authentication authorization

Link: http://www.sitepoint.com/symfony2-pre-registration-invite-system/

SitePoint PHP Blog:
Introducing OctoberCMS – a Laravel-based CMS
Nov 19, 2014 @ 09:22:00

On the SitePoint PHP blog there's a recent post taking a closer look at the OctoberCMS, a content management system based on the Laravel framework. In this new post they walk you through what the CMS is, the features it has to offer and help you understand (and add to) the different kinds of elements.

October CMS is a lightweight, back to basics content management system built on Laravel, and on a mission to make your web development workflow easy again. It boasts a very simple and fast learning curve, with a guarantee that you’ll be off the ground and up and running in no time at all. It’s scalable and extensible through the plugin system, is easily maintainable through its file-based system, and allows for the effortless creation of administrative back-end interfaces. Before we dig a bit deeper into this promising CMS, let’s look at the foundation a bit.

They walk you through the install (from their GitHub repository) to get a sample site up and running. The tutorial then goes through each of the basic sections, explaining what they are and providing example code where appropriate:

  • Themes & Templates
  • Pages
  • Partials
  • Layouts
  • Content Blocks
  • the AJAX Module

They also talk about extensibility via plugins and components and link to more information for those looking for more detail.

tagged: octobercms laravel introduction cms content management system

Link: http://www.sitepoint.com/introducing-octobercms-laravel-based-cms/

Cal Evans:
"Delivery Initiated" A word on having empathy for the users of your software
Oct 08, 2014 @ 09:24:37

In his latest post Cal Evans reminds us, as software developers, that our jobs aren't always about making the things we create about the best code or most tech. It's also about having empathy for users of the software you're building.

I learned something very important in all of [the troubles I had with traveling to Amsterdam], I learned that we as software developers and designers need to have a great deal of empathy for the people using what we build. It is not enough to put yourself in your user’s shoes, you have to put yourself in their mindset. You have to design every user interaction with an understanding of not only who is using your software, but why they are using it.

He focuses the rest of the post on his experience post-delay, trying to get an update on where in the world his luggage might be via a URL given to him by the lost luggage group. He comments on the terseness of the message he was given on the page ("Delivery Initiated") but points out that it's not overly user-friendly and really doesn't give much information. He suggests that the developers of the tool didn't actually think about end users, just that they should share a status and that's all.

It is not enough to create personas and figure out who is using your software. You need to understand why they are using it, and what their mindset will be when they are using it. You need to have empathy for your users.
tagged: user empathy system opinion travel luggage delivery

Link: http://blog.calevans.com/2014/10/07/delivery-initated-a-word-on-having-empathy-for-the-users-of-your-software/

SitePoint PHP Blog:
Introduction to Kirby CMS
Apr 28, 2014 @ 13:48:31

The SitePoint PHP blog has posted a new article introducing you to Kirby, a database-less content management system that's all file based.

Kirby is a lightweight CMS that probably fits somewhere between feature-rich platforms such as Drupal, and static site generators such as Jekyll. What makes Kirby quite different to most CMS’s – and closer to Jekyll in the process – is that it has no database. Instead, everything is stored as files; some for configuration, some for content – all in addition to the usual template files, partials and plugins. In this article I’m going to take a look at Kirby, demonstrate how to use it, and assess some of its strengths and weaknesses.

He walks you through the download and installation process and provides a general overview of the structure of the application and how it works. He gets into the specifics of theming the site to match your own look and feel, shows you how to use "kirbytext", a custom extension of Markdown. He also briefly covers plugins, the main panel and some of the pros and cons of using the system.

tagged: kirby cms content management system file

Link: http://www.sitepoint.com/introduction-kirby-cms/

SitePoint PHP Blog:
Selling Downloads with Stripe and Laravel
Oct 24, 2013 @ 12:17:30

On the SitePoint PHP blog there's a new tutorial posted showing you how to integrate Laravel and Stripe to make a simple system for selling downloads of software. Stripe is a developer friendly, easy to use payment system that helps you take and manage payments.

Digital goods are an increasingly valuable commodity. [...] In this article I'll show how you can implement a simple store selling digital goods using PHP along with Stripe, a payment provider who aims to make it easier than ever to take online payments since you don't need to set up special merchant accounts or deal with complex payment gateways.

He points you to the Stripe site to set up an account before getting started. With that in hand, They start in on the Laravel setup and project creation. He helps you make a "downloads" table to handle path to the file and price. Also included are the model for the Downloads and a "seeder" with some fixture data to work with. From there he shows how to make a simple home page and a "buy" page with a form for the payment information. The Stripe javascript library is then integrated and the response is handled. If it's a success, the user is then forwarded to another endpoint to download the file they paid for.

tagged: download stripe laravel tutorial payment system

Link: http://www.sitepoint.com/selling-downloads-stripe-laravel/

Kevin Schroeder:
More - The file system is slow
Sep 30, 2013 @ 10:44:29

As a follow-up to his previous article about the (minimal) overhead from logging, Kevin Schroeder has this new post focusing on the common belief that writing to the file system is the slowest method.

I had a conversation the other day by a person I respect (I respect any PHP developer who knows how to use strace) about the cost of file IO. My assertion has been, and has been for a long time, that file IO is not the boogeyman that it is claimed to be. So I decided to test a cross between those two posts.

His test was to write one million log records to two different sources - the normal physical file system, a RAM drive - one run with a file handle that's left open and the other with a new handle each time. He shows how he made the RAM drive and the PHP he used for the test (running in a VM). He graphs out the results with some interesting results...but you'll have to read the post for that.

tagged: file system slow write log overhead benchmark ramdisk graph

Link: http://www.eschrade.com/page/more-on-the-file-system-is-slow/

PHP and the i, Part 1
Jan 17, 2013 @ 13:50:19

On PHPMaster.com there's a new article that looks at running PHP on a specific environment and some of the considerations the author had to make - using PHP on IBM i.

We’ve talked about a lot of weird things so far on PHPMaster (well, at least I think some of them are weird), but this may take the cake. In this series I want to talk to you about PHP – and the IBM I. That’s right, the IBM i, formerly known as System i and before that as the AS/400. Let’s start by dispelling the myth that the i is dinosaur; it’s actually a very wonderful machine, and there are lot of opportunities for brave PHP programmers who venture into this realm.

He starts off with "the truth" about the IBM i and some of the features it brings to the table - total system integration, scalability, etc. He talks some about the current GUI the system uses, functionality RPG provides, and some concepts you'll need to think about before getting into PHP on the IBM I.

tagged: ibmi systemi as400 system platform introduction


Paul Jones:
New Aura System Release, Including Aura.Framework and Aura.Demo
Dec 19, 2012 @ 11:06:02

The Aura framework project has released a set of updates to several of their packages including the main Aura.Framework and Aura.Demo functionality.

Late last night we released version 1.0.0-beta4 of the full-stack system, which composes all the independent Aura packages into a coherent framework using the Aura.Framework package in a project skeleton. We have extracted the “hello world” portions into their own Aura.Demo package so that it can be removed or disabled when you begin your project. Download it and take it for a spin!

There's been a lot of talk recently about the Aura framework and its "less dependencies, more separate packages" approach to making the framework including these posts from Paul Jones and others.

tagged: aura framework project system release demo application


Two More Non-Mainstream Databases for PHP Apps
Aug 20, 2012 @ 08:48:19

New on Dzone.com today they've posted the third and final part of their series looking at lesser known databases systems you might want to use in your application. In this latest article they cover eXist DB and Hypertable.

Welcome to the third and final part of the series in which we look at five alternative databases you can use with PHP apps you might not have heard of. [...] In this final part of the series, we’re going to finish up by looking at two outstanding, yet markedly different, databases: eXist DB and Hypertable. So let’s get started.

As in the other two parts of the series, they include a brief overview of what each database is and some sample code showing it in use (and what you'll need to install to use it).

tagged: mainstream database system existdb hypertable