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

Matthias Noback:
Packages: the case for clones
Nov 17, 2014 @ 17:55:21

In a new post to his site Mattias Noback makes a case for clones (in response to this post from Phil Sturgeon). In it he defends the creation of "clones" of tools, either slightly different version of pre-existing PHP packages or the functionality from a package in another language.

There is this ongoing discussion in the PHP community (and I guess in every software-related community) about reinventing wheels. A refreshing angle in this debate came from an article by Phil Sturgeon pointing to the high number of "duplicate" packages available on Packagist. I agree with Phil. [...] It doesn't make sense to do the same thing over and over again. At least I personally don't try to make this mistake. If I want to write code that "already exists", at least I don't publish it on Packagist. However, recently I got myself into the business of "recreating stuff" myself.

He talks some about one of his own projects (SumpleBus) and how, despite it possibly being a clone of other packages, it has slightly different goals than other tools, making it a different tool, not just a straight up clone. He also covers some of the package design principles he suggests in his book and how they can help to make an isolated package better. He also points out how recent PHP-FIG efforts to define common interfaces and structures can help reduce this kind of package duplication as well by reducing the possible implementations of any given process.

tagged: package reinvent wheel opinion duplication design principles phpfig clone

Link: http://php-and-symfony.matthiasnoback.nl/2014/11/packages-the-case-for-clones/

Anthony Ferrara:
Reinvent The Wheel!
Aug 06, 2012 @ 14:03:19

In this recent post to his site, Anthony Ferrara takes an the phrase "reinventing the wheel" and wonders if, maybe, it's not such a bad thing sometimes.

"Don't Reinvent The Wheel" is a phrase that we hear used all the time in software development. Usually it's used in the context where a library exists to do what the user wants, but they are writing their own. While the sentiment is usually correct, I can't stand the implication of the phrase. Therefore, I can't stand it when people use that phrase without understanding what it really means. Let me explain...

He notes that, while there might be things out there that do something well, it doesn't mean that the "wheel is perfect" and you shouldn't venture out and try something new. He points out two places where it could be good - when a general solution doesn't work and for education/research.

Even as a senior developer, if you never try to reinvent the wheel from time to time, you'll never push your capabilities. You'll never expand your conceptual model of problems. And if you never do that, the world will blow past you.
tagged: reinvent wheel opinion development education solution

Link:

php|architect:
Analysis: Following Ruby Makes PHP Number Two
Sep 24, 2010 @ 15:13:04

On the php|architect blog today Bill Karwin has posted his response to this interesting suggestion from Dennis Hoston about how to "reinvent" object-oriented programming in PHP.

Dennis acknowledges that the name needs work. But, getting past that, his blog is about some creative experiments Dennis is working on. He has come up with a pretty innovative way of creating objects dynamically in PHP that allows for some usage that conventional PHP coding techniques don't support.

He talks about some of the features that this method allows that the usual style of OOP don't allow like class scoping, methods can be added at any times and that the classes created can be temporary. He points out that the base object is actually a factory and makes it simple to create those other instances of child objects. He also mentions some of the features that will no longer work with Deniss' approach like interfaces, instanceof, reflection and autoloading to name a few.

tagged: oop reinvent response dennishoston phpoopr

Link:

Developer Tutorials Blog:
5 essential development facts every PHP developer should know
Jan 24, 2008 @ 22:21:00

The Developer Tutorials website has started up a blog and has already posted some great content to it including this new post covering five things that every PHP coder should know about development.

There's always a bridge between textbook knowledge of programming - syntax, procedure etc. - and the real world knowledge that you get from actually developing real applications. Here are five things every PHP developer should be familiar with before they begin developing web applications in PHP

The list is:

  • Frameworks
  • Templating engines Code availability
  • Don't reinvent the wheel
  • IRC is a wonderful thing

I'm a particular fan of that last one and regularly hang out in the same ##php channel over on Freenode.

tagged: essential development framework template availability reinvent irc

Link:


Trending Topics: