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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T10:29:01+00:00 2026-06-18T10:29:01+00:00

As many of you, I’ve started to write more and more web application using

  • 0

As many of you, I’ve started to write more and more web application using a backend that only talks JSON (in my case Django or Rails).

As a front I’ve been using a MVC client, for example Backbone.js. According to me, this solution is really nice and plays well with many type of applications.

What I found annoying is that I found myself producing a lots of Javascript code that do almost the same thing. It feels like I’m creating a new layer on top of Backbone for each new application. There must be something wrong in my way I am thinking here.

Lets give you an example:

Pretend that you have an API that gives you six collections and you would like to use Twitter Bootstrap to show this. You’ll have a navigation menu where you can select each of these collection to view.

There will be a lots of Javascript code just setting up all models, collections, views and the logic around routing and navigation. You must also consider which view that is active.

Such as:

Error handling when fetching collection

If a collection is loading, we would like to see “Loading”. If it fails, we would to see why. It’s the same with create/save/delete.

Routing

I found myself writing a complicated logic that in the end just render a specific view on matching URL:s. It’s just an array with all instantiated views. Sometimes you don’t even need a view, only a Template associated with an URL. Okey, if you have six menus you can have six functions. But if the menu is three levels deep with six options on each you can’t have a route function for each view.

Navigation bar and breadcrumbs

This will be a view which is called from my complex logic above. If the navigation is multi level deep, this can be really complex.

My question is: Am I so unique here? If not, how do you solve this?

Is Backbone.js not right for me? What alternatives would fit better (oh yes, I’ve searched)?

Thank you for your time, I really appreciating all your ideas.

  • 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-06-18T10:29:03+00:00Added an answer on June 18, 2026 at 10:29 am

    I would say there are two factors at play here:

    1. Backbone applications do easily become verbose, because the framework itself is so small and simple. For every feature and line of code Backbone doesn’t have, you have to write. This is part of its underlying philosophy. Quoting from the docs:

      Backbone.js aims to provide the common foundation that data-rich web applications with ambitious interfaces require — while very deliberately avoiding painting you into a corner by making any decisions that you’re better equipped to make yourself.

      So it’s a tradeoff. There are other, more holistic frameworks such as Ember.js and AngularJS, which tend to generate far less boilerplate code in your own codebase. Both of them are top-notch frameworks, and something you might want to look at. The tradeoffs, of course, are larger framework size, more third-party complexity, and a risk that you’ll “paint yourself in the corner”.

      If you want to stay with Backbone, but you feel you need some more help from the framework, look into Backbone.Marionette. I haven’t personally used it, but to me it looks like a great way of solving many common problems with less code and a maintainable structure.

    2. You could probably do better with just Backbone. The Backbone Model–View–Router pattern can only get you so far, when talking about complex, larger applications, and Backbone is not particularly great at showing you the right way.

      When you start repeating code, you have to refactor, generalize and keep it DRY. For example:

      • To define a loading icon in one place, hook into jQuery.ajax events or override Backbone.sync.
      • For simple route actions define a declarative route->view map, use optional route parameters and autowire dependencies as needed. Make these hierarchical and generate a navigation view component based on this map.
      • Hook up your breadcrumb to Backbone.history.navigate and map route fragments to localized UI texts automatically on route change.

      .

      I’ve managed to get Backbone applications to scale from tiny 50-liners to 50 000+ LOC beasts by applying some general software development patterns, encapsulating logic into base classes, services, utilities, widgets, decorators, mixins and what-have-yous. It’s really no different from a large Rails project: when the application grows in complexity and size, the demand for code hygiene and structured patterns grows.

      To transfer the generalized solutions between projects, create standalone components out of each of them. Of the examples you provided, I can see a Backbone.LoadingIndicator, Backbone.Navigation and Backbone.Breadcrumb forming quite easily. To take this further, package your components with something like Bower and include them as dependencies in your projects.

    There’s no correct answer to your question, but it’s safe to say that Backbone apps scale well beyond what you’ve described. It just expects you to do the scaling, and in return it gives you the freedom to build your application the way your application needs to be built, not in the way a frameworks says you have to. Choice is yours, as always.

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

Sidebar

Related Questions

Many of us have web and application servers that use plain TCP. Some of
Many many programs have communities that adds languages to the application after it got
Many time i saw that developer are using DataContract and DataMember Attributes for their
Many search engines are not using meta keywords and Google through many recent updates
Many methods in the BCL are marked with the [MethodImpl(MethodImplOptions.InternalCall)] attribute. This indicates that
Many articles shows ways of converting jpeg files to grayscale using canvas+html5 at the
Many times I've heard that it is better to maintain the number of threads
Many people are aware that people can edit the html source code of a
I am using the SimpleRSS gem to parse a WordPress RSS feed. The only
Many data structures store multi-way trees as binary trees using a representation called the

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.