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


Structure of Projects

Hey Guys, so to learn im doing some little Projects in php right now.

What im mostly struggling with is how to structure the project.

I have seen so many different versions.

Some People seem to just use classes for everything, others use a strict Model/View/Controller Structure.

Everytime i read Sourcecodes on websites the whole project seems to have a different structure and i dont understad whats right and best practice right now.

To keep to question simple, what folders should a typical project have? for example:

index.php /model/ /view/ /controller/


index.php /classes/ /inc/ config/

or something else?

2 Answers

Jonathan Grieve
Jonathan Grieve
Treehouse Moderator 91,252 Points

Generally when traches structure a format for project files it's a recommended workflow but within reason you can go with your own workflow, what ever you think works best or makes you comfortable. :)

Hey Jonathan, thanks for your replay. But I dont really understand what you mean by traches structure. What is this?