December 11, 2000, 12:00 AM — Use HMVC to design a client-tier architecture
Though you may find the task daunting, you can effectively manage the
development of a presentation layer for an application by incorporating
smart development into your strategy -- that is, by using a robust and
scalable pattern that can reduce some of the risk and provide a ready-
made design foundation on which to build.
There are three key aspects of client-tier development:
* GUI layout code: Widget layout and screen look and feel
* GUI feature code: Validations and user-event capture
* Application logic code: App flows, navigation, and server
The HMVC design pattern encourages the decomposition of the client tier
into developed, distinct layers for implementing GUI and application
services. A pattern-based architecture results in standardization; the
HMVC pattern standardizes the presentation (user-service) layer of Web
applications. Standardization in the presentation layer helps
* UI consistency: The framework divides a visual entity (view) into
panes with specific, consistent responsibilities and
* Standardized interaction: The interaction between the various
subcomponents within the presentation layer is clearly defined,
providing customizable base classes.
* Maintainable code: Using a pattern results in maintainable code
that provides a flexible and extensible code base for developing
* Application flow support: The framework structures the
presentation service into distinct layers and provides for inter-
and intralayer communication. Such a structure offers a strong,
orderly way to implement application logic and flow.
The HMVC pattern provides clear delineation of responsibility among the
different components and layers. Standard design patterns (Abstract
Factories, Composite, Chain of Responsibility, Facade, etc.) can be
used to provide a stable design.
The horizontal layers specify the hierarchy within the application; the
vertical slices refer to the components of the MVC triad. Within a
layer, the controller has the overall responsibility of managing the
model and view components. For example, the GUIFrame Controller
controls the GUIFrame Model and the GUIFrame (the view). The dashed
lines between model, controller, and view within a layer signify
clearly defined interfaces for communication. This interaction is
achieved through AppEvents. For intralayer communication, a parent-
child controller hierarchy exists, and all intralayer communication can
only be routed through this path. Controllers interact by means of
A user interacts with the view, the visible portion of the application.
HMVC abstracts views at different levels to provide a clean method for
designing the GUI.