DEV Community

Julia Torrejón
Julia Torrejón

Posted on

What are the Standard Directory Structure and Key Files in a Web Application Project?

Discussion (6)

Collapse
alanmbarr profile image
Alan Barr

If it is an existing project I stick with the format whether it is MVC, MVVM, or just homerolled. If it's a new one I am making I will consider whatever is a common pattern for that ecosystem. Ultimately code/projects are typically shared so the approach I think of would be, "What would make others successful working in this and understanding this?" Key files would be a centralized configuration file. A version control ignore file for sensitive files.

Collapse
speedupmate profile image
Anton

most of the world takes this as a standard maven.apache.org/guides/introducti...

Collapse
goyo profile image
Grzegorz Ziemonski

Provided you're building your project with Maven...

Different languages and frameworks will have different conventions and, on top of that, you will find a sizeable group of people that will tell you that there isn't a one-size-fits-all structure for every (web) project.

Similarly to the link above, documentation and sample projects in your language/framework of choice should provide a good starting point, no matter what technology you're using. Then, as your project grows and you learn more, you can start customizing it to fit your needs.

Collapse
speedupmate profile image
Anton

in 95% of cases , no matter the language your fav framework, package manager etc already follows Standard Directory Layout (Maven Standard Directory Layout linked above) . So this is as close as you can get by starting your own without shooting yourself in your leg.

But you are right also, sample projects will provide answers for similar questions.

Thread Thread
goyo profile image
Grzegorz Ziemonski

I'm sorry but I have to disagree with you on this percentage value and hence on the general recommendation. Rails, most express projects or django, just to name a few well-known examples, all follow different directory structures. And, of course, the list could go on and on.

Thread Thread
speedupmate profile image
Anton

Don't be sorry :) no need. The fact that those other frameworks you list have predefined and agreed locations for stuff involved does not mean it's not analogue deriving from "Standard Directory Layout" . It's only a great thing so whatever new stuff you start with usually feels common