DC Web Makers Blogs & News

Ten Must-Have Directories For Any Serious Application (Part 2)

Continuing from Part 1:

VI. JS
You put all your project JavaScript codes here. You can also add subdirectories fo...

Continuing from Part 1:

VI. JS
You put all your project JavaScript codes here. You can also add subdirectories for jQuery, custom JavaScript codes, and AJAX.

VII. CSS
If you have CSS Media Queries for your project, you may add one separate subdirectory for it. It is better to create at least three subdirectories: admin_css, site_css, and mobile_css. As the project evolves, you will find them very helpful.

VIII. Connections
This is where you save the database connection info. It is very important to use only one single connection file for your whole application (mobile App, admin, and application, etc). This is very critical in large projects where sometimes miscommunications take place. If your project has more than one database; then I suggest two approaches:
1. Create one single connection file, and make all of your quarries cross-database (make sure the user has cross-database access privilege)
2. Create one connection file for each database.

IX. SEO
You can put XML sitemap or URL list files here.

X. Contents
Probably this is one of the most important part of a well-organized application. The larger the application is, the more important it becomes. Make sure to separate files uploaded from admin versus the ones from users for security and ease of maintenance. Specifically, I suggest creating the following three subdirectories:
A. site_main: It includes all the contents of main site like header pictures, etc. Note that the contents of this folder changes very infrequently.
B. admin_main: It includes all the contents that are uploaded by admin for the content part of your application like blog videos, article pictures, or blog PDF files. Note that the content of this directory changes very frequently.
C. users: It includes all contents uploaded by the users.
Once A, B, and C are created, you need to create four subdirectories for each:
- pics: for all picture contents
- pdfs: for all pdf files
- videos: for all video files
- Others: for the other file types

It is a good idea to have foresight for your project and keep everything organized. This is a lesson that you can not learn from books or courses. Regardless of your next project size, try to make it as your habit, and follow it through.

DC Web Makers Blogs
Ten Must-Have Directories in any Application (Part 2)

Blog & News Details

Ten Must-Have Directories For Any Serious Application (Part 2)

  • Posted: Wednesday January 23rd
  • Continuing from Part 1:

    VI. JS
    You put all your project JavaScript codes here. You can also add subdirectories for jQuery, custom JavaScript codes, and AJAX.

    VII. CSS
    If you have CSS Media Queries for your project, you may add one separate subdirectory for it. It is better to create at least three subdirectories: admin_css, site_css, and mobile_css. As the project evolves, you will find them very helpful.

    VIII. Connections
    This is where you save the database connection info. It is very important to use only one single connection file for your whole application (mobile App, admin, and application, etc). This is very critical in large projects where sometimes miscommunications take place. If your project has more than one database; then I suggest two approaches:
    1. Create one single connection file, and make all of your quarries cross-database (make sure the user has cross-database access privilege)
    2. Create one connection file for each database.

    IX. SEO
    You can put XML sitemap or URL list files here.

    X. Contents
    Probably this is one of the most important part of a well-organized application. The larger the application is, the more important it becomes. Make sure to separate files uploaded from admin versus the ones from users for security and ease of maintenance. Specifically, I suggest creating the following three subdirectories:
    A. site_main: It includes all the contents of main site like header pictures, etc. Note that the contents of this folder changes very infrequently.
    B. admin_main: It includes all the contents that are uploaded by admin for the content part of your application like blog videos, article pictures, or blog PDF files. Note that the content of this directory changes very frequently.
    C. users: It includes all contents uploaded by the users.
    Once A, B, and C are created, you need to create four subdirectories for each:
    - pics: for all picture contents
    - pdfs: for all pdf files
    - videos: for all video files
    - Others: for the other file types

    It is a good idea to have foresight for your project and keep everything organized. This is a lesson that you can not learn from books or courses. Regardless of your next project size, try to make it as your habit, and follow it through.