Graphics Programs Reference
In-Depth Information
change its value of hasBeenRead to YES . For each row in the table, a checkmark would
be displayed if the corresponding RSSItem 's hasBeenRead variable is YES .
In normal circumstances, this is a great approach, but our plan for Nerdfeed is more ambi-
tious. We'd like users to be able to use Nerdfeed on all of their iOS devices, and if an RSS
item is read on one device, then that item should appear as read on every device. Another
feature of iOS, iCloud, will allow Nerdfeed to do this with minimal effort.
We'll get into the specifics of iCloud in the next chapter, but here's a brief introduction.
iCloud allows documents to be stored in a user's iCloud account instead of in the applica-
tion sandbox. These documents are then available to all of a user's devices via the cloud.
When one device changes one of those documents, every other device sees those changes,
so the same application on other devices can read and modify the same document.
While we could store the cached RSSItem s in the cloud (along with a “hasBeenRead”
flag), this would be a waste of space and bandwidth. The data for the RSSItem s is
already available on another server, so there is no reason to redundantly store it in the
user's iCloud account. Instead, the only data that needs to be shared is the link of each
item that has been read ( Figure 29.8 ). (Remember, the link of an item is its URL and is
what makes an item unique.)
Figure 29.8 Model diagram for read RSSItem
 
Search WWH ::




Custom Search