Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
691 views
in Technique[技术] by (71.8m points)

javascript - How do I implement the Backbone model in latest Parse js sdk (1.6.2)?

The Parse Collection class corresponding to Backbone.Collection is no more in the SDK. It used to be there in 1.2.13.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

As of September 9th, 2015, the Parse Javascript SDK no longer contains backbone specific behavior. You can reference a previous version of the JS SDK (http://www.parsecdn.com/js/parse-1.5.0.min.js) to access the backbone specific behaviors but understand that branch is no longer maintained.

V1.6.0 — SEPTEMBER 9, 2015

New Features

Designed to work with ES6. Parse.Object can be treated as a class, and can be subclassed with the extend keyword

When subclassing Parse.Object, you will need to call Parse.Object.registerSubclass()

Better support for different platforms, with custom builds for React Native and Node

All platforms still use the “parse” npm module, but node.js applications should use “require(‘parse/node’)” and React Native applications should use “require(‘parse/react-native’)”

Objects can be created from JSON with Parse.Object.fromJSON()

Pointers can be generated with Parse.Object.prototype.toPointer()

All SDK configuration is now stored in Parse.CoreManager

Controllers for concepts like local storage can be hot-swapped via CoreManager

Changes

SDK no longer contains Backbone-specific behavior. Moving forward, the core SDK will not be tied to any single framework, but we will work with the community to produce up-to-date bindings like Parse+React. The major changes are the removal of Parse.Collection, and allowing Parse.Objects to act as event channels.

SDK no longer ships with Underscore.js included.

Field type mismatches (trying to increment a string field) will now throw exceptions on the client side.

In server environments where the current user has not been explicitly enabled, fetching the current user will now return null instead of throwing. Attempts to change the current user through logIn or become will still throw.

Parse.Ops no longer publicly expose their values

Quoted from: https://parse.com/docs/downloads


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...