Excessive abstraction in PHP frameworks

(written by lawrence krubner, however indented passages are often quotes). You can contact lawrence at: lawrence@krubner.com, or follow me on Twitter.

I’m working with Laravel now, a PHP framework. I see this on StackOverflow:

With Laravel, everything is more complex than it needs to be. Yesterday I was dealing with the issue of logging and errors. How to get Laravel to output errors somewhere that I could see them? Well, that involves overriding some logging classes. The tone of the documentation is always “See, it’s very simple, and flexible, just override the default classes, inherit from the parent, override the method, choose which library you want to use, configure the default path, and then it’s easy!”

But of all these things could simply be in a configuration file. Give me a configuration file, where I can set the path for logging, the path for the public directory, the path for images. A simple file, maybe in JSON or YAML, with simple strings.

Having to override classes is never easy. Who are the people who create these frameworks? What is driving them? Why do they think this is a good idea? What social process make them feel comfortable saying these things, rather than embarrassed?

One thing I appreciate about the culture around Clojure is that frameworks are minimal, and they tend to default to simple configuration.

Post external references

  1. 1