Frinje implements the Controller component of the MVC architecture using the Frinje event bus and command classes.

The Frinje event bus is a global event bus that extends and improves the capabilities of the native Flex event model. Rather than requiring each component class to dispatch and receive events directly to and from one another, the Frinje event bus lets you use metadata annotations to specify the events relevant to your classes. The Frinje event bus routes events for your application to classes that are registered to subscribe to those events.

The view, mediator, command, and proxy classes in the Frinje framework work together with the Frinje event bus to drive the vSphere Web Client user interface. Classes that dispatch events, typically views and mediators, use metadata annotations to specify the events they generate. Likewise, classes that handle events, typically command classes, use metadata annotations to specify the events they can receive. The Frinje event bus is responsible for routing the events and instantiating the receiving class at runtime.

By using the Frinje event bus, event-dispatching classes, such as views or mediators, and event-handling classes, such as command classes, can be developed independently without those classes explicitly referencing one another.

In the Frinje framework, a command class is responsible for handling events generated by changes in the state of the user interface. When the user clicks a button, for example, the View containing that button dispatches an event on the Frinje event bus. A command object is instantiated to handle that event using the appropriate business logic.

Events can be dispatched from any part of the Frinje framework, but are commonly generated from view or mediator classes in response to user actions. For example, if the user clicks an action for which you previously created an action extension, the vSphere Web Client generates a Frinje event using the appropriate action ID. As part of your action extension, you must provide a command class with a method annotated to handle the generated Frinje event.