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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:34:58+00:00 2026-05-26T20:34:58+00:00

(sorry for the english) I have a ASP .net webservice that get data from

  • 0

(sorry for the english)

I have a ASP .net webservice that get data from a oracle database returning JSON data.

TestWebService.asmx/getUserData

I test this using simply ajax request with jQuery

$.ajax({
     type:"POST",
     data:"{}",
     dataType:"json",
     contentType:"application/json; charset=utf-8",
     url:"TestWebService.asmx/getUserData",
     success:function(data){
         console.log(data.d);
     }
});

This work.

But now i want to try use Backbone.js

The Application have this: User data, Articles and Buy Order where a Buy order is a collection of Articles, so i think in this models for Backbone

User = Backbone.Model.extend({})
Article = Backbone.Model.extend({})
ArticleCollection = Backbone.Collection.extend({})
BuyOrder = Backbone.Model.extend({})
BuyOrderCollection = Backbone.Collection.extend({})

The Views are just 2. A Form where i show the User Data and inputs to add Articles and create the Buy Order and a Visualize view to show the Buy Orders where the user can see an check the content of one buy order clicking in the code.

The UserData, and part of the Article Data are get from the service: (User Data like name and Article Data like code, description, price, etc).

¿How can i populate the Backbone models with this data?

Thanks in advance.

  • 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-26T20:34:59+00:00Added an answer on May 26, 2026 at 8:34 pm

    So, basically, you want to override Backbone.sync. It is the thing that is currently doing your RESTful stuff (GET/POST/PUT/DELETE) via the $.ajax function as well. See how it is implemented by default: http://documentcloud.github.com/backbone/docs/backbone.html#section-134

    As you can tell, it is really quite simple… about 30 or so lines of code to map create/update/delete/read to post/put/delete/get in $.ajax.

    Now that you have seen how they do it, you just implement your own using the same pattern:

    Backbone.sync = function(method, model, options) {
        // your implementation
    };
    

    Once you do that, you are golden. Your models will do all the CRUD that you want them to, abstracted through your implementation of Backbone.sync.

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

Sidebar

Related Questions

i have project in ASP.NET MVC 3 and a mysql database that contains a
I've been developing an application using asp.net MVC, and I have some configurations that
[Sorry that English is not my native language.] So, I have a UI and
i have an application that cache pages with output cache directive of asp.net. When
First sorry for my English I have a problem with JSON. Assume the following
Sorry for my poor english. On my ASP.NET website, I'm importing a softwares list
Im creating my own CMS in asp.net, I get the page content from the
Sorry ,my English is poor, I have never speak English after I leave the
Sorry for bad english and bad title! I have the table post id title
Sorry for my bad English. Just like what I asked. I have this class

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.