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 6367729
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:35:11+00:00 2026-05-25T00:35:11+00:00

I’m looking to implement backbone into a large web project with multiple apps that

  • 0

I’m looking to implement backbone into a large web project with multiple “apps” that will be using it and I’m trying to figure out a good way to organize my files. The two I’ve come up with so far are:

js
+- models
|  +- search
|  |  +- result.js
|  |  +- ...
|  +- cart
|  |  +- item.js
|  |  +- ...
|  ...
+- collections
|  +- search
|  |  +- results.js
|  |  +- ...
|  +- cart
|  |  +- items.js
|  |  +- ...
|  ...
+- views
|  +- search
|  |  +- resultRow.js
|  |  +- ...
|  +- cart
|  |  +- itemRow.js
|  |  +- ...
|  ...
+- routers
|  +- search
|  +- cart
|  ... 

And

js
+- search
|  +- models
|  |  +- result.js
|  |  +- ...
|  ...
|  +- collections
|  |  +- results.js
|  |  +- ...
|  ...
|  +- views
|  |  +- resultRow.js
|  |  +- ...
+- cart
|  +- models
|  |  +- item.js
|  |  +- ...
|  ...
|  +- collections
|  |  +- items.js
|  |  +- ...
|  ...
|  +- views
|  |  +- itemRow.js
|  |  +- ...
+- routers
|  +- search
|  +- cart
|  ... 

I’m leaning towards the latter as it has clearer lines between sections of the website and keeps the apps together but our current structure of the back-end framework is much more like the former.

  • 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-25T00:35:11+00:00Added an answer on May 25, 2026 at 12:35 am

    i would go with a modified version of the second… basically, drop the folders for m, v and c in each of your site sections. there’s really no need to separate these into subfolders when the file names and class names will already reflect what they are.

    js
    +- search
    |  +- result.js
    |  +- results.js
    |  +- resultRow.js
    |  +- ...
    +- cart
    |  +- item.js
    |  +- items.js
    |  +- itemRow.js
    |  +- ...
    +- routers
    |  +- search
    |  +- cart
    |  ... 
    

    looking at this layout, i still know that “item” is a model, “items” is a collection and “itemRow” is a view, because that’s the convention that you have set up. adding the extra layer of folder names just adds complexity and adds no value, in my opinion.

    also – (you probably know this, but in case others reading this post don’t…) be sure to use something like require.js to consolidate / minify all of your js into a single file before deploying to your production environments. keeping code organized like this is great for development and debugging purposes. but when it comes time for a production system to use the code, having it split out into multiple files causes significant delays for the end-user. require.js solves this problem by providing an easy way to have both – organized files during dev work, and a single minified file for production.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

That's pretty much it. I'm using Nokogiri to scrape a web page what has
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm looking for suggestions for debugging... If you view this site in Firefox or
I have a jquery bug and I've been looking for hours now, I can't
Seemingly simple, but I cannot find anything relevant on the web. What is the
this is what i have right now Drawing an RSS feed into the php,
We're building an app, our first using Rails 3, and we're having to build
I am trying to loop through a bunch of documents I have to put

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.