Reputation: 19
i have been learning laravel and truly its quite fun. but so far the projects i have been doing are just small applications with very few controller files and model. Not much to "Organize" per se. But my question is,
1# how to organize files when a project gets larger and larger?
2#is there any recommended project structure that i could follow from the start of any project so that even if in future the project grows bigger, things are modular and easy to manage with?
thanks.
Upvotes: 1
Views: 655
Reputation: 514
Welcome to Laravel world :).
The first thing that I have to talk to you before other people: StackOverflow isn't a place for asking opinions. It's should be treated as a technical forum, and questions that you want to ask should be something that won't be leading to a discussion or different opinions from different users (check here "We prefer questions which can be answered, not just discussed", discuss). Simple rule of thumb (I might be wrong but it's my opinion about what StackOverflow is): You ask a question and you should only expect one good answer (That's why we have a "Check if question is solved" feature).
Moving forward from there, I'll answer your question:
There won't be a good answer to your question. Just like what Jeffrey Way said in one of his Laracon speech: "We don't know shit either".
We have a lot of conventions here and there, a lot of rule, but nothing is "right". Every convention has flaws, it's just that some of them are a lot better than rest of the others. So, keep learning.
There are some absolute "Must-have" skills, though, like learning Object Oriented Programming, using Composer. Learn that because it's absolute needs for a PHP programmer.
Making a scalable project is about an experience. The best answer is that you have to face one, either by finding an internship, a junior web development career, being a volunteer to a Laravel project, etc. But another answer is to learn, search "expert answer" about how to build one on Google (like https://www.sitepoint.com/horizontal-scaling-php-apps/), ask Quora. You will find lots of answers because again "We don't know shit either".
Lots of companies have a different system that others don't use. They'll use what they feel fits theirs needs. For your indie project, you'll just have to keep learning and breaking things until you'll find the one. For other companies, you'll find them knowing what they want to do and you have to do everything their way about how to make a scalable project.
Experience, learn and learn, that's the answer.
Upvotes: 1