Build your First Tiny PHP MVC Framework

Posted by: Admin  :  Category: Php

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

I’m often asked about how to create an extremely simple MVC structure for small projects which don’t require a massive framework, like CodeIgniter or CakePHP. We’ll build a solution in ten minutes or so.

Linux Cpanel shared hosting: 600 GB disk space, 6 TB bandwidth, free domain, unlimited databases and ftp accounts, web hosting cheap and pro at Hostony

25 Responses to “Build your First Tiny PHP MVC Framework”

  1. gengeriscool Says:

    make more videos on this! 🙂

  2. ashboxtoo Says:

    Wow! This is awesome!! Well done, this is amazing, I cant wait to play with this. A very well polished tutorial, 10/10 Please more of these 😀 Expand away!

  3. ButaneWebEditor Says:

    Jeffrey, I just added functionality to allow this Tiny MVC framework to add multiple views and models very easily from the URL. Please see my article on hubpages at hubpages.com/hub/Your-First-PHP-MVC-Framework-With-Multiple-Views

  4. ButaneWebEditor Says:

    Thanks, Jeffrey. Great video and it works! However, what this did not show is how to create multiple views, so I have made some changes to your controller.php and added 2 lines to an .htaccess and will upload that video as a response to this one by the weekend.

  5. TheEBookZone Says:

    I built a small app using this, so easy, have full Mysql DB access, and access to web services, this MVC is so brilliant and simple to use, Im starting to expand it much bigger soon!! Please do a part 2 – login and users ( admin, user).

  6. Venistro Says:

    which microphone do you use in this video?

  7. igor86SRB Says:

    great tutorial as always…
    i laughed so hard on 14:16 XD

  8. FacepuncherBlog Says:

    Wow, awesome tutorial. Thank you!

  9. TheEBookZone Says:

    Can anyone tell me how to setup multiple controllers to this mvc project, I like the simplicity but need a way to navigate pages, I need to have multiple controllers. Someone message me the answer please!!
    Thanks! Great Tut! would like to see a Part 2!!

  10. XarelDesign Says:

    Try also the micro framework Phraw on phraw.dav-muz.net

  11. TruthForPinoy Says:

    Thank you very much!!!! That was quite helpful. I wish could’ve seen this tutorial before. You make it reallly look so easy. I hope you could expand this framework soon. Thank you again.

    Subscribing!! =)

  12. willzurmacht Says:

    You’re amazing! This is the best MV tutorial I’ve ever watched 🙂

  13. winfr34k Says:

    How did you configure macvim?

  14. nilsi1987 Says:

    love this, thanks alot mate

  15. Laur3ntLapo Says:

    @nettutsplus

    Build your First Tiny PHP MVC Framework – PART 2

    🙂

  16. fingesso Says:

    A really nice tutorial, thanks! Very helpful, please follow up with some info on expanding this. Thanks again!

  17. RagnisArmus Says:

    What vim color scheme are you using?

  18. selectoNET Says:

    @Laur3ntLapo it depends of the system you are using. With Zend Framework you can check the routing in the bootstrap. With symfony its more in the YAML config file. But in all cases something like: $request->getParam(‘param_name’)

  19. daGrevis Says:

    There must be 2nd part…!

  20. mant1core81 Says:

    Very nice, I was looking for something like that. Having this from Jeffrey is like the icing on the _cake_ (haha).

    Hope to see this expanded in the near future, I’m definately looking forward to it!
    Thanks a lot, Jeffrey!

  21. benfoord123 Says:

    Very useful. Please follow up with more information on expanding it. Thank you.

  22. vengiss Says:

    Neither cake or code igniter are HUGE frameworks, ZF and Synfony are.

  23. LennartSvan Says:

    Nice!

  24. TheUnillogical Says:

    @Myztik7 – I didn’t say that it was proof, just compelling evidence. I agree with you, but I think that the statistics were evidence enough to justify my claim.

  25. Myztik7 Says:

    @TheUnillogical That doesn’t prove one framework is faster than the other.. It could just be 5 rows of code somewhere in his application or somewhere in one of the cake framework component he’s using that makes it so much slower.

    You can’t say Framework X is faster than Framework Y, you can however say that Framework X is faster than Framework Y AT DOING Z.

Leave a Reply

*