Håvard Pedersen

En blogg om vår digitale hverdag og andre pretensiøse temaer :)

So I made this MVC-framework in 27 lines of code…

It started as a generic include-script for the redesign of my commercial homepage, Pedersen Mediaconsult and suddenly I got an epiphany. ;)

Introducing… The OneFileFramework, a complete (well, sort of) web framework in PHP that consists of ONE single file (index.php) consisting of 27 actual code lines. :D

The webpage I set up for it (and the demo) pretty much explains it all (form validation, MVC-orientation and so on). I haven’t set up any way of providing feedback for it yet, though. So I’d like comments to be posted to this blog entry.

I’d especially like to hear if anyone can find a way to fool OFF into security attacks using the $p parameter.

Del med verden:
  • Facebook
  • Google Bookmarks
  • email
  • TwitThis

One Response

  1. Alec sier:

    Nice framework! I found it through your reply when I was reading this: http://www.codinghorror.com/blog/archives/001112.html.

    It’s interesting to see that so many people are fanatical about the bigger frameworks like Zend or CodeIgniter, while I’d bet that most of those people only use a fraction of the framework’s possibilities and have no clue what it’s actually doing. And when it comes down to it, all you need for a basic MVC setup is something like your OFF framework and expand it with just the things you really need.

Leave a Reply

Using Gravatars in the comments - get your own and be recognized!

XHTML: These are some of the tags you can use: <a href=""> <b> <blockquote> <code> <em> <i> <strike> <strong>