Accessibility

Flex Article

 

NoteTag: Anatomy of a Flex mashup


Table of Contents

Comments

How NoteTag works

NoteTag was built on top of a handful of components that are decidedly not about notes and tasks. Figure 1 shows how these components relate to the overall NoteTag architecture:

NoteTag architectural overview

Figure 1. NoteTag architectural overview

The components (from bottom to top) are:

corelib

The corelib library is an ActionScript 3.0 library developed by the Adobe Developer Relations team, and available on the Adobe Labs site. The Kiwi team didn't develop this library, but we use it heavily (for URI support, date parsing, and WSSE authentication), and I expect that most Flex developers will want to add it to their arsenal of tools.

Connections

The Connections library provides basic support for connection management. Read/write web applications typically make calls to multiple web services, often authenticating with different credentials for each service—NoteTag is a good example of this behavior, using del.icio.us to store metadata relating to notes and tasks, and Blogger or TypePad to store the note content. The Connections library provides an object model for user-specific Connections to an Endpoint (e.g., Blogger) that supports a specific Protocol (e.g., the Atom Publishing Protocol). NoteTag uses the Connections library to manage user connections to blog servers and tag servers.

Feeds

The Feeds library provides a format-independent Feed object model for Atom 0.3, Atom 1.0, RSS 1.0, and RSS 2.0. NoteTag uses feed entries (or "items" in RSS parlance) to store notes. Because the fields of a note (such as the meeting name, meeting content, note author, and so forth) map quite well to the fields of a feed entry (such as title, content, author), using feed entries to represent notes is a natural fit.

AtomProtocol

The AtomProtocol library provides a generic interface for the Atom Publishing Protocol, and two specific implementations: Blogger and TypePad. The protocol interface and the object model for the introspection document conform as closely as possible to the current draft (08) of the Atom Publishing Protocol specification, though there are some features that we did not use. NoteTag uses the AtomProtocol library to publish notes to a blog server.

TagServerProtocol

The TagServerProtocol library provides a generic interface for a tag server protocol, and one specific implementation: del.icio.us. NoteTag uses the TagServerProtocol library to publish URL-based references to notes and tasks to a tag server.

Cairngorm

Cairngorm is an architectural framework created by the Adobe Consulting team, updated for Flex 2 in Adobe Labs. It provides a template for building layered, loosely-coupled Flex applications. The Cairngorm concept of features as commands is what enables developers to easily scale their applications from a few classes to a few thousand classes. In a later section, I'll describe how NoteTag uses the concept of features as commands to implement its business logic.