PHP Interview With Matthew Weier O’Phinney Project Lead of Zend Framework – Read Code, Ask questions, Write Lots Of Code & Be Humble

About This Interview

This is the #21st set of PHP Interview to help aspiring PHP developers and PHP fans alike to get inspired by listening from those PHPeople who are already highly involved into the PHP Ocean and *being there* taming the waves and surfing better than ever to make themselves an Awesome PHP Expert both in their own eyes (for self-accomplishment) and for the PHP Community.

On the other side, this is an opportunity for new PHPers to get to know their “PHP Elders. I hope you will derive as much fun to read my interviews as I’m having by interviewing those awesome PHP people.

A Small Intro..

Matthew Weier O'Phinney Project Lead Of Zend Framework
Matthew Weier O’Phinney Project Lead Of Zend Framework

In this edition I talked with [Matthew Weier O’Phinney @weierophinney], the project Lead of Zend Framework at Zend Technologies Ltd. He is to the Zend PHP Community what Sir Alex Ferguson is to the Manchester United Football’s Community. And Cal Evans (Icon Of The PHP Community) calls him the Supreme Allied Commander of Zend Framework, and that is NO small thing!

Matthew has been a speaker at so many PHP conferences and user groups. He also regularly performs and host webinars, the last one (if I’m not wrong) was about ZF2, which I missed out unfortunately. You will find more details about all those presentations on his personal blog here.

I would like to express my humble THANKS to Mr Matthew Weier O’Phinney for allocating time for my interview considering that the last couple of months have been real crazy and busy for him (as most of us knows). So, Supreme Allied Commander, I convey my Salute!

And Now The Interview…

>> Please tell us a bit about yourself

I’m a developer and project lead, which means I split my time between communication and project management, and coding. Interestingly, I find my coding more and more to be code _review_; I review and merge far more code than I write anymore.

I am a husband, and a father of two wonderful children. We have a juvenile Basset Hound who both drives us crazy and makes us happy. When I get a chance, I brew beer, a hobby I’ve practiced off an on for most of my adult life. I love to read, with my tastes ranging from classics of English literature to modern novels to graphic novels. I garden with my wife, occasionally play video games with my kids, and enjoy walking and hiking. I’ve worked in fields ranging from construction to trail building and
maintenance; graphic design (primarily in print) to web application development. To crib a phrase from Douglas Adams, I’m just this guy, you know?

>> How you started with PHP

I’ve been programming off and on since I was in Junior High in the mid-eighties. I started with Apple II and Commodore 64, and I know I used a TRS-80 a few times. We couldn’t afford a computer ourselves until around ’87 or ’88, so I relied on friends, family friends, and the school computer lab to get my “fix”. My dad did a ton of research to determine what computer would be best and most affordable for us, and we ended up getting an Amiga 1000 — and, as we later discovered, one of the first 1000 of them, which
were all signed on the inner case by the engineering team. While I continued programming (in gwbasic and pascal), the Amiga allowed me to also pursue another area of personal expression: music. I had the computer hooked up to a cheapie Casio keyboard, a friend’s drum machine, and sampled anything I could.

When I went to college, my goal was to get a major in computer science, and either a minor in music or a double major in music, and then write scores for movies using computers. Instead, through a convoluted series of events, I ended up with a degree in (comparative) Religion and a minor in Mathematics. At some point I swore I’d never work with computers, but within a year of graduating, I was doing computer-based graphics and making my first forays into HTML and CGI programming in Perl.

In 2000, I was working at a small publishing company, primarily as a graphics technician, but also responsible for our computer networks. We’d moved to a brand new office, and I’d setup a brand-new, Microsoft-based network. One part of the move was also severing ties with our ISP and website provider, as we’d discovered that the mail-order software we were using had optional plugins for running an ecommerce site via IIS.

In order to customize the site, I learned some (classic now, but at the time, all you could get) ASP. Eventually, my boss wanted visitors to be able to publish reviews of books, so I did some research and ended up learning enough Perl to get the job done.

In doing so, I realized I’d really missed programming, and started looking at switching careers. PHP was just starting to become a hot language, and we had several firms in my home town that were growing rapidly and looking for PHP developers. I taught myself PHP while my wife was on bed-rest before our first child was born, and in between feedings afterwards. In 2001, I was hired by one of those companies, and I started working in the field professionally. While I’ve used Perl significantly, PHP has been a common
thread throughout my programming career, and the primary language I’ve used in the last 10 years.

>> The relationship between You and The PHP Community comprises..

In 2003 or thereabouts, I started following the php-general mailing list, originally to ask questions. Very quickly, I started also answering questions, and was very active on the list for a couple years.

Around the same time, I started blogging, mainly to record solutions to problems I’d had, so I had a record. In doing so, I started keeping track of other PHP blogs, and discovered [phpdeveloper.org @phpdeveloper] and Planet PHP. I started commenting on blog posts, and occasionally responding to posts via my own blog. Through that activity, I met some great folks — in particular, [Paul M. Jones @pmjones].

In 2005, as a reward for finishing an important project, the company I was working for sent myself and my manager, Rob, to php|tropics. This was a huge catalyst for me. I got to meet a number of folks whose books I’d read, or with whom I’d had email, blog, or other exchanges online — including Paul! One evening, Paul, Rob, and myself were having a nice discussion around one
of the tiki bars, when a group that included [Wez Furlong @wezfurlong], [Jason Sweat @sweatje], and a few others came by, and we spent the rest of the evening talking PHP.

In July, I was interviewed for a job at Zend, because of my activity on php-general and my blog. And from there, it just snowballed — a year later, Andi asked me to form a working group for rewriting the ZF MVC layer, and that work led to a job on the ZF team, and later leading the team. I’ve spoken at more conferences than I can remember at this point, co-authored two books, written magazine articles, and blogged, blogged, blogged.

For me, the PHP community is a group of folks who want to help each other improve, and I’m proud to be a part of it, in whatever way I can.

>> How do you find PHP now as compared to when you first started

More cohesive, more structured, and more feature-ful.

When I started, PHP 4 was relatively new, and the big deal was the new OOP layer. But OOP in PHP 4 compared to PHP 5.4 is like comparing a Model T to a modern car — sure, there’s some commonality, but the modern vehicle has some amazing improvements that make it more efficient and powerful.

In particular, features like Closures, Namespaces, Late Static Binding, and Traits have radically changed how we can extend and alter the workflow of our applications. The SPL, ext/intl, and DateTime have made operations that required the use of libraries previously simple and fast. Some may see these as syntactic sugar, but to me, they make the difference between making the language hum versus sing.

>> Based on your experience, what are the good and bad parts of PHP

As I mentioned in the previous question, Closures, Namespaces, Late Static Binding, Traits, and the SPL give us some powerful tools to perform complex operations and create complex interactions simply. The plethora of features available in the language — the fact that there’s an extension for just about anything — make it one of the most flexible languages I’ve encountered.

That said, there’s a price for such flexibility — the shear number of available functions and classes is staggering, and due to the length of time that PHP has been around, there’s a huge amount of inconsistency in how different extensions work. New language additions don’t always work with old paradigms — for example, while we have ArrayAccess and ArrayObject, you can’t use them with any of the dozens of array functions.

On top of that, in order to keep things simple, a lot of choices for defaults are, unfortunately, quite insecure. The way PHP streams work with SSL/TLS is abominable, and the fact that escaping data for presentation is so tricky makes writing secure applications a minefield. I would love for PHP to be secure by default.

>> What would be the Top advice to a PHP beginner

Read code, ask questions, and write lots of code. And be humble.

Just like reading and writing in your native language, you improve only with practice. If you want to write great code, you need to read great code. And most often, you have to ask questions — why were certain choices made? If I were to write it this way instead, what are the consequences?

There’s a ton of OSS PHP out there — pick a project of interest to you, and start reading it. Contribute back if you can, and take every bit of feedback, understand it, and incorporate it into your toolbox.

Anytime you gain skill, it will be easy to say, “my code is better than theirs,” and to dismiss feedback. Don’t. There’s always something to learn, and often even those less experienced can point out things that could be better, or which could be more user friendly.

>> To someone who wants to become a better PHP developer, what is your advice?

The same advice I have for a beginner applies to any developer. Read, question, and write. Don’t assume you’re better, or that your opinions or knowledge are superior; there’s always room for improvement. If you disagree with feedback you receive, question if your disagreement is because the feedback is wrong, or because your ego is hurt.

>> In the next 5 years, how do you foresee the PHP ecosystem

I think more and more often, PHP will be primarily used to code web service APIs. We’re already seeing this trend, particularly with the huge trend towards mobile applications. Those applications need some way to store and manipulate data, and that’s via web services.

That also means PHP will be deployed primarily to the cloud. As such, you will need to know what the various cloud services are, and how to work with them. You’ll have to work with queuing services, because whenever you work with a networked system, you have to worry about latency and network failures — meaning that your code must be resilient in the face of failures.

Instead of books on “Mysql and PHP”, you’ll be seeing more books talking about PHP working with different web and cloud services, as well as with non-RDBMS persistence systems. I’ve maintained for several years now that the next-generation CMS and eCommerce platforms will be using NoSQL systems for content and product descriptions, providing greater flexibility and performance.

>> The best PHP book you’ve read

To be honest, I’ve not read many PHP books from start to finish. The one that made the most profound impression, though, was [Jason Sweat @sweatje]’s “Guide to PHP Design Patterns”. It struck me for two reasons:

  • It was my introduction to programming design patterns
  • It was my introduction to unit testing

In fact, one of the tutorials I attended at php|tropics was Jason’s design patterns tutorial. The most impressive part at the time was the fact that he introduced each pattern by writing a test. It was the first time I’d seen Test Driven Development in action, and it opened up my eyes to how the practice is done, and how powerful it can be.

>> A PHP blog or resource you highly recommend

I’ve subscribed to [phpdeveloper.org @phpdeveloper] and Planet PHP since 2003 or 2004. These two sources have provided me with a ton of insight into how other developers use the language.

>> The IDE that you use

Unix.

You’d think that working at Zend, I’d use Zend Studio. (The Studio team sure wishes I did!) But I started using Vim in 2001. We were leaving on a trip to my in-laws, and I wanted to be able to access my email. I didn’t have a webmail solution in place for my self-hosted mail domain, so I decided I’d try out mutt. However, mutt defaults to vim, and I didn’t know vim, so I decided, a week before leaving, to learn vim. I sped through the vimtutor, and forced myself to use vim for all text-related tasks that week so I’d be comfortable using it over SSH. And I’ve never gone back.

The Unix philosophy is to write tools that do one thing well, and let them both manipulate incoming streams as well as pipe output to a stream. This allows you to perform an infinite number of tasks simply by piping from one stream to the next. I write code in vim, and pipe it to a linter to ensure it’s valid. I send the current file as an argument to PHPUnit to run tests. I pass a selection to the “sort” command to sort arguments. If I want code completion, I run a command (ctags-exuberant) to introspect my code, and vim then uses this for completions and hinting.

In short, the Unix philosophy and Vim are a powerful combination, and they let me get things done. (I’m writing this in Vim now)

>> How do you debug your PHP code?

I am in an unusual position when it comes to PHP. I don’t typically write client-facing code; I write libraries that others consume. As such, my debugging tools suck — XDebug and Zend Debugger assume you’ll trigger a debug session from a browser-based request, and really don’t work well from the CLI. I don’t have the option of a step debugger.

So, I have to use the poor man’s tools of echo, var_export, var_dump, printf, and whatnot. However, I’m typically using them in combination with PHPUnit — I’m running tests, and know what code I’m exercising. This allows me to strategically place such statements, which allows me to usually very quickly isolate issues.

One other tool I use aids me a lot in this: tmux. tmux is a terminal multiplexer, similar to screen, but with an important extra capability: any given screen can also contain additional panes. As such, I usually have my screen split into two panes: the one on the left takes up around 2/3 of the screen, and has Vim in it, with multiple vim panes for my code and tests; the right 2/3 is a terminal in which I run PHPUnit, which allows me to see the results of tests, and scroll through errors and failures so that as I
edit my code and tests, I know where exactly to place debug statements.

>> A PHP framework you use and would recommend

Obviously, Zend Framework. More specifically, Zend Framework 2, as it allows you to install as little or as much as you need.

But when it comes down to it: research. Identify the needs of the application or project you’re working on, and then evaluate the various frameworks to see which best suits your needs, as well as your programming style. It may be that you need to choose multiple frameworks, for different capabilities. Or start with a microframework, and add capabilities from other frameworks or libraries.

>> A CMS that you think is worthwhile

I’ve done way too much with CMS systems over time to be able to recommend any, to be honest. Each has different strengths, and equally different weaknesses. Any choice you make has to be based on the specific requirements you have, and the skills of your team.

>> An E-Commerce cms you recommend

I haven’t had much experience with e-commerce platforms, to be honest, and don’t feel qualified to make a recommendation.

>> A unit test framework you recommend

PHPUnit. I know others exist, but I’ve been using PHPUnit for more than a half-decade, and appreciate the breadth and depth of features it offers. If you use it, learn it well — learn what all the assertions are, so that you use them to full advantage. Use data providers. Learn how to test for exceptions.

>> Your LAMP stack comprises.. ?

I use Ubuntu as my preferred operating system. I’ve tried probably a dozen or more linux variants over the years, and found that Debian-based systems are the easiest for me to manage. Ubuntu provides very nice ease-of-use features for end users, and I’ve stuck with it the longest of any distribution (six years and more).

For work, I have to test on PHP 5.2.4, PHP 5.2.latest, PHP 5.3.3, PHP 5.3.latest, and PHP 5.4.latest; I have hand-compiled versions of these, with various extensions, so that I can run tests on each version for ZF and ZF2. I have one of the PHP 5.3 versions compiled with Apache 2 support, and the PHP 5.4 version compiled with PHP-FPM so that I can test both 5.3 and 5.4 on
Apache.

My personal web server is running Zend Server, with PHP 5.3. I’m planning on experimenting with nginx and PHP-FPM soon, however, as it seems like a powerful combination. Since my personal site has a nice mix of static and dynamic assets, I’d love to see what the combination can do.

I don’t have an “M” in my lamp stack currently. My website runs off a combination of PHP configuration and cronjobs, and I have no need for a database. I’ve used MySQL, PostgreSQL, CouchDB, MongoDB, and SQLite fairly heavily in the past, however. You choose your persistence based on what your project needs, I find.

>> One PHP person that you admire and what strikes you about him/her

[Sean Coates @coates]

Sean has been active with PHP for longer than I’ve been working with the language. I appreciate his ability to dive into new technologies and take the time to truly understand them in depth before making a judgment on their usability for his purposes. On top of that, he appears to have the work-life balance under control, dividing his time between his technological pursuits, and his more mundane pursuits of home brewing, cooking, and more. I think the balance he’s struck helps make him a better developer, as it provides perspective, and helps him look at what’s most important in each of his endeavors.

>> One function that you like (or which you tend to use frequently)

It’s not a function, but a class: SplPriorityQueue. This class makes a common task I have incredibly simple: sorting a list by priority, and iterating over it. I wish I’d had this back in the early 2000’s.

>> One PHP Community that you recommend

You mean there’s more than one? Seriously, the PHP community is whomever you meet who writes and uses PHP, and with whom you can have a conversation. If that person is next door; great; if they’re an ocean away, great. The more developers you can meet, the better. But you’re all part of the same community, regardless of what framework, CMS, eCommerce system, or other applications you may develop for most frequently.

>> Which was the worst programming mistake you did?

There are so many, it’s hard to choose just one. I’ve deployed development code to production, committed files with debug statements, hard-coded test values, written and released forms layers, and so, so many other things. We all do; nobody is perfect.

>> Do you recommend using database layers and ORM? If yes, what database “framework” you would recommend?

I do, actually; I feel using the low-level connections PHP offers is limiting in terms of migration, and often requires more coding than a good abstraction layer can provide. A good abstraction layer will be secure by default, helping prevent SQL injection, and provide a fluent, easy way to generate queries. Yes, if you’re a SQL guru, they may get in the way; most of us aren’t SQL gurus, though.

ORMs are a different beast. I think they can be tremendously powerful, as long as you have a truly data-intensive application, and tons of data relations. Doctrine 2 is a phenomenal project, if that is the case.

For most of the projects I’ve had, however, data relations tend to be minimal, and more often than not, I’ve found I’m starting to consider non-RDBMS persistence. As such, ORMs are not always the right answer.

Which takes me back to the same advice I gave for frameworks: know the requirements of your project, and research the possible existing solutions, and decide which, if any, are a good match.

>> Could you briefly tell us about your responsibilities at Zend and the challenges you face?

I’ve been Project Lead for Zend Framework since 2009 — 3.5 years now, a little over half my tenure at Zend.

My primary responsibility is keeping momentum flowing on Zend Framework itself, shepherding in new features and maintaining the code that currently exists. That means, basically, interacting a ton with the Zend Framework community of users and contributors, and trying to keep them happy.

I also work with other Zend teams to provide integration between different products, assist with development of the training courses and certifications, and provide feedback on new product features.

My biggest hurdle to all of this is keeping organized. What features and fixes are slated for what releases? What teams need feedback, and who is most qualified to provide that? What feature and or fixes are most desired by Zend customers or ZF users? It’s difficult to manage, and I find I’m constantly evaluating different tools and workflows to make juggling the responsibilities easier.

However, communication is the biggest challenge I face, both as a manager and as a developer. Working with people around the world, you lose nuances of physical expression, and must learn to read between the lines for intent — and ensure your own intent is clear. This is true of both the written word and code.

Imagine trying to shepherd in the contributions of literally hundreds of developers, most of whom speak English as their second or third language and whose fluency varies, most of whom carrying a fair bit of pride in their work, and trying to keep some sort of cohesive structure to it all. That’s my job. I couldn’t have a better one.

>> Could you tell us what are some of the best practices you believe in and would strongly preach to anyone

Test.

I hear a lot of folks say, “testing is too hard,” or “testing takes too much time.” I call bullshit. (I’m sure [Chris Hartjes @grmpyprogrammer] would, too.)

If you can write code, you can test. And if you’re not writing tests, how do you know when you’re done? or when you’ve fully captured the specifications for your project? How do you know the new feature you introduce, or the new bugfix you write, doesn’t break existing functionality? Quite simply, you don’t.

Testing is easy. It allows you to play with the code before you actually write it, which makes it possible to discover what APIs are more intuitive, and what collaborations you might need. The best work I’ve ever done has all been test-driven.

>> One of the pillars of Zend Framework is best practices:- “how easy is it and how difficult is it” to make your Dev team adopt those best practices? And how is the response of the dev team for this “way of coding”?

It’s funny, but over the years, I’ve come to hate the term “best practices.” Most of the “best practices” I’ve given talks on, or read about, are really simply standard, baseline development practices. You should write tests — it’s just a really, really good way to keep your development sane. Usage of a version control system is non-optional. Code should be documented; it makes discovery and understanding easier by end users.

My team is a team of developers who understand this. In large part, because they were contributors first, if not to ZF, then to other projects. They just get it.

In terms of other teams, one of the most common feedbacks I get is that adoption of ZF has typically meant adopting our coding standards and practices, and that this has led to better products.

That makes me feel good.

>> Every software architect has a set of basic guiding principles that helps them make the right decisions when it comes to software design. What are your most important guiding principles?
** { This question has been contributed by [Ivo Jansch @ijansch] }

I have two.

The first is the YAGNI priniciple — “You ain’t gonna need it.” I probably should apply this more often than I do. I know I’ve applied it a ton more in ZF2 than I did in ZF1 — you can see it in the plethora of interfaces. We’re aiming to build one or two implementations at most — if an end user needs something more, or something different, instead of adding it to the framework, the goto answer is, “implement it yourself.” The majority of users likely won’t need it.

The second is SOLID, and for me, this boils down to really one thing: favor composition over inheritance. Think about a class’ responsibilities, and if you see a class doing too much, separate the responsibilities into different classes, and compose them to get the work done. If you do this, you’ll find you have a lot of objects, and a lot of interactions, but your code is typically more testable and simpler.

>> Some Zend Framework specific questions:-

>>>> a) The learning curve for ZF is usually steep, specially for beginners. Why do you think it is that way and what advice would you give to help bridge that high learning curve?

ZF has been accused of being very Java-like, something I find amusing as I’ve never coded in Java. I think, however, that what developers are seeing is a trend towards good object design and SOLID practices. And these practices are not something a beginning developer is usually familiar with — which means that on top of learning the framework, they’re also having to learn OOP and design patterns.

My advice, and this is true whether or not you use Zend Framework, is to learn the tools of your trade. Knowing the syntax of a language is not enough; you also need to know how to use it effectively, and how to use its grammar — objects and design patterns — to create things.

>>>> “Zend Framework is based on simplicity”. What does simplicity mean in ZF’s context and how well does it achieve it – because if simplicity means ‘ease of use’ or ‘just extract and start coding’, then I fear something is wrong in that objective.

Simplicity takes many forms. One common misconception, however, is that simplicity must equate to “easy”. That’s not always the case.

The thing we try to do with Zend Framework, particularly version 2, is be _explicit_. Being explicit is not always _easy_, as there may be a fair bit to communicate. But part of being explicit means also that the developer shouldn’t have to guess. As an example, in many early frameworks, you saw a lot of leverage of PHP’s “magic” methods — __get, __set, __call, etc. (ZF has often made use of these, too.). These methods often hide details, making it unclear later when you try to debug or alter the behavior what needs to be done, and where. They may make things _easy_ at first, but they’re anything but _simple_.

Yes, ZF may be complex, but under the hood, most interactions are easy to understand and trace — and that kind of ease of use is as important, if not more, than magic that gets you started quickly.

>>>> c) If someone wants to see “ZF at work” in an open-source project for learning purpose and to get the hang of “how to use ZF properly”, which one would you recommend having a look at?

It depends on the version! 🙂

With Zend Framework 1, there are a lot of examples out there, some better than others. I’ve looked a fair bit at Tomato CMS, XOOPS, PimCore, and a few others, and each of them has some stellar code (and, like any project, areas that could be better). The majority of the ZF1 code I hear about, however, is closed source – powering private websites and businesses.

For ZF2, [Rob Allen @akrabat] created a tutorial, which we’ve now incorporated into the ZF2 documentation, and it’s at https://github.com/zendframework/zf2-tutorial. It’s fairly comprehensive, and we’re working as a community to make it more
so, adding more features to it as we can. Additionally, the ZF2 website itself is open source. (For that matter, so is mine.) Finally, there are a bunch of ZF2 modules starting to pop up in the ecosystem, and some are stellar — ZfcUser, BjyAuthorize, and others are setting the bar high.

>>>> d) A good ZF book for beginners (or a good online resource)

For ZF1, “Zend Framework in Action,” by [Rob Allen @akrabat] and Nick Lo. (Caveat: I was technical editor for them.)

For ZF2, while a number of books are in the works, I don’t think any will be in print for some months. We’ve started collating blogs from those actively writing at http://framework.zend.com/participate/blogs.

>>>> e) Zend Framework 1 set itself apart from other frameworks of the time by being more complete and a better overall solution. The framework landscape has changed though and now there are some very good competitors for Zend Framework. What sets Zend Framework 2 apart from the rest of the second generation frameworks (or other well built first generation frameworks) now available?
** {This question has been contributed by [Cal Evans @CalEvans] }

We’ve always been, and continue to be, both a full stack framework, and a component framework. While many components contribute to core functionality, not all do. As a result, we span from common code like loggers, to more arcane code, like paginators, or navigation. Such code is very often needed — but very few frameworks I’ve seen capture this sort of granularity.

One place we stand out — both as a strength and a weakness — is that we don’t necessarily say, “this is how you write an application.” We’ve left a lot of leeway built into the MVC, to make it possible to accommodate alternate workflows and ideas. This means that even such fundamental concepts as modules are optional — modules simply inform the MVC of services and event listeners; if you want something leaner, skip the module manager. Need more steps in the application flow? extend the Application
class, or write your own, to put together your own event flow.

ZF very much embraces a principle borrowed from Perl: There’s more than one way to do it (TMTOWTDI, or “tim toady”). I think ZF2 leverages this in a whole new way, by being highly de-coupled from the outset, relying on events for composition and inter-object communication. It’s remarkably powerful, adaptable, and simple.

>>>> f) Since getting rid of the CLA requirement for Zend Framework 2, has this helped increase the contributions that are coming in?
**{This question has been contributed by [Chris Tankersley @dragonmantank] }

Hugely. We’ve gone from one or two dozen direct contributors (people contributing directly to ZF2, and not to ZF1 code that made its way into ZF2) in the first 18 months of development, to more than 100 a year later. We get contributions ranging from simple typo fixes to full-blown features from people who have never contributed to ZF before — and in many cases, people who have not contributed to OSS at all. Removing the CLA requirement was like removing a flood gate.

>>>> g) What was the most challenging thing for you so far while working on Zend Framework project
** {This question has been contributed by [Sebastian Marek @proofek] }

Delegation.

I like to code, and I often have very specific ideas about what I want to code. But, as project lead, I often cannot afford the time needed to do everything. Taking something that you consider “your baby” and handing it over to someone else is hard. But I’ve learned, and I’ve gotten better at it — and some of the code has benefitted tremendously. I prototyped a DI solution in the spring of 2011; I handed it over to Ralph, and he created a masterpiece with it — and then went on to create the ServiceManager, which turned out to be even better.

Sometimes you just need to let an idea out into the air, and see where others take it, so that you can focus on other things that also need to be done.

>>>> h) How would you convince someone to use ZF

Have you ever written a mail client? What about an HTTP client? Or what about form validation? You’re likely getting a lot of details, including important security concerns, wrong. On top of that, you’re wasting your time: your business is getting a project done, not writing library code or a framework.

If you have an existing project, ZF2 is great, because you can add in the dependencies you need now, and not worry about the full-stack part of it. Need filtering and validation? add in zend-filter and zend-validator. Need pagination? Add in zend-paginator.

If you’re starting a new application, again, you shouldn’t be writing your own framework. You likely shouldn’t even be writing a lot of the common code like user registration and login, ACLs, etc. ZF2 has all of that — or a module exists for it — and you can shape it to how you want to code.

>>>> i) To you, is ZF the best PHP framework around? (If yes, why – if no, which framework you consider the best)

The best framework is the one you know and can use effectively. The best developers also know the shortcomings of their favorite framework, and when to use something else, or components from something else.

I’m not into framework wars. They’re a waste of time.

>> The day you realised “You’ve made it to the A-List PHP arena” ?

In 2005, when I was at php|tropics, I think there was very much an “A-List”; the same speakers spoke at just about every conference, and there weren’t that many conferences. As such, what they said had more weight than most anybody else. Something Paul M Jones and I noted was that it would be nice for those speakers to spend more time talking to those of us _attending_
conferences.

Interestingly enough, at that conference, they did. And what I noticed going forward was that anybody who could prove they had a solid background doing what they did best could likely speak at a conference — and we started having more and more conferences. As such, the speaker rosters are constantly changing now — and I love this trend. It means that anybody who is willing to put in the effort to create a presentation and share it likely can, at any number of venues across the globe.

What I’m getting at is: I don’t think there’s an “A-List” anymore. And I’m proud that the PHP community has evolved such that there doesn’t need to be.

>> Why you are successful and why others are not?

I’m no more successful than anybody else, I feel. Mostly, I feel very fortunate: fortunate that I am able to share my passion for programming, and that others feel they can learn something from me. I try and share what I know whenever I can — in large part because I appreciate it when others share things with me. But the best feeling comes from seeing the proverbial light illuminate for somebody else because of something you’ve showed them, and seeing them take it somewhere you’ve never dreamed.

To me, that’s success.

>> A final word before closing up..

Code lots. Ask for feedback. Be humble. And constantly explore the nooks and crannies of the languages you write in, as well as the technologies popping up each day, with an eye for how they might help you solve problems. Those are the qualities that will keep you nimble and active in your profession, and, more importantly, excited and passionate.

Did You Know..

One thing which most of you (around the world) does not know, is that Matthew is really a humble guy; he is known for wearing sandals when doing presentations.

Matthew Weier O’Phinney Wearing Sandals

Now Do Your Part!

1) Help diffuse this interview to the PHP ecosystem – Share, tweet and spread the word to your audience ==> That would be a FREE way to thank me 😉

2) Make a comment below using the comment form – I’m sure you can at least say 1 word about this interview

{I’m thankful to your response(s)!}


3 Comment(s)



Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.