> > I was planning to use this approach for our project.But I couldn't
> convince
> > my manager because of the following problems with this approach ( I am
> sure
> > this will be solved in future)
> > 1.There is no direct way of sending the xml geberated out of jsp( i mean
> u
> > have jsp tags in xml page,and processed as usual) to a XSL engine.
>
> Well, there's not a direct way but if you use, as we do, taglibs then
> it's pretty much as if it were direct. I got this idea from Joe Milora
> (thanks Joe :)) and then my JSP pages might look like that.
>
> **** Sample Model 3 JSP page
>
> <%@ taglib uri="/leafTag/" prefix="leaf" %>
> <?xml version='1.0' encoding='iso-8859-1'?>
> <leaf:XSLEval xsltSheetName="../conf/Problems.xsl">
> <%
>       // Retrieve the Problem set there by the Model 2 action class
>       Problem theProblem = (Problem)request.getAttribute("theProblem");
> %>
> <Problem
>   Code="<%= theProblem.getCode() %>"
>   Title="<%= theProblem.getTitle() %>"
>   Description="<%= theProblem.getDescription() %>"
>   FAQ_URL="<%= theProblem.getFaqURL() %>"
> >
> </Problem>
> </leaf:XSLEval>
> **** Sample Model 3 JSP page
>
> The tag XSLEval post processes the result of the JSP page(XML) with the
> stylesheed specified and that's all. The stylesheet could also be
> dynamically specified.
>
>
> > 2.Writing XSL is a pain(especially in the context where designers will
> > design the page) and there are no visual tools which will give xsl ,as
> we
> > manipulate layout or something like that.
>
> I agree. I hope time will solve this one but rigth now the best we've
> found is something like Excelon Stylus which lets you perform visual
> development of the XML&XML and then preview the results. What we do is
> perform first a static HTML protoype and the get from there the basis
> for the XSL page. Training your designers will also speeed up this
> process.
>
> > 3.This is one more layer and is it really worth it?
>
> That's what we are trying to see :). From the development point of view,
> I think it does. Let's see what happens with performance. As I mention,
> for some small apps. it might be an overkill but trading manteinability
> and separation of layers for some performance penalty might be worthy
> for many others.
>
> > If you have solutions ,please let me know because it may be my
> ignorance.BTW
> > for jsp-->xml--xsl-->html, I was looking at cocoon.
>
> Cocoon was basically designed for dealing with static XML but you can
> get lots of useful ideas, code and insights from having a look at it. We
> learnt a lot from it and then we are trying to apply it to dynamic XML.
>
> I hope this helps a bit,
> Dan
> -------------------------------------------
> Daniel Lopez Janariz ([EMAIL PROTECTED])
> Web Services
> Computer Center
> Balearic Islands University
> -------------------------------------------
>
>
> > Thanks for any inputs
> > vishu
> >
> > > -----Original Message-----
> > > From: Daniel Lopez [SMTP:[EMAIL PROTECTED]]
> > > Sent: Monday, May 08, 2000 12:36 PM
> > > To:   [EMAIL PROTECTED]
> > > Subject:      Model 3 Architecture
> > >
> > > Hi,
> > >
> > > Some people asked my about this "Model 3" I talked about in my last
> > > posting about "model 2 servlet mapping question" so I thought I should
> > > explain what I meant, not to confuse people. First, before people
> starts
> > > asking about specifications and documentation, it's by no means an
> > > official name and AFAIK  it hasn't been mentioned anywhere. It's just
> an
> > > idea several people in this list seem to be using and I just have to
> > > give it a short name so... my apologies if this drrove someone to
> > > confusion. Explanation follows:
> > >
> > > After playing a while with model 2, I have to admit it's far for
> perfect
> > > and one of the places where it doesn't convince me is in the part
> where
> > > web designers (non programmers) have to deal with JSP code to generate
> > > the UI. Sure that taglibs will help and sure that tools will come up
> to
> > > help drag&drop development but it still doesn't convince me so I
> > > thought, as many others, of using XML&XSL as an extra layer(hence the
> > > name Model 3) between the generation of the data and the construction
> of
> > > the UI. The architecture goes like that:
> > > .- Controller servlet gets a request and determines the appropriate
> > > Action to be executed.
> > > .- The Action performs the business logic using the data sources
> (Files,
> > > DB) and forwards control to the appropriate JSP to "format" the
> result.
> > > .- The JSP page formats the result in XML, which is more easily
> > > understood by designers, can be used as documentation, and for which
> > > fake document sets are easily generated. The JSP can also determine
> "on
> > > the fly" which XSLT sheet will be used to generate the UI.
> > > .- The XSLT sheet transforms the XML into HTML, WML, PDF and result is
> > > sent to the client.
> > >
> > > Advantages:
> > > .- Programming part and design are completely separated. You just
> agree,
> > > at the beginning if possible, the format of the XML documents and then
> > > the programmer have to care on how to generate them dynamically and
> the
> > > designers on how to generate the UI from them.
> > > .- IMHO, there will be more tools to handle XML&XSL -> HTML than
> > > drag&drop JSP to HTML. XML, XSL are already standards, taglibs are
> not,
> > > and it will be easier to train, or find somebody trained, in these
> > > technologies than in using taglibs with some mixed Java.
> > > .- Your desing is more technology independent, you might decide to
> > > change to  WebMacro to generate the XML and you wouldn't have to
> bother
> > > your designers with a new syntax. For example, in our first
> application
> > > we are going to mix XML generated from JSPs with XML generated
> directly
> > > with PL/SQL.
> > > .- There are some others because of using XML, XSL but I'm focusing on
> > > the XML&XSL vs JSP.
> > >
> > > Disadvantages
> > > .- Performance: We have yet to test it but adding an extra layer
> always
> > > means more computations. We are trying to avoid that using direct
> > > generation of XML from PL/SQL when possible but we know we'll have to
> > > pay for this extra layer. We hope improvements in the parsers and
> smart
> > > caching of XSLTProcessors will help in this regard.
> > > .- XSL,XSL are not widely known by designers. But we hope that's a
> > > matter of time before tools and relatively widespread knowledge of the
> > > technology are there. And you would have to teach your designers your
> > > taglib&Java-mix syntax anyway so...
> > >
> > > We are developing our first application using these approach and
> that's
> > > what we've learnt so far. I know it can be an overkill for some apps.
> > > but it might be very adequate for others. Anybody that's using it has
> > > gathered more info? Comments anyone? Anybody can think of another,
> more
> > > appropirate name? ;)
> > > Regards,
> > > Dan

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to