Our assignment was to write a Connect pod that implemented the concept of breakout groups. Currently, everyone in one Acrobat Connect Meeting sees the same thing. This is fine for most situations, but it's natively impossible to split participants into subgroups for discussions or brainstorming.
We were asked to implement a workflow with three phases:
We decided from the start to implement the Model-View-Controller (MVC) architectural pattern. By dividing the application into several pieces with clearly delineated functional boundaries, it's easier to fix and improve individual pieces without destroying the others, and it's easier to work together as a team without stepping on one another's toes. MVC is pretty common in application development, so you might already know what it is, but here's a quick overview of what it can do and how we used it.
We started by planning the model. In MVC, the model represents the application state data. For example, in an MVC implementation of a clock application, the model would store the current time. For us, this is what our model had to store:
Next, the views. The view is just the user interface. Views know what to display because they have a reference to the model. ActionScript lends itself particularly well to this, with its elaborate and flexible event-dispatching model. The view accepts user input, but doesn't really do anything with it. Instead, it leaves the decision-making and state operations up to the controller, which it alerts when some user action is performed. We wrote four view classes: one overall view class that contained a subview, and three subviews—only one of which could be displayed at once. Each subview corresponded to one of the three phases.
At long last, the almighty controller. The controller is responsible for deciding when and how to change the model. It can decide to do this for internal reasons—a clock's state might need to be changed every second—or for external ones, like user input—if the time is inaccurate and needs to be set manually, for example.
In our case, the controller was responsible for the following:
The controller is serious business.
Basu describes our implementations of the model and views in the next few pages; Raphael writes about the controller afterward.