How do I implement the Backbone model in latest Pa

2019-01-28 06:04发布

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

1条回答
时光不老,我们不散
2楼-- · 2019-01-28 06:49

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

查看更多
登录 后发表回答