Hitachi Vantara Pentaho Community Wiki
Child pages
  • Advanced Guide to MVC in Pentaho XUL Applications
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

MVC in Pentaho Xul applications can be acheived by architecting your application using the pattern we will detail here.  As a refresher, the purpose of the MVC pattern is separation of concerns in UI applications.  The idea is to keep a clear separation between the data we would like to display and how that data is being displayed.  In Pentaho Xul framework the view layer is represented at least partially represented in a xul dom object (typically coming from a xul file).  I say "partially" because you could consider view logic to be part of the view and view logic is not included in the xul dom.

Model

  • represented as a Java Bean (with property change support)
  • contains view logic such as enablement and visibility, i.e. the state of UI components
  • applies form validation

View

  • represented in the xul dom
  • creation of ui components
  • layout of ui components

Controller

  • represented as a Java class that implements XulEventHandler
  • binds UI state to the model
  • performs UI action handling (not related to component state) such as launching of dialogs
  • No labels