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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T02:47:06+00:00 2026-05-23T02:47:06+00:00

Experience level: newbie. The backbone.js Todos demo uses localStorage. This question is about how

  • 0

Experience level: newbie.

The backbone.js Todos demo uses localStorage. This question is about how to use PHP to serve the page instead, assuming that a MySQL DB has been set up.

I checked out PHP frameworks such as CodeIgniter but found them difficult to follow and possibly overkill for my learning purposes.

I understand the concept that a REST API needs to be set up. I am really looking for simple code samples. Thanks in advance.

Update: Is there a full backbone.js tutorial somewhere that includes a full working example of how to wire up to server side PHP?

  • 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-23T02:47:07+00:00Added an answer on May 23, 2026 at 2:47 am

    The most basic and simple approach (I know of) that should help you to get started, would be:

    1. Given you have a model / collection, define it with an url like:

      resourceCollection: Backbone.Collection.extend({
      url: ‘/page.php’
      })

    2. Create your page.php file (in the document root), just take care of RewriteRules etc. you may use!

    3. Now we have to make sure that we can react properly on get, put, post and delete; so we have to check for the request method, e.g. with a switch statement. Cases would be GET, DELETE, PUT, POST:

      switch($_SERVER[‘REQUEST_METHOD’]){
      …
      }

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

Sidebar

Related Questions

I don't have much experience in this yet but the high level question that
I have no experience with low level programing and I need this piece of
On a more abstract level then a previous question , in my experience there
I am an intermediate level Java programmer (with more experience in C# and PHP),
I'm a decent level PHP web programmer with enough real world experience. I'm also
This is a high-level question and I am sure there is no universally correct
Debugging experience http://www.dmhermitage.org/wtfborders.png This is making me want to kill myself. I have some
This is a follow-up question to 1832203. I'm making it a new question as
Has anyone had any experience with Spring transactions (class-level, with proxy, annotation-driven) not getting
Background about myself: I have about 3 years experience working in Java/J2EE. I am

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.