Speaking at Sunshine PHP

 Posted by on February 2, 2013  General  No Responses »
Feb 022013
 

Edit: This event has now passed — I’ve posted the slides for this talk here.

If you haven’t noticed the badge on the side of my blog, I’ll be speaking about modules in Zend Framework 2 next week at SunshinePHP in Miami.

With an incredible line-up of speakers such as Cal Evans, Fabien Potencier, Rasmus Lerdorf, and many more, this is going to be a conference you won’t want to miss.

Register for SunshinePHP today!

Jan 182013
 

During a code review last week, one of my clients mentioned that they were looking into alternatives to Zend_Form for their ZF1 application. They were looking for something that was easier to use than ZF1′s Zend_Form for their developers, and could easily be used with Twitter Bootstrap form markup without having to deal with decorators. Without giving it much thought, I suggested that it might be possible to take advantage of the new Zend\Form from ZF2, which would easily meet their needs, and there’s a ton of Twitter Bootstrap modules for ZF2 that easily make your forms Bootstrap-friendly.

This got me thinking… How difficult would it be to create a sort of compatibility layer enabling ZF1 applications to take advantage of ZF2 features and modules without refactoring the entire application for ZF2? Well, as it turns out, not very difficult. Allow me to introduce ZF 2-for-1.

Simply install ZF 2-for-1, and you can instantly use many of the great new ZF2 features right inside of your existing ZF1 applications. It’s even capable of loading ZF2 modules. Of course, not all ZF2 modules will “just work” with ZF1 using ZF 2-for-1, but some simple modules should work just fine. As ZF 2-for-1 improves, more and more modules will likely become compatible.

Properly excluding IDE-specific files with Git

 Posted by on November 5, 2012  General  3 Responses »  Tagged with:
Nov 052012
 

We’re all familiar with the various project-related files that are thrown into our working directories by IDE’s and the various tools we use.

It’s very tempting to just start throwing things like .settings/, .idea, .project/, etc into the project’s .gitignore file as you run across them, and unfortunately, many projects do this. However, Git provides a much more elegant solution for this: global excludes files.

Continue reading »

Upcoming ZF2 talks

 Posted by on September 10, 2012  General  4 Responses »
Sep 102012
 

Edit: All of these events have now passed.

October is going to be a busy month for me. I’ll be giving quite a few ZF2-related talks and tutorials. If you can make it (or get your employer to send you), I highly encourage you to attend PHPNW12 or ZendCon. If you can’t make either, be sure to check out the free ZF2 ModuleManager webinar which I’ll be giving on October 10th.

Continue reading »

ZF2 Training at PHPNW12

 Posted by on September 10, 2012  General  No Responses »  Tagged with: ,
Sep 102012
 

I am very excited to announce that Rob Allen and I will be presenting a full day tutorial on Zend Framework 2 at PHPNW12 in Manchester, UK.

With Zend Framework 2 released, this tutorial will walk you through building a complete ZF2 MVC application from the ground up. Starting with the ZF2 skeleton application, we’ll discuss how and why it works and look at the core components used. Specifically, I’ll ensure that you understand how ZF2′s service manager, dependency injector and event manager are used with the HTTP and MVC components as the foundation of a ZF2 application. We will also look at how to use and install pre-existing modules, while also creating our own modules during the tutorial. Grab your laptop and come learn all about the new ZF2 MVC, event manage, robust module system, and more.

Head over to the tutorial page and buy a ticket now!

Why Zend Framework

 Posted by on September 7, 2012  General  30 Responses »  Tagged with: ,
Sep 072012
 

Fabien Potencier just wrote an interesting post where he outlines what he believes to be the selling points of the Symfony project. First, let me point out that all of his points are 100% valid, and there’s no doubt that Symfony is a great framework. I have great respect for Fabien and the Symfony project as a whole.

That said, my concern with Fabien’s post is that usually “selling points” for something imply that they are things that set something apart from the alternatives. Now, I’m sure Fabien had no ill-intentions when writing his post, but I do worry that some may misinterpret his post as a list of things that set Symfony apart from Zend Framework or other frameworks, which is simply not true.

Allow me to address each of Fabien’s points from Zend Framework’s perspective:

Continue reading »

Q&A about software engineering

 Posted by on August 23, 2012  General  9 Responses »
Aug 232012
 

This morning I got an e-mail from a 10th grade student asking me some questions about software engineering for a school assignment. I found his questions to be well-posed and thoughtful, so I figured I’d post my responses as a blog post. I’ll be sending this post to Jordan, so if anyone has additional comments or advice for the kid, please feel free to leave some wisdom in the comments!

Hello. My name is Jordan *******, and I’m a sophomore at ******* High School in Indiana. While browsing around Google, I saw your resume for being a software engineer. This intrigued me because I love to mess around with computers, mostly on the software level. I’ve been programming websites in PHP/JavaScript/HTML for about a year now, and more recently (approximately 6 months ago) began writing a video game with some friends using C#, JavaScript, and even a little C++. It’s been an enjoyable project. The real reason I’m contacting you though is this term for school we were assigned to research a field of engineering. I happily chose to research software engineering, and am seeking information from professionals like yourself to enhance my report. Attached to this email is a Word document with several questions about software engineering that I was hoping you could answer. I would greatly appreciate if you could email me back within the next week, because your answers would not only help my report, but also be very interesting.

Continue reading »

Disabling the layout in Zend Framework 2

 Posted by on August 16, 2012  General  6 Responses »  Tagged with: ,
Aug 162012
 

Sometimes you need to disable the layout for a specific action. To do this, you simply set the view model that your action returns as “terminal”. This tells ZF2 not to wrap the returned view model with a layout.

<?php
 
namespace Application\Controller;
 
use Zend\Mvc\Controller\ActionController;
use Zend\View\Model\ViewModel;
 
class IndexController extends ActionController
{
    public function nolayoutAction()
    {
        // Turn off the layout, i.e. only render the view script.
        $viewModel = new ViewModel();
        $viewModel->setTerminal(true);
        return $viewModel;
    }
}

More examples can be found in Rob Allen’s ZF2TestApp.