Black Box Parsing.
NetNewsWire doesnt know anything about RSS or Atom. Heck, it doesnt know XML from Shinola.
Which is an absurd claimit wouldnt be much of an aggregator if it were true. Butheres the dealto me as the developer, it is true.
Ill explain…
But first: the below is of interest mostly to beginning programmers
and power users who are curious about how things work under the hood.
Its a post about architecture, about time-tested and mother-approved
techniques. (Truly mother-approved. My mom is a code reuse expert.)
Inside NetNewsWire
The part you see of NetNewsWire is
an application that knows how to display data in NetNewsWires internal
data format. That format is a collection of custom objects that use
strings and arrays and so on.
For instance, an individual item in a feed is a data-item object,
and that object contains attributes such as title, link, description,
and so on. And a feed is a data-source object, and it has a set of
attributesincluding an array of data-item objects.
These objects are the same for RSS and for Atom, even though
the feed formats are different. Even if more feed formats come to be,
Ill keep using these same data-item and data-source objects. These
objects dont know thing one about RSS and Atom. Theyre more abstract:
theyre like the ideal of a feed and feed items. . . . [inessential.com]