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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:41:47+00:00 2026-06-08T15:41:47+00:00

Backbone tutorials I have read implement some type of a mini-framework (i.e. Slim) with

  • 0

Backbone tutorials I have read implement some type of a mini-framework (i.e. Slim) with a RESTful architecture performing CRUD on a server db, like this. The Backbone docs state you need a RESTful api, which I believe is due to the Backbone Route and Sync functionality that keeps models up to date, which is a huge aspect of my choosing to use Backbone.

For example, the line below maps a faux url (route) to the ‘addWine’ function (within a Slim api):

$app->post('/wines', 'addWine');

Assumption 1: If I have a (PHP) CMS backend (and not a mini-framework) I assume I could simply replace the 2nd parameter (addWine) with my own CMS class method call and return a json object.

Assumption 2 But I would not be able to directly call that same class method from a link in the html without causing backbone to lose state and thus it’s ability to sync the model data (and remember the browsers history).

Assumption 3 In that case, I will need to use the Slim api and route backbone urls through (Slim) RESTful CRUD calls in order to access my CMS database to keep backbone happy.

If those assumptions are correct, then it would seem backbone is intercepting those HTTP calls – which leaves me wondering how the whole RESTful + Backbone relationship works. Can you explain some of it?

If my assumptions are incorrect, then I need more help than I thought. Can you help with that?

Thanks

  • 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-08T15:41:49+00:00Added an answer on June 8, 2026 at 3:41 pm

    I can’t speak intimately to your three assumptions, but as for your final question — Backbone does not “intercept” HTTP calls — it constructs them, just as any other javascript library would to create an AJAX request.

    Backbone is relatively agnostic to your server side language/framework. Here is what Backbone expects any time “sync” is called:

    Backbone’s sync function uses different HTTP request types based on which method was called. These different HTTP request types are:

    • POST
    • GET
    • PUT
    • DELETE

    Your framework needs to support all of the above to support the “out of the box” functionality of Backbone. This means that you must specify all of the above routes within your application in order to work with Backbone.

    One other thing to note is the “create” and “update” method does not carry post data with the request specifically — instead it sends a content body with a json digest of the data and expects the server side to properly parse a JSON object and deal with it appropriately.

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

Sidebar

Related Questions

Have checked some backbone.js tutorials and can't understand how to get model id from
I am just going through some backbone tutorials and I have a general jQuery
Although I'm following backbone.js for some months and worked through a plethora of tutorials,
I'm beginning with backbone.js Going through some tutorials, like the one shown below. I
From couple of days, I have started working/learning the backbone.js . I have read
I am learning about backbone, and from the examples and tutorials I have gotten
Newbie backbone question: Context: Building a shopping list with backbone I have a model
As in the backbone-todolist example,I have a collection of elements. I made 2 views,
I just started learning Backbone.js, and have been working on (what else) a simple
I've been learning some backbone.js and I've seen plenty of instances where _.bindAll() is

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.