Places:BookmarksComments: Difference between revisions

Jump to navigation Jump to search
Line 71: Line 71:
== Identity and URIs ==
== Identity and URIs ==


* If nothing else, we should use sqlite auto-inc PK IDs for bookmark identification internally, in order to disambiguate the basic issues of the same URI being bookmarked in different locations in the bookmarks hierarchy. Using the URI as the bookmark singleton leads us down a road of endless "special-cases".
* Singleton model: At a minimum, we should use sqlite auto-inc PK IDs for bookmark identification internally in order to disambiguate the basic issues of the same URI being bookmarked in different locations in the bookmarks hierarchy. Using the bookmarked URI as a singleton leads us down a road of endless "special-cases" as discussed previously.
* However, the issue of identity expands beyond the repercussions of the singleton model. The use of Places URIs indicates that we might want to use those as identifiers both internally and externally. The existing Places code does this when annotating livemarks, folders and queries.
* Global Uniqueness: However, the issue of identity expands beyond the repercussions of the singleton model. Auto-incrementing IDs are not globally unique, and cannot be used for identification outside of the local bookmark set. We should use GUIDs for identification, which will provide local and global disambiguation of bookmarks.
* But the mutability of Places URIs means they're fragile, high-maintenance and not persistent, which is a requirement for global use.
* Places URIs: Places URIs should be used as identifiers for external use, and internally, when using annotations as an extensibility mechanism. The existing Places code does this when annotating livemarks, folders and queries. We should add APIs to generate URIs for bookmarks and separators, and update folder URIs to use a GUID instead of the auto-incrementing ID. The mutability of Places URIs means they're fragile, high-maintenance and not persistent, which is a requirement for global use. How should we construct the URI? place:{GUID}? Should we include type, eg: bookmark, folder, livemark, tag? place:{type}:{GUID}?
* Using immutable and unique URIs solves the need for disambiguation both internally and externally.
* How should we construct the URI? place:{GUID}? Should we include type, eg: bookmark, folder, livemark, tag? place:{type}:{GUID}?


== Versioning ==
== Versioning ==
Confirmed users, Bureaucrats and Sysops emeriti
2,088

edits

Navigation menu