Professional PHP

PHP Programming, Web Development, PHP Advocacy and PHP Best Practices.

Closures are coming to PHP

March 22nd, 2009

Dagfinn has a post looking at using the new closure feature of PHP 5.3. He compares using foreach for iteration versus array_map. “Interesting,” he concludes, “but not necessarily better than conventional alternatives.”
I agree for that case. Consider instead, a more complicated operation that requires a setup and a tear down after.
 
setup();
operation();
teardown();
 
Now what happens [...]

13 Comments | Read the full post »

php | tek Wrapup

May 26th, 2008

I really enjoyed myself at this year’s php | tek. The conference seemed even better than last year. Here are the slides from my talks…

Exceptional PHP
Coding for Success: Writing Software You’ll Be Able To Understand Next Month

Here are some of the books I mentioned…

Refactoring: Improving the Design of Existing Code
php|architect’s Guide to PHP [...]

8 Comments | Read the full post »

Benchmarking PHP’s Magic Methods

November 4th, 2007

Larry Garfield has an interesting set of benchmarks covering many of PHP’s magic methods. His results correspond pretty well to my own benchmarks in the area. The thing to take away is that its not necessarily the overhead of the magic methods, but rather what you do inside them. Its hard to [...]

9 Comments | Read the full post »

The Endpoints of the Scale of Stupidity on Video

November 2nd, 2007

A quote from Cal Henderson (via simonwillison) presents a “Web Application Scale of Stupidity:”

| OGF (One Giant Function) —- Sanity —- OOP (Object Oriented Programming) |

The scale that Cal is talking about is actually better known as modularity:

| Few large modules —- Sanity? —- Many Small Modules |

If you haven’t listened to Alan Kay [...]

1 Comment | Read the full post »

Let Your Properties be Properties

May 8th, 2007

There is a coding pattern that I see (and have used) in PHP code that defines generic methods on a class for setting and getting properties.
 
function set($name, $value);
function get($name);
 Google code search for examples
Some times there are some ancillary methods to deal with unsetting, checking for existence, setting via an array, or dealing with references in [...]

13 Comments | Read the full post »

On the Perils of Inline API Documentation

April 13th, 2007

Travis Swicegood has a post questioning the value of the docblock. I have a deep sympathy with this sentiment.
Even on projects with extensive generated documentation, I find that kind of documentation to be of extremely low value. The problem with inline API documentation is that there is no sense of priority. Developers [...]

12 Comments | Read the full post »

Software Development Team Diversity

March 26th, 2007

Matt Mullenweg has a post about Hiring Diversity. A successful software project must fulfill many competing goals and factors and meet a wide variety of challenges. Diversity is the combined arms of software development. In my personal experience, the diverse team performs better. A diverse team allows the [...]

6 Comments | Read the full post »

The Problem with Markup Languages

March 14th, 2007

Chris Shiflett has a post today, Allowing HTML and Preventing XSS. The problem is how to allow users to format their contributed content without introducing security vulnerabilities. The answer is usually some sort of markup language or filtering and sanitization of HTML.
BBCODE was designed for this purpose. There is no actual standard, [...]

9 Comments | Read the full post »

Delphi for PHP

February 23rd, 2007

I have to comment on this week’s annoucement of Delphi for PHP. I was a Delphi programmer for about 5 years before taking up PHP about 6 years ago. What a convergence.
I have a great fondness and respect for the old Object Pascal based Delphi. Delphi’s VCL has been influential, inspiring the [...]

30 Comments | Read the full post »

OOP is Mature, not Dead

January 7th, 2007

I ran across an interesting series of blog posts by Karsten Wagner claiming that OOP is dead (part 2 and part 3). The premise behind these posts is that OOP has failed to deliver and that it is on the decline in favor of more functional or meta programming techniques. Maybe its true [...]

28 Comments | Read the full post »

« Previous Entries
    Subscribe Feed
    Share Subscribe to this blog…
    Share Bookmark or share this page…
  • You are currently browsing the archives for the Software Design category.
  • About

    My name is Jeff Moore. I'm a PHP programmer living in San Francico and working for a startup.

    More about me…

  • Categories (Home)

    • Agile Methods (14)
    • Mac (14)
    • Misc (18)
    • Open Source (14)
    • PHP (99)
    • Software Design (29)
    • Usability (14)
    • Web Design (20)
  • Recent Comments

    • rsync to remote server via ssh  37
      Petr Halounek, Penni Tomasino, Rodney Kohnen [...]
    • WordPress BBCode Plugin  30
      wepniveth, Pamella Philipps, evakuat [...]
    • PEAR Templates  18
      Sang Bellotti, Kandice Sansing, car insurance estimates for teenagers [...]
    • Extreme Simplicity  15
      Gilbert Moatz, Roni Beauregard, Barb Geyer [...]
    • Manual Memory Management is Dead  6
      Grass Fed Filet Mignon, Kellie Carello, PAPANDOR [...]
    • Friendster wrapup: does MySQL scale  38
      Ollie Joya, nfl jersey on sale, selling scrap gold [...]
    • The Coding Apprentice  51
      fkawau, Annamae Mccane, Boca Raton Personal Injury [...]
    • The Legality of Republishing RSS Feeds  30
      dasfdsfsd, reebok authentic nfl jersey, Tory Rennemeyer [...]
    • Exceptional PHP  7
      Sports, The Click, Laraine Waterhouse [...]
    • PDO versus MDB2  42
      selling silver coins, Oliver Luongo, ddkoaorpa [...]
  • Site

    • Archives
    • Log in
  • Search