[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index] [Home]

Re: Article: Problems with JSPs


> Conceptual poorness, please expand. Easy for programmers? Doesn't make
> it any easier for coders IMHO, but does for your web guys that do the
> pages. Well, I'm not talking about ASP here; I've only got bad things to
> say about ASP.
> And actually on that point, I guess it does make the coders job easier *if*
> the decision is made to go model 2 because you can enforce a requirement
> (at the management level :) to package everything as business logic
> beans, which will perhaps wind up being a better coding strategy
> in the long-run, saving time later if things need reworking etc.
> 
> >  JSP provides no way of abstracting logic from style. There's no easy way to
> > get a consistent user interface (just an "include"? come on!).
> 
> Yes there is, thats the whole point of it. What about model 2 here? You
> package all your business logic into beans that talk with your backend
> services; all the (D)HTML guys have to do is embed JSP tags where they
> need the required functionality, and, yes, include is used to good effect.
> Whats wrong with include? For instance, you can create a look-and-feel
> bean that your coders reference for things like background colour, table
> borders etc... whats wrong with this separation?
> >  The future is something like Cocoon (from http://xml.apache.org/) ,
> > although it's not very clear yet how it will turn out to be (XSP? XSLT
> > extensions?).
> Sweeping statement :), but Cocoon is looking great I agree... I hope
> I haven't shown a glaring ignorance here, just my input on the topic.

 What's wrong with includes? Imagine that I'm writing a banking web
application. There are many places where an account info must be shown. The
logic people would provide the info about the account (form
SQL,CORBA,what-ever). With model 2 you would have a bean, and use code to
format the bean according to the circunstances. Doesn't it feel better to
have the logic part output something along the lines of:

<account>
<number>1243343434</number>
<type>checking account</type>
...
</account>

 Then a XSLT sheet (somthing that is not too hard to write) would format
this as HTML, or, if the browser supports it, it would send the plain xml
file with a pointer to the XSL (MS Explorer already supports this, but with
an incompatible and old version of the XSL standard, this will change).

 XSLT could also be used to easily create new tags, as in taglib. The only
thing needed is the proper template. The Cocoon people has created a
variation of JSP for this, so the JSP code is generated by the XSLT sheet!
Everything about this is in flux, but it's already more powerful than jsp
would ever be able to be.

 At least that's what I think. Sorry if I've spoken too strongly... =)