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

Alfred Nutile:
Laravel Training: The Laravel Maven and the Laravel Novice
Nov 11, 2015 @ 11:09:22

Alfred Nutile has posted information about a series of Laravel-related training videos that aim to help you go from "Laravel 0 to Deploy" as they walk you through the creation and deployment of a simple blog based on the Laravel framework features.

The two of us come together in this raw footage of building a Blog in Laravel. You get both the insights of an experienced Laravel Software Writer (Alfred Nutile) and the questions of a WordPress developer new to Laravel, (Joe Bacal)

As of the time of this post there's four episodes in the series with more planned:

Other topics to come include working with Homestead, managing Gulp dependencies, creating a contact form and working with single page applications.

tagged: laravel training screencast introduction beginner video series blog application

Link: https://alfrednutile.info/trainings/laravel

Rob Allen:
The beginner's guide to contributing to a GitHub project
Sep 24, 2015 @ 12:08:10

If you've ever wanted to contribute to an open source project but didn't have any idea where to begin, Rob Allen has a few suggestions to help you get started. His guide is a bit more on the technical level than others that talk more about finding a project or community to be a part of, though.

This is a guide to contributing to an open source project that uses GitHub. It's mostly based on how I've seen Zend Framework, Slim Framework and joind.in operate. However, this is a general guide so check your project's README for specifics.

He walks you through a four step process to getting ready to contribute and make that first submission to the project of your choice:

  • Set up a working copy on your computer
  • Do some work
  • Create the PR (Pull Request)
  • Review by the maintainers

Naturally, some of this depends on the process that the project follows to take in new submissions, either from an issues list or just random buxfixes. It's a pretty standard GitHub-centric guide to follow though. He also recommends reading this article from Lorna Mitchell about code reviews and what the maintainers of most open source projects will look for in submissions.

tagged: beginner guide opensource github contribute project

Link: http://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/

How to create a PSR-4 PHP package
Sep 09, 2015 @ 10:55:01

In a tutorial posted to the Cullit.com site Philip Brown shows you how to create a PSR-4 compliant package that can be installed quickly and easily through Composer. The PSR-4 standard is a part of the set of standards defined by the PHP Framework Interoperability Group (PHP-FIG) to help make it easier to work with libraries and tools across frameworks and platforms. The PSR-4 standard replaces the slightly more complex PSR-0 to define a pattern for autoloading files.

A couple of weeks ago I wrote a tutorial on the general principles behind building PHP packages. In that article I mentioned the PSR-4 standard for creating PHP packages. In this tutorial I’m going to walk you through setting up the structure of a PHP package. By having an agreed upon structure for PHP packages we make our code a lot more interchangeable and reusable for the greater Open Source community.

He starts with the basics, creating a simple "nacho" directory in a git repository and introducing Composer (and the composer.json) briefly. He also talks about the "dotfiles" that are included with the use of Composer including a sample Travis-CI configuration. He then gets into the code and shows how to use namespaces, relate them to the directory names for autoloading and even writing a simple test or two. From there he talks about documentation and, finally, pushing the package up to GitHub and adding it to Packagist for others to download.

tagged: psr4 package composer packagist autoload tutorial beginner

Link: http://culttt.com/2014/05/07/create-psr-4-php-package/

PHP Object-Oriented Programming Beginner's Guide
Aug 12, 2015 @ 09:45:14

For those working to move from procedural PHP into a more object-oriented world but may be having some trouble with the transition, the Star Tutorial site has a great beginner OOP in PHP guide you should check out.

They cover all of the basics you'll need to get started with objects in PHP including:

  • classes versus objects
  • visibility
  • inheritance
  • polymorphism
  • interfaces versus abstract classes

Each section is a quick definition and a bit of code to help illustrate the point. This isn't going to be a hand-holding kind of tutorial showing you each step to making an OOP application. Instead, it provides quick, high level summaries of the main OOP concepts to get you on the right road.

tagged: oop object beginner concepts guide tutorial section concepts

Link: http://www.startutorial.com/homes/oo_beginner

Semaphore Software Blog:
Getting Started with Symfony 2
May 11, 2015 @ 10:35:57

The Semaphore Software blog has posted a new tutorial for those wanting to get into the Symfony2 framework and find out what it's all about. In this new tutorial they walk you through some of the basics of the framework and shows you how to get a basic first site up and running.

Symfony 2 has seemingly gained the attention of developers in recent times. Owing to the growing hype surrounding this framework, it is something that you ought to know about. A web application framework formed of reusable PHP components has been termed as Symfony. Symfony 2 is an updated version of this framework, and it enables developers to create websites and web applications with ease and convenience. The individual PHP components that set out to form this framework can be selected as per your design and development requirements. Let’s understand why Symfony is gaining popularity and why it should be used by you.

They start with the download and installation of the current version and where to place the resulting files. They briefly cover each of the main directories in the framework setup including a bit of sample code to illustrate. They then get into the bundling system and how it fits it with the overall ecosystem of your application, diving it up into functional "chunks". They show you how to register, configure and extend a bundle with some of your own functionality. Finally, the tutorial shows how to configure the database connection and run Doctrine to generate the table mappings.

tagged: gettingstarted introduction symfony2 beginner walkthrough

Link: http://blog.semaphore-software.com/getting-started-symfony-2.html

A Beginner’s Guide To Composer
Mar 31, 2015 @ 13:48:55

The Scotch.io site has posted a guide that can help you if you're just getting started in the world of PHP packages via Composer. In this new tutorial Daniel Pataki introduces you to the tool and how to use it to install the dependencies you need.

I’m sure there are plenty of coders out there who are wondering about the benefits of using composer and many who are afraid to make the leap into a new system. In this article we’ll take a look at what exactly Composer is, what it does and why it is a great tool for PHP projects.

He starts with the basics of dependency management, why it would be used in a project and how it automates the installation and integration of 3rd party libraries. From there he helps you get Composer installed and starts in on a sample "composer.json" configuration file. In his example he installs Monolog, the popular PHP logging class. He talks some about how to specify versions, locking down the dependency versions to install and installing "developer only" requirements.

tagged: composer package dependencies library introduction beginner guide

Link: https://scotch.io/tutorials/a-beginners-guide-to-composer

Anthony Ferrara:
A Beginner's Guide To MVC For The Web
Nov 24, 2014 @ 10:42:41

Anthony Ferrara has posted what he calls a beginners guide to MVC for the web, a tutorial that introduces to you the basic concepts behind the Model-View-Controller design pattern and how it should fit in with the SOLID design principles.

There are a bunch of guides out there that claim to be a guide to MVC. It's almost like writing your own framework in that it's "one of those things" that everyone does. I realized that I never wrote my "beginners guide to MVC". So I've decided to do exactly that. Here's my "beginners guide to MVC for the web".

He starts with his first lesson, his most important one really - you don't need "MVC" (the concept, not the pattern...he notes them differently). He then gets into what the MVC pattern actually is and describes each piece and how they fit together. Following that, he talks about "MVC" as a concept and how it's different from MVC, the design pattern (hint: the pattern describes one implementation of the MVC ideals). He talks about the role of state in the MVC structure and how the implementation of the MVC idea is slightly different in the various "MVC frameworks" out there.

There is a very useful lesson that MVC brings: Separation Of Concerns. Meaning that you should separate different responsibilities into different sections of your application. Separation of Concerns is a necessary step in dealing with Abstraction. Instead of latching on to MVC, latch on to abstraction. Latch on to separation of concerns. Latch on to architecture. There are far better ways to architect and abstract user interaction for server-based applications than MVC.
tagged: beginner guide mvc modelviewcontroller designpattern concept solid abstraction

Link: http://blog.ircmaxell.com/2014/11/a-beginners-guide-to-mvc-for-web.html

SitePoint PHP Blog:
PHP Streaming and Output Buffering Explained
Sep 04, 2014 @ 10:17:44

The SitePoint PHP blog has a new performance-related post to the site today from Imran Latif. This new post looks at effective use of output buffering and streaming and explains how it works and some examples of its use.

As a PHP developer, I was wondering whether we can have something similar [to Streaming in Rails] in our favorite language? The answer is yes – we can easily have streaming in PHP applications with little effort, but in order to get this right we have to become familiar with some underlying concepts. In this article, we will see what streaming is, what output_buffering is and how to get our desired result under different webservers (Apache, Nginx) and PHP configurations (CGI, mod_php, FastCGI).

He starts off with a comparison of the two different methods, streaming and output buffering, and how they behave in the output of content. He then gets into some simple examples with PHP with various methods: a simple delay, chunking up output and finally using the actual output buffering handling PHP offers. He also includes an example of streaming content over an Ajax request with a simple test using the sleep function.

tagged: streaming output buffering tutorial introduction beginner ajax

Link: http://www.sitepoint.com/php-streaming-output-buffering-explained/

Dawn Casey:
Things Developers Say
Jun 05, 2014 @ 09:13:45

In this new post from Dawn Casey (wife of the infamous Keith Casey) she talks about some of her "growing pains" around becoming a new developer and the learning process. She's come up against some interesting problems in the course of her learning, both good and frustrating.

In the course of my learning development (seven months at this point) I’ve heard quite a few things from other veteran developers, all of whom were trying to be helpful. Or I’d ask a question and get one of these things in response because it makes sense to *them*…they don’t realize I have no point of reference. [...] I’m frustrated because they can’t explain whatever it is I don’t understand..mostly because I don’t understand exactly what it is I’m not understanding.

Her frustration comes not only from not being able to ask the right questions, but also from being a "blind deaf alien" thrown into the world of development. She point out an issue common to those trying to get into programming: the wealth of information one needs to know before getting started. She also mentions another common problem, particularly for new developers (or those looking to improve one certain skill): the sometimes unhelpful nature of other, more experienced developers. While some are happy to help and guide you through the learning process, there's others that will just toss you a tutorial link and call it a day.

Here’s the gist of what I’m saying: There is so much back-knowledge needed to be a web developer today that many are derailed for months trying to learn everything they need to know before they can learn anything at all. PLEASE REMEMBER THIS!!
tagged: developer beginner experience opinion help learning

Link: http://sdawncasey.wordpress.com/2014/06/04/things-developers-say/

SitePoint PHP Blog:
How to Use the JsonSerializable Interface
May 05, 2014 @ 11:50:28

Matrin Hardy has a new tutorial posted to the SitePoint PHP blog today showing you how to use the JsonSerializable interface to work with objects and converting them to JSON.

Over the past few years JSON has taken over as the king of data interchange formats. Before JSON, XML ruled the roost. It was great at modeling complex data but it is difficult to parse and is very verbose. [...] I think we could all agree that writing less code that in turn requires less maintenance and introduces less bugs is a goal we would all like to achieve. In this post, I’d like to introduce you to a little known interface that was introduced in PHP 5.4.0 called JsonSerializable.

He splits the rest of the post out into three different parts: the "ugly" method of converting a sample Customer object into a JSON string (through an array), the "bad" method using a "toJson" method and finally the "good", implementing a class that implements the JsonSerializable interface for easy JSON-ification.

tagged: jsonserializable interface tutorial introduction beginner

Link: http://www.sitepoint.com/use-jsonserializable-interface/