Dummy - A PHP Framework for Dummies!

Over 20 years of working in programming, I have used several frameworks, from simple to complex. I also implemented from zero at least 3 big frameworks for companies I worked for (at least 2 still in use). As much as having your own framework is cool because you know all the shenenegans and the team can pretty much do anything they want with it, there have been always situations where it was a hard sell: Some customers want a free/open framework "in case we move out", others "know" about some framework and want it done on that, and there are always the customer who wants all done in a random CMS ... I lost count on how many times copy&pasted the same structure in WordPress or Drupal.

"I want to code PHP, not in 'Framework X'"

No problem so far, obviously: Plenty of frameworks around, plenty of CMS around, but there was always something missing ... and I bet most developers can relate: those very simple sites you want to make that are mostly CMS (yes, like this one), but you want a template system, a basic administrative pane (like, something slightly better than PHPMyAdmin), and want to be able to actually code in PHP. The so called "minimalistic" or "simple" frameworks.

Except I just quit trying to find one to say "this is it, the simpler PHP Framework possible, no learning required". Most of them will tell you need only 15 minutes to "learn", nah, it takes 15 minutes to make a Hello World ... and let's face it, a Hello World should take 1 minute, at most. They don't try to be simple to master, they try to be simple to learn, but takes just as much a big framework to master.

Slim? no, not slim at all. The moment you need namespaces and objects outside PHP to do the bare minimum, it is not simple.

Guys ... I said simple!

PHP-DI? Are you serious? The thing have interface-to-implementation binding. Not simple.

Some suggest Laravel or Symfony, totally skipping the part where we are looking for simple and lightweight.

Now, to be fair, there are some light and simple frameworks around there, excluding compiled ones like Yaf, to mention a few: Swiftlet, Respect\Rest, Nanite or MicroMVS, but quite frankly, they all fail my benchmark: no instancing and "learning" the framework. Dummy has one optional instancing on the Controller, but you can go without it only using raw PHP (it could even be implemented without instancing, but that would get ugly)

So how about a framework that only need one include and one invoke call, and then you can code in PHP, except you are covered by:

  • Complete Templating engine - optional even
  • Routes and Domain routing, as well internal re-route (serve a different page given conditions or consequences of the one requested)
  • Multiple-domain automatically supported
  • Built-in optional CMS
require_once "sys/Dummy.php";
# Yes! That is it!
  • Built-in optional server-side statistics
  • Built-in optional Administrative Pane
  • A handful of functions that are not hard to remember and work like PHP
  • A debug bar that can actually turn into an ELI5 debugger ... literally (requesting a page with ?ELI5=code will explain almost line by line what is happening in the framework)
  • Automatic tags for improved mobile and ajax support
  • Any database connector (built-in mysql)
  • NO objecs, namespace, classes or anything of the sort other than the main object ($Dummy) and a main controller that is automatically invoked.

Dummy is literally the framework for dummies. The source code (pretty much completely commented and documented) have only 540KB, and that includes 290KB of optionals (the core framework is only 250Kb)

You initiate the framework, and build your pages in raw PHP. THAT is a simple framework.

This time, you need 1 minute to learn, 15 minutes to master!