Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP Enhancing a Simple PHP Application Refactoring the Codebase Separating Concerns: MVC

alexvalladares
alexvalladares
21,478 Points

controller.php

Randy says separating controller code into another file (controller.php) is probably too advanced for this course. Where could we see an approach to this method? I think it's very interesting and basic for the mvc.

Thanks in advance!

3 Answers

If you're looking for general principle and fancy a new challenge, you could take a look at the ruby on rails courses too! I think I'm right in saying (although don't quote me on this) that web MVC was modelled on app MVC so you can alsooo take a look at iOS Swift things.

If you're looking at php specifically, Laravel (along with many of the well know frameworks) pull in symfony componenets. Symfony is just an epic collection of reusable awesomeness, but the people behind it have also packaged up their own framework. When I first started, I found their website a little tricky to work through, but you might have more luck than me! Ask any questions toooo

Symfony

Also! Hampton has just released a new course that uses another php mvc framework called Slim. Check it out here. That's probably more what you're looking for!

Joe Bruno
Joe Bruno
35,909 Points

Hello Alex,

Hampton interacts with controllers somewhat in the Laravel Basics Course:

(https://teamtreehouse.com/library/laravel-basics)

alexvalladares
alexvalladares
21,478 Points

Interesting framework, Joe, I'll check it soon.

Thanks for your quick response.