Re: [NTLK] State of the NewtSync

From: Steven Frank <stevenf_at_panic.com>
Date: Fri Apr 14 2006 - 00:47:43 EDT

OK, so I've been in contact with Nowhere Man and he gave me the go
ahead to monkey with the source in whatever way I see fit.
I have successfully moved the NewtSync application, Clock, and
Address Book plugins to a brand new Xcode project. They now compile
as Universal binaries, and so should run on both PowerPC and Intel Macs.

I am leaving the plugin architecture intact, because, upon further
review, it doesn't complicate things very much at all, code-wise. I
also brought over the TCP/IP connection method, although I have no
way to test it right now. I am testing exclusively with a USB-serial
adapter.

I am still focusing exclusively on the Address Book plugin for now,
while getting my bearings, because it is the simplest. I've learned
a few interesting things about the way it works, which I will
describe here for my own future reference, and just in case anyone is
curious.

1. Duplicate checking is "name based".

What do I mean? Well, when syncing contacts from one side to the
other, NewtSync determines whether a not a record for that person
already exists by looking solely at the person's name.

This generally works fine, except in the following situations:

   a. You have more than one person with the same exact full name.
Possible, but not likely. (Does anyone?)

   b. You change a person's name. In this case, the record with the
old name will hang around, and a new record will be created for the
new name.

2. The Address Book plugin never deletes any records.

Neither from the Newton nor Address Book. This is a probably a good
thing, until the app stabilizes a bit, but it does mean it's not
really "syncing". It's just replicating new/updated records from one
side to the other. If you delete a record on one side, it will
continue to exist on the other. Doing a "true" sync (especially
doing it _quickly_) is quite a bit harder, so I wonder how much
people care about this, or if this is acceptable the way it is.

3. Syncing only looks at modified records.

The plugin queries both the Names app and Address Book only for
records with a modification date more recent than the last sync.
This means you generally have a slow first sync that evaluates every
record, then much faster subsequent syncs, as you are only looking at
a few records, if any.

However, it also means that if a record doesn't come over properly
the first time after it's modified (for whatever reason), NewtSync
will never even look at it again unless you modify it again.

The "Reset" buttons in NewtSync's prefs fix this by pushing the "last
sync" date 30 years into the past, so your next sync will slowly
evaluate every record again.

4. Address Book syncing does not support "Company" cards.

But I think we already knew that. I would like to add this, but I
haven't figured out how yet. Time for a crash course in NewtonScript.

I welcome anyone's comments on the above.

This is certainly an interesting adventure so far...

Steven
http://panic.com/
http://stevenf.com/

-- 
This is the NewtonTalk list - http://www.newtontalk.net/ for all inquiries
Official Newton FAQ: http://www.chuma.org/newton/faq/
WikiWikiNewt for all kinds of articles: http://tools.unna.org/wikiwikinewt/
Received on Fri Apr 14 00:47:53 2006

This archive was generated by hypermail 2.1.8 : Fri Apr 14 2006 - 09:30:00 EDT