Questions about MCV architecture - who cares to answer ?

Discussions

EJB design: Questions about MCV architecture - who cares to answer ?

  1. Hi all,
    I'm studying the MCV pattern using as model
    the PetStore demo. How should I design an
    application so that it's accessible from
    many type of clients including Web clients,
    Java fat clients, Wap and so on ?
    In my opinion the entry point shouldn't be a servlet,
    it should be a very generic class that
    identify what kind of client is...what do you
    think ?
    and also I can see that information
    like ejb references are stored in http session
    but this breaks the goal of this model, that
    is abstracting the type of client from the
    model. In this case information should rather be kept on
    Session bean that live on the AServer and are accessible
    from every kind of client.
    Any feedback ?
    Thanks
    Mark


  2. I would use XML/XSL for the view, i.e. use the Apache Cocoon Framework to render HTML, WML, HDML, or whatever content type your view expects by applying different XSL stylesheets to DOM XML objects. This approache works very well when you combine Java, JavaBeans and the Xalan XSLTProcessor.
  3. Hi Collin,
    thanks for answering. I tried some time ago Xalan & Cocoon libraries- if you're using them extensively I wonder what do you think about their performance. Do you think they could bear the stress of production state? (I just did some small tests so maybe I'm wrong but it didn't look very fast)
    Regards
    Mark
  4. www.workthing.com huge commercial UK job site with about 500K hits per week use XML/XSL and Cocoon framework for the presentation layer
  5. If you care about MVC, I would highly recommend Struts which uses a second generation of MVC called Model 2 MVC. I just built a web app with it and was very impressed. It does take some time to learn how to use it, but it is so worth it in the end. Here is the URL: http://jakarta.apache.org/struts/index.html