Coder Social home page Coder Social logo

Comments (5)

addyosmani avatar addyosmani commented on May 21, 2024

Would it be okay if this was done with Zend?

from backbone-fundamentals.

amite avatar amite commented on May 21, 2024

ok I guess. I just want to see how to collect and parse a put and delete request from a normal form via backbone.

What I want to see is:

  • How do I rewrite the Sync method?
  • What happens when you turn emulateHTTP off or on?
  • How do I insert, update and delete data from a mysql database based on the incoming request body?
  • What do I return back to my backbone view, router or collection after I am done parsing?

Would love to see these topics covered in your work on backbone. People like are me are still trying to shift from our old ways of ajax requests and non-rest based servers to this new world. These answers will help us make the transition.

from backbone-fundamentals.

addyosmani avatar addyosmani commented on May 21, 2024

We potentially could use this as a starting point: https://github.com/addyosmani/php-backbone-todos. It's based on the same Todo application my TodoMVC project and some of the rest of the book is. What's missing at the moment are proper sync, demonstrate of emulateHTTP off/on.

With respect to the last point you mention (what to do when parsing), could you be a little clearer? Typically when you're done parsing the data for a model/collection, you just return the portion of the object requested (e.g JSON response) you're going to work with.

As with how this would work with put and delete, in my opinion this doesn't really change from how you would handle it in a Backbone-less application (i.e maybe put and delete requests just return a validation message from your backend saying whether the request has correctly gone through or not).

from backbone-fundamentals.

amite avatar amite commented on May 21, 2024

Addy,

The github project you point to is using the slim server that's rest-based. Although this could no doubt be interesting, a far more urgent case is people working with CMSs like wordpress and expressionengine who are tasked with creating custom front-end applications with the data in the CMS database.

So showing us how to do data modeling within the constraints of a vanilla PHP and MySql setup would be great. You do attempt to show this in your earlier photogallery tut on backbone and friends but the server code there doesn't seem to be production quality and it's also quite confusing.

As for the last point about parsing, please ignore it - you seem to have clarified it in your reply.

from backbone-fundamentals.

addyosmani avatar addyosmani commented on May 21, 2024

Based on the feedback on the book so far, the indications are that most people would like less of a focus on the restful apps side of things and more clarity on using Backbone.js itself. With that in mind, I may consider scaling back that part of the book or moving it into a later project.

from backbone-fundamentals.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.