I once had a job interview and the man asked if I had built any MVC's on my own; so phern was born. In 20 lines of PHP. All other configs, headers and scripts are non essential. In fact this very page needs nothing but the 20 lines that compose the PHERN core.
But there is more to it... here's a demo.
PHERN is so easy its just plain dumb... In fact the config file is not even necessary! (It does help though).
It comes with a MySQL plugin, to illustrate the data tier. But it doesn't need that ether.
Upload PHERN to your desired directoy.
config/boot.phpand add your database details.
Start adding to the
mvc/demofolder and rename it to something else.
demo-controller.phpto something else.
Thats it! Edit away at your new MVC setup.
Wait? Feature? Yes. Feature. As far as I can tell PHERN has one cool thing about it: You can concatenate the URL dividers (the default is "/" because I like htaccess), but you can use anything you want.
mvc/user and a
mvc/pasword folder can be called in the URL like
/user/password and all the functionalities of
mvc/user will be inherited by
You could keep going, add a
mvc/reset and you could call a URL like
Also, there is no moral obligation to put any controllers or views or models in an
One more thing...
It might not be a feature, but its nice that all of it, every single bit of PHERN except those 20 lines are plugins. So you can include a zillion billion plugins in your boot file and they will all come together nicely on your application.
Why is it stupid?
It's a way of saying that there is not much too it. Because there really isn't.
So you built this 20 line MVC on a job interview grudge?
Why PHERN? Why not PHLOWER? Or PHICUS?
Fern + PHP = PHERN, you probably got that part. Also a fern has those fractal like leaves, like the way you can concatenate tier functionality in PHERN.