Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1022153
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:25:23+00:00 2026-05-16T11:25:23+00:00

In the public folder we have stylesheets, javascripts and images. I want to add

  • 0

In the public folder we have stylesheets, javascripts and images.

I want to add a front-end feature that has it’s own css, js and images, but according to this hierarchy i have to store them like this:

stylesheets/calendar/main.css
javascripts/calendar/cal.js
javascripts/calendar/cal2.js
images/calendar/front.jpg
images/calendar/button1.jpg
images/calendar/button2.jpg
images/calendar/button3.jpg

I don’t like that I split the feature up at all.

Is there a way to organize files per feature instead?

calendar/stylesheets/main.css
calendar/javascripts/cal.js
calendar/javascripts/cal2.js
calendar/images/front.jpg
calendar/images/button1.jpg
calendar/images/button2.jpg
calendar/images/button3.jpg

That would be a better structure, following OOP pattern.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:25:24+00:00Added an answer on May 16, 2026 at 11:25 am

    As the others mention, you can do pretty much anything you like.

    This is the system we are currently using:

    Place files inside directories corresponding to the “layout” they are applicable to:

    /web/images
    /web/javascripts
    /web/stylesheets
    
    /mobile/images
    /mobile/javascripts
    /mobile/stylesheets
    
    /admin/etc
    

    Top-level directories (/images /javascripts /stylesheets) are used for elements that are genuinely common (such as jquery, css reset scripts and standard logos).

    Client-side library packages be maintained in their own directory rather than spread out into the standard Rails directories. This greatly aids long term maintenance.

    Using colorbox as an example:

    Rather than:

     /javascripts/colorbox.js
     /stylesheets/colorbox.css
    

    We have:

     /web/libs/colorbox/colorbox.js
     /web/libs/colorbox/colorbox.css
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have placed my css in stylesheets folder and image in images folder. Both
I have this folder public/assets/dvd_files/dvds/ and i want to svn ignore anything that might
I have a public dropbox folder. Is there any way to programmatically scan that
I have some PDF files in a public rails folder. I want to set
I have the following rule that redirects all traffic to index.php when public folder
I have a folder named import at my root directory where the public folder
I have my csv file in my public folder, and i'm trying to load
Let's say we have the following schema: root/ application/ -public/ index.php css/ img/ javascript/
I am using a library which contains stylesheets and javascripts in one single folder
I have a zend framework project. In the public folder I have js and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.