Incorporate XML in my presentation layer?

Discussions

XML & Web services: Incorporate XML in my presentation layer?

  1. Incorporate XML in my presentation layer? (1 messages)

    Hi all,

    I have got 2 queries with regard to integrating an XML presentation layer in the J2EE layered architecture:

    1. Suppose I develop my website using purely J2EE MVC design, without any XML at all. How extensible it is if in future I need to extend my website to cater to other devices (PDAs, mobile phones, etc)? In other words, what is the impact like? Do I have to redevelop all my JSPs, servlets, EJBs?

    2. Suppose I use XSLT for my presentation layer, and it currently generates HTML for Web browser. If in future I need to extend to other devices, what is the effort like? Do I just develop new XSLT WITHOUT changing any of my content and other J2EE components?

    Thanks for your help!

    Regards,
    Alvin
  2. I think that it depends on the devices you intend to support.

    I think that you could use XSLT to in your presentation tier if all you need are clients that support some type of markup language. A single screen and screen flow definition along with some transformation rules would work.

    On the other hand, if you will be supporting clients such as SWING, Windows Native, etc. You might have to either develop your own framework for translation of XML screen defintions to these clients, or develop different Presentation Tiers for each client type, of which XSLT may be one.

    The Presentaion Tier is the most changeable part of any application and since it changes so frequently, it's usually more effort to have a single source for screen definitions and flow without running into problems. Regression testing will find problems between client devices when changes are made. Also, you have the "lowest common denominator" problem of using advanced features of each client device.

    It's really the job of the presentation tier to build and deliver commands to the Business Tier. I think that it is best to concentrate on the Presentation/Business tier boundary and keep all business rules in the business tier and assume that you'll have multiple presentation tiers to support, each maximizing the features of the client device that it targets.