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

May be rename COObjectGraphContext to COObjectGraph #68

Open
qmathe opened this issue Sep 28, 2016 · 2 comments
Open

May be rename COObjectGraphContext to COObjectGraph #68

qmathe opened this issue Sep 28, 2016 · 2 comments

Comments

@qmathe
Copy link
Member

qmathe commented Sep 28, 2016

I initially pushed for COObjectGraphContext to be named as such. This creates a symetry with COEditingContext, since they both act as contexts that manage respectively fine-grained objects (aka inner objects) and coarse-grained objects (aka persistent roots).

However it's causing a lot of verbosity issues, especially in EtoileUI where every single initializer needs to be passed an object graph.

I also observed that renaming COObjectGraphContext to COObjectGraph would also increase the symetry with the low-level API that Core mirrors:

  • low-level API: COSQLiteStore, COPersistentRootInfo, COBranchInfo, COItemGraph, COItem, CORevisionInfo
  • high-level API: COEditingContext, COPersistentRoot, COBranch, COObjectGraphContext, COObject, CORevision

If we make this change, COItemGraph & COItem are nicely mirrored as COObjectGraph & COObject in the high-level API. So in the end, I'm in favor of this change ;-)

Following this line of reasoning, we might argue that COEditingContext could be better named COStoreSnapshot or something similar. Unless we find a better name, I'm much more reserved about this change, since COStoreSnapshot seems to describe a static data object, not something mutable, editable and which supports commits. Any suggestions?

COStoreSnapshot sounds more like the result of a commit or a slice of a store. In fact in Placeboard, I have a class COStoreSnapshot that represents a partial snapshot of the store state, basically a set of persistent root snapshots packaged together to be sent over a network connection.

imo we can stick to COEditingContext, it sounds clear enough.

@ericwa
Copy link
Member

ericwa commented Sep 28, 2016

I support COObjectGraphContext -> COObjectGraph, feel free to do a find/replace.

Yeah, I think COStoreSnapshot gives the wrong impression for COEditingContext. Alternate names could be COPersistentRootManager or COStoreManager. Editing context is a decent name though.

@qmathe qmathe self-assigned this Sep 28, 2016
@qmathe
Copy link
Member Author

qmathe commented Sep 28, 2016

ok, I'll do this then.

@qmathe qmathe added the core label Oct 4, 2016
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

2 participants