Rice is made up of three layers: the core, demo-specific subscription services, and the user interface.
At its core, any ICE implementation must speak HTTP, parse and output XML, and handle ICE data types like timestamps and URLs. In addition, it makes sense to provide behavior common to syndicators and subscribers.
Rice is no different. It uses Ruby classes to speak HTTP and retrieve URL contents. It relies upon NQXML to parse and write well-formed XML. It provides timestamp parsing and formatting. Finally, the Rice core contains classes that can build ICE messages and that implement common syndicator and subscriber behavior.
Logging, an optional part of the ICE spec
The Rice::URL class represents a URL. It can parse strings to create URLs and can fetch the content of a URL based on its schema. Only HTTP and FTP fetching are implemented in Rice.
In Ruby v1.7, a URL class was introduced. The stable version of Ruby as of this writing is 1.6.5; version 1.7.X is a development version, though it is easily available via CVS. When Ruby v1.7 is released as a stable version and becomes widely used, Rice::URL may no longer be necessary.
Ruby's Net::HTTP and Net::FTP classes provide transport and content retrieval support.
To use HTTPS (SSL), must download additional packages from the Ruby Application Archive.
Building XML messages: payload => request/response => ping/confirmation/error
I may want to change the code so rice/datetime.rb extends Time class instead of using a static methods that take a Time object as an argument. For example, instead of using the class method DateTime.timeToICEDateTime which takes a Time object as one of its arguments, we could provide Time.to_ice_dt.
Party: syn/sub superclass. ICEMachine (common ICE syn/sub behavior): pinging, returning repsonses, error responses and codes.
The Rice::Syndicator and Rice::Subscriber classes share many common behaviors that are implemented in their superclass Rice::ICEMachine. They are both implemented as Web-based services that listen for and receive ICE packages via a form POST to a URL and reply with the proper ICE package.
Error codes and I18N.
Ping, time, date, unknown, error
Inline and by reference; inline = ice-item, by reference = ice-ref
Syn. and sub. "mini-sites": Web pages using eRuby
Listener dispatches requests
Mini-sites: Interface plus role-specific behavior. Some behavior should be factored out of mini-sites.
eRuby is like PHP or JSP.