Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP

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/

or

index.php /classes/ /inc/ config/

or something else?

2 Answers

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,028 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?