简体   繁体   English

创建对象并将其链接到parse和JS中的用户

[英]Creating objects and linking them to a user in parse and JS

I have created the basic functionality of a system - I can currently register, log on, etc. I'm currently trying to implement a settings page where users would be able to add a list of classes to their account. 我已经创建了系统的基本功能-我目前可以注册,登录等。我目前正在尝试实现一个设置页面,用户可以在该页面中向其帐户添加类别列表。 I've looked around on the documentation but it's a bit unclear as to what I need to use. 我浏览了文档,但是对于我需要使用的内容尚不清楚。 I think Collections seem the most appropriate, but again the documentation is a bit unclear. 我认为Collections似乎是最合适的,但是文档还是有点不清楚。 Could anybody clarify on the usage of this (and whether I should be using Collections for this), as well as possibly a link to a more in-depth documentation/tutorial? 任何人都可以澄清此用法(以及是否应该为此使用Collections),以及可能指向更深入的文档/教程的链接吗?

Hope this made sense. 希望这有道理。

As I understand, you want to connect the user with the settings. 据我了解,您想将用户与设置联系起来。

Therefore, maybe fiddle around with Current.User and it's functionalities User Docs on Parse.com 因此,也许在Parse.com上摆弄Current.User及其功能User Docs

Also maybe a bit of a starter tutorial which shows how to create favorites for a user, this requires Current.User and a Collection (the books), but you can also use settings as a collection (Collections are based on Backbone Collections ). 也许还有一些入门教程 ,其中显示了如何为用户创建收藏夹,这需要Current.User和一个Collection(书籍),但是您也可以将设置用作一个collection(Collections基于Backbone Collections )。

With settings it might be possible and better to create seperate columns in the User datatable and save the settings there. 使用设置,可能并更好的方法是在User数据表中创建单独的列,然后将设置保存在那里。 This way you don't have to make a seperate connection with the User and the collection. 这样,您就不必与用户和集合建立单独的连接。

Is this what you were looking for? 这是您要找的东西吗? It feels a bit vague.. 感觉有点模糊。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM