Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

Separation
For external dependencies (third-parties libraries), I would suggest separating them from your custom one.

Create a lib folder under css and js.
Make sure the relative image path is amended in css files if any.

css
|- style.min.css
   lib
   |- font-awesome.min.css

js
|- functions.min.js
|- main.min.js
   lib
   |-jquery.x.x.x.min.js
   |-jquery.x.x.x.min.map
   |-jquery.lib1.min.js
   |-jquery.libx.min.js

OR

js
|- functions.min.js
|- main.min.js
   lib
       |-jquery
           |-jquery.x.x.x.min.js
           |-jquery.x.x.x.min.map
           |-jquery.lib1.min.js
           |-jquery.libx.min.js

So you are less likely to edit those frameworks and libraries accidentally.

Consistency
Use either singular or plural form of noun appropriately.

Change folder cache to caches for matching the views.

Includes
As being said in another answer, in your case, modules should be separated into several files. Not only for the purpose of a clear directory hierarchy, but also for the performance and security issue.

Extra
Use images folder for storing images.

Use specific folder (e.g. data) for saving the data.

For more examples and practices, you can refer to SO: Directory Structure for MVCSO: Directory Structure for MVC

Separation
For external dependencies (third-parties libraries), I would suggest separating them from your custom one.

Create a lib folder under css and js.
Make sure the relative image path is amended in css files if any.

css
|- style.min.css
   lib
   |- font-awesome.min.css

js
|- functions.min.js
|- main.min.js
   lib
   |-jquery.x.x.x.min.js
   |-jquery.x.x.x.min.map
   |-jquery.lib1.min.js
   |-jquery.libx.min.js

OR

js
|- functions.min.js
|- main.min.js
   lib
       |-jquery
           |-jquery.x.x.x.min.js
           |-jquery.x.x.x.min.map
           |-jquery.lib1.min.js
           |-jquery.libx.min.js

So you are less likely to edit those frameworks and libraries accidentally.

Consistency
Use either singular or plural form of noun appropriately.

Change folder cache to caches for matching the views.

Includes
As being said in another answer, in your case, modules should be separated into several files. Not only for the purpose of a clear directory hierarchy, but also for the performance and security issue.

Extra
Use images folder for storing images.

Use specific folder (e.g. data) for saving the data.

For more examples and practices, you can refer to SO: Directory Structure for MVC

Separation
For external dependencies (third-parties libraries), I would suggest separating them from your custom one.

Create a lib folder under css and js.
Make sure the relative image path is amended in css files if any.

css
|- style.min.css
   lib
   |- font-awesome.min.css

js
|- functions.min.js
|- main.min.js
   lib
   |-jquery.x.x.x.min.js
   |-jquery.x.x.x.min.map
   |-jquery.lib1.min.js
   |-jquery.libx.min.js

OR

js
|- functions.min.js
|- main.min.js
   lib
       |-jquery
           |-jquery.x.x.x.min.js
           |-jquery.x.x.x.min.map
           |-jquery.lib1.min.js
           |-jquery.libx.min.js

So you are less likely to edit those frameworks and libraries accidentally.

Consistency
Use either singular or plural form of noun appropriately.

Change folder cache to caches for matching the views.

Includes
As being said in another answer, in your case, modules should be separated into several files. Not only for the purpose of a clear directory hierarchy, but also for the performance and security issue.

Extra
Use images folder for storing images.

Use specific folder (e.g. data) for saving the data.

For more examples and practices, you can refer to SO: Directory Structure for MVC

Post Migrated Here from codereview.stackexchange.com (revisions)
Source Link

Separation
For external dependencies (third-parties libraries), I would suggest separating them from your custom one.

Create a lib folder under css and js.
Make sure the relative image path is amended in css files if any.

css
|- style.min.css
   lib
   |- font-awesome.min.css

js
|- functions.min.js
|- main.min.js
   lib
   |-jquery.x.x.x.min.js
   |-jquery.x.x.x.min.map
   |-jquery.lib1.min.js
   |-jquery.libx.min.js

OR

js
|- functions.min.js
|- main.min.js
   lib
       |-jquery
           |-jquery.x.x.x.min.js
           |-jquery.x.x.x.min.map
           |-jquery.lib1.min.js
           |-jquery.libx.min.js

So you are less likely to edit those frameworks and libraries accidentally.

Consistency
Use either singular or plural form of noun appropriately.

Change folder cache to caches for matching the views.

Includes
As being said in another answer, in your case, modules should be separated into several files. Not only for the purpose of a clear directory hierarchy, but also for the performance and security issue.

Extra
Use images folder for storing images.

Use specific folder (e.g. data) for saving the data.

For more examples and practices, you can refer to SO: Directory Structure for MVC