Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename core notions #710

Closed
leplatrem opened this issue Jul 7, 2016 · 16 comments
Closed

Rename core notions #710

leplatrem opened this issue Jul 7, 2016 · 16 comments

Comments

@leplatrem
Copy link
Contributor

leplatrem commented Jul 7, 2016

Now that cliquet is in kinto.core, some naming is confusing.

In the core, resources are called collections, and objects are called records.

But, in Kinto, collections and records are instantiation of resources!

I suggest some renaming in kinto.core:

  • collection to resource
  • record to object
  • collection_id to resource_name (or object_type ?)
  • record_id to object_id

That represents quite some work, but reducing confusion is always worth it.

@leplatrem
Copy link
Contributor Author

  • impacted_recordsimpacted_objects

@leplatrem
Copy link
Contributor Author

  • Total-Records -> Total-Objects

@almet
Copy link
Member

almet commented Sep 13, 2016

This would allow a lot more readability, that's a good idea.

@mansimarkaur
Copy link
Member

I'd love to work on this.

@mansimarkaur
Copy link
Member

object is a global variable in Python. Should we be concerned about that when we move from record -> object?

@Natim
Copy link
Member

Natim commented Oct 17, 2016

Should we be concerned about that when we move from record -> object?

Yes

@mansimarkaur
Copy link
Member

So, what else should we name a record as if not object?

@Natim
Copy link
Member

Natim commented Oct 17, 2016

Cannot we be concerned and still use it?

@Natim
Copy link
Member

Natim commented Oct 17, 2016

To elaborate I think that most of the time we will use object_id and if we need to use object we can choose to use obj instead to not override the object Python global variable?

@mansimarkaur
Copy link
Member

Yes, obj seems to be a good option. Thanks!

@leplatrem
Copy link
Contributor Author

  • Collection endpointPlural endpoint
  • Record endpointObject endpoint

@leplatrem
Copy link
Contributor Author

leplatrem commented May 2, 2017

with_deleted=Falseleave_tombstones=False
include_deleted=Falsewith_tombstones=False

@leplatrem
Copy link
Contributor Author

process_record()process_object()

@glasserc
Copy link
Contributor

collection_timestamp -> ?? I don't like resource_timestamp. Maybe plural_timestamp, or children_timestamp?

@peterbe
Copy link
Contributor

peterbe commented Dec 13, 2018

What about https://kinto.readthedocs.io/en/stable/api/1.x/records.html
We renamed the Total-Records header to Total-Objects (but kept both to be gentle). Should the /records (and its documentation) be redirects for /objects now?

@leplatrem
Copy link
Contributor Author

Nope, because in this case records is not a «core notion». Now core has the notion of objects, and buckets, collections, groups, records and accounts leverage it.

Before it was confusing because there were the terms records and collections in kinto.core...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants