Tuesday, February 25, 2003

Navigation missing from MVC paradigm?

After playing with Struts and seeing its notion of what Model-View-Controller means (versus traditional "fat client" MVC), I think that MVC needs to add an explicit model for Navigation. A so-called NMVC design pattern.

In traditional MVC, Views are individual pages/dialog-boxes/panes/etc. and Controllers are geared towards translating (mouse/keyboard/clock) events into transaction requests against some data Model.

The large item left out is the universal need to define Navigation between views using controllers that are geared towards "movement" i.e. transactions against a Navigation model. In other words, a data model specifically geared towards user interface control is needed that is separate from the data models managing "business/domain/application data".

Since UI navigation (especially in a web site context) usually maps well onto a finite state machine, a navigation model geared towards FSMs (with the definition of the state-transition graph specified in an external config-file maybe?) would take out some of the grunt work of UIs.

No comments: