diff --git a/Technotes/SyncGotchas.markdown b/Technotes/SyncGotchas.markdown new file mode 100644 index 000000000..9431eecaa --- /dev/null +++ b/Technotes/SyncGotchas.markdown @@ -0,0 +1,20 @@ +# Possible Gotchas To Be Aware When Working on Syncing + +## Accounts and the local account + +NetNewsWire was written to support multiple accounts. + +However, there may be places where the code assumes the local account, when really it needs to refer to a specific account. These references should be checked. + +However however, there are times when assuming the local account is actually correct — such as when importing the default feeds on the first run. + +## Feed ID vs. Feed URL + +With the local account, a feed’s ID and its URL are the same thing. + +With syncing systems, a feed’s ID will often be completely different from its URL. (It might be a UUID, it might be a hash of something, it might be a database row ID.) + +There are times when the code should refer to the ID and times when it should refer to the URL. Did we get it wrong sometimes? Possibly. Hopefully not, but possibly. + +Also: if the syncing system uses an integer for a feed’s ID, it should be converted to a string in NetNewsWire. This is what the database is expecting — because a string is the most flexible representation and can handle whatever the various systems use. + diff --git a/Technotes/Syncing.markdown b/Technotes/Syncing.markdown index 6b623594c..989f20726 100644 --- a/Technotes/Syncing.markdown +++ b/Technotes/Syncing.markdown @@ -4,4 +4,6 @@ This document will collect notes relevant to syncing. [Account Structure](Accounts.markdown) -[Why Articles and Statuses Are Separate Tables](ArticlesAndStatuses.markdown) \ No newline at end of file +[Why Articles and Statuses Are Separate Tables](ArticlesAndStatuses.markdown) + +[Possible Gotchas To Be Aware When Working on Syncing](SyncGotchas.markdown) \ No newline at end of file