Dynamic Customizable Components

So, I've been working on a way for the repository application to have customized "look and feel" - theming or branding - for various users. Turns out that the best way to do this totally destroys the Model/View/Controller design pattern. I'm basically mashing Model and View together, and using a single Controller for the combo.

Works great, though. I take the .html and .wod files and merge them together into a single .html string, which is associated with a component. This merged .html is then stored in a database, and called up when an appropriate request is made (theme matches, and component name matches). This .html string is then deconstructed into freshly minted .html and .wod files and fed into the standard WebObjects component handling mechanism, and a response is fed back to the user.


  • http://commons.ucalgary.ca/repository/commons
  • http://commons.ucalgary.ca/repository/careo
  • http://commons.ucalgary.ca/repository/alexandria

All are the exact same WO app (same instance, even), but the ?theme= parameter determines which merged .html combo string should be pulled from the database to generate the response.

VERY flexible. Too bad it breaks the WebObjects tools (WOBuilder doesn't understand...)


See Also

comments powered by Disqus