Comments (5)
Would it be okay if this was done with Zend?
from backbone-fundamentals.
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.
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.
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.
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)
- Clarification of tagName
- Using quotes and double quotes in the same line
- TodoApp is using classes nowdays HOT 1
- Clarification on 'Backbone.Model.extend' vs 'Backbone.Model'
- Dead links in boilerplate markup
- Exercise #1 - Incorrect CSS file HOT 1
- Code doesn't work
- The right css file of Exercise 1 (Todos) HOT 2
- Broken links on chapter/02-fundamentals.md
- book redesign
- Remove inconsistent bracing spaces
- Todo example index.css using .class selector rather than #id selector HOT 1
- Bug with directory location in the server.js file in the Book Library app HOT 2
- Issue triage sprint
- Connect to database Open String Error (Easy fix) HOT 1
- Is it me or ... Confusing example at Backbone Basics / View / Understanding render(): HOT 2
- Example 1 code uses IDs, the linked css file uses classes
- Mistake in text
- Check Request send forms on Inventory Pages
- Homepage: Change Linktext "BoatShow Special"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from backbone-fundamentals.