I love Ruby on Rails and I was reading Ben Halpern review of David Heinemeier Hansson’s Keynote on Railsconf. I agree with Ben Halpern that the reduction of “the mental load for developers” is an undervalued concern in the world of web development frameworks. In this post I will define some even stronger goals for web development frameworks.

New “useful” technology

Ben Halpern continues:

the JavaScript community proliferates new “useful” technology without giving as much thought to the mental overhead of constantly learning new things and finding out how to fit everything together.

This is a pretty clear and strong statement, followed by another strong statement:

Rails […] often fails to benefit quickly from the latest and greatest tools or architecture principles. It’s occasionally brutal in this way. But the acknowledged trade-offs keep it healthy.

I completely agree with Ben.

3 virtues of a good web framework

I believe that a there are three things a good web framework should have:

  • Lack of change - no need for innovation, it is an investment
  • Lack of choice - it should kill bike shedding arguments
  • Lack of features - best practices and administrative applications only

They should aim to reduce the following:

  • Cost of learning – maximize documentation reuse & minimize innovation
  • Cost of scaling – maximize compatibility & minimize lines of code executed
  • Cost of defects – maximize best practices & minimize complexity

One of the thing we can do without is Dependency Injection (a popular method to implement Inversion of Control).

Static classes as function libraries

Dependency Injection has numerous serious disadvantages. Most web applications are simple administrative applications with web forms that do little more than simple CRUD. Most have some form of asynchronous jobs, but these are often developed in another technology. It simply does not pay off to be this flexible. The web development framework designer already knows what you are going to build and what is needed for that. I feel that function libraries with stable, well designed and documented APIs are the pragmatic choice that fits much better.

Simple is better

So, it may be clear that I believe that simple is better. With that “vision” I wrote MintyPHP. Whether you like it or not you may decide for yourself, but it certainly is easy to learn and also faster than CakePHP or Laravel, while providing the same abstraction layers to keep things organized.

Check out https://mintyphp.github.io/

Enjoy!