You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Mike Williams <mi...@mikesbox.com> on 2001/05/07 23:24:21 UTC

Re: XSL instead of JSP

Guess I'll add my 2 cents :)  I'm also researching using XML in the view 
component of struts.

My needs may be a little off from what you're looking at though.  We 
have a application that currently runs as a web app.  However, some of 
our clients are a bit spoiled to the GUI of a desktop app.  So, I need 
to leverage our current expertise in servlets to interact with a desktop 
application.  That's where I hope XML will come into play.

The idea is to use Struts as the framework since we will probably still 
have some clients using the web based system.  Hey, that's the power of 
the MVC pattern after all.  You can easily plug a different view in and 
everyone is happy :)

XML will basically be a messaging protocol between the client and server.

Mike

Martin Eckert wrote:

> I'm also researching the possibilities at the moment to implement an XML
> solution in our app.
> I'm reading up on the cocoon project to see if there is a way of making
> struts and cocoon live together peacefully.
> 
> http://xml.apache.org/cocoon/
> 
> Any other suggestions or experience?
> 
> thanks,
> 
> Martin
> 
> 
> -----Original Message-----
> From: Paul Flynn [mailto:paulyflynn@yahoo.com]
> Sent: Monday, May 07, 2001 5:21 PM
> To: struts-dev@jakarta.apache.org
> Subject: XSL instead of JSP
> 
> 
> Has there been a discussion on using XSL/XML for the
> view portion of Struts?  If not, does anyone have any
> ideas on how to proceed.  I need to add this
> functionality.  This development will gladly be
> submitted to Apache.
> 
> Some vague ideas on how to use XSL:
> -add a <view-mappings> section to struts-config.xml
> -add a package org.apache.struts.view
> -add ViewServlet, View, etc
> -Xalan support
> 
> A few reasons to use XSL:
> -Most of my application data is already stored in XML.
> -I have more experience with XSL than JSP.
> -XSL gives less power to the GUI designer. :)
> 
> 
> thanks
> Paul Flynn
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/


-- 


----------------------------
Mike Williams
mike@mikesbox.com
http://www.mikesbox.com
----------------------------
May the Source be with you!
----------------------------


Re: XSL instead of JSP

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Tue, 8 May 2001, Mike Williams wrote:

> Joaquim,
> 
> That sounds like a great idea!  I had thought of SOAP initially then 
> moved on.  But, to be honest what I've come up with so far looks 
> suspiciously like SOAP :)
> 
> I would be very interested in seeing any code examples anyone might have 
> that has tried this or something similar.  No need to reinvent the wheel :)
> 
> I would also be willing to share anything that I come up with.
> 

A layer that mapped SOAP requests into calls to an Action would be pretty
interesting.  The hard part is mapping the input SOAP message into
something that looks like a request with its parameters.

A different strategy might be to integrate at the business logic *behind*
the Actions (EJBs or whatever).  That way, you could write a web app that
has a web browser interface and a SOAP interface, sharing the same
business logic classes.

> Mike
> 

Craig


> 
> Joaquim Carvalho wrote:
> 
> > I think one way to go would be to implement a SOAP layer on top of struts.
> > SOAP is a protocol to expose the functionality of an application to a 
> > remote client through the use of XML requests/and answers travelling on 
> > top of http. Typically a SOAP client constructs a remote call to the 
> > server much in the same way as a web form is filled with information in 
> > a browser. A post of this xml call could be sent to a struts app where 
> > it would be decoded in the same way a form is, creating the form beans 
> > and all that. The struts app them, instead of rendering the answer in 
> > HTML would render it in XML according to the SOAP answer specs. The 
> > client application can be done in anything that can write and read to 
> > http connection.
> > 
> > Check the SOAP project at xml.apache.org to get the idea of the thing 
> > although that particular project is not directly usefull in this context.
> > 
> > Some time ago I though of this and even inquired the list if this 
> > SOAP/STRUTS idea was interesting but  got no feed back and moved to 
> > other things. My recollection is that it would be easy to extend struts 
> > to recognize a XML post  besides of a Form Post and so SOAP and Struts 
> > could be easily mingled.
> > 
> > I have just finished a project of converting a legacy C web app to a 
> > SOAP/Web app and the result is very encouraging. The same code that is 
> > answering the direct browser requests also handles requests from clients 
> > written in VisualBasic. We even have APSs as XML clients of our app.
> > 
> > 
> > 
> > On Monday, May 7, 2001, at 10:24 PM, Mike Williams wrote:
> > 
> >> Guess I'll add my 2 cents :)  I'm also researching using XML in the 
> >> view component of struts.
> >> 
> >> My needs may be a little off from what you're looking at though.  We 
> >> have a application that currently runs as a web app.  However, some of 
> >> our clients are a bit spoiled to the GUI of a desktop app.  So, I need 
> >> to leverage our current expertise in servlets to interact with a 
> >> desktop application.  That's where I hope XML will come into play.
> >> 
> >> The idea is to use Struts as the framework since we will probably 
> >> still have some clients using the web based system.  Hey, that's the 
> >> power of the MVC pattern after all.  You can easily plug a different 
> >> view in and everyone is happy :)
> >> 
> >> XML will basically be a messaging protocol between the client and server.
> 
> 
> -- 
> 
> 
> ----------------------------
> Mike Williams
> mike@mikesbox.com
> http://www.mikesbox.com
> ----------------------------
> May the Source be with you!
> ----------------------------
> 
> 


Re: XSL instead of JSP

Posted by Mike Williams <mi...@mikesbox.com>.
Joaquim,

That sounds like a great idea!  I had thought of SOAP initially then 
moved on.  But, to be honest what I've come up with so far looks 
suspiciously like SOAP :)

I would be very interested in seeing any code examples anyone might have 
that has tried this or something similar.  No need to reinvent the wheel :)

I would also be willing to share anything that I come up with.

Mike


Joaquim Carvalho wrote:

> I think one way to go would be to implement a SOAP layer on top of struts.
> SOAP is a protocol to expose the functionality of an application to a 
> remote client through the use of XML requests/and answers travelling on 
> top of http. Typically a SOAP client constructs a remote call to the 
> server much in the same way as a web form is filled with information in 
> a browser. A post of this xml call could be sent to a struts app where 
> it would be decoded in the same way a form is, creating the form beans 
> and all that. The struts app them, instead of rendering the answer in 
> HTML would render it in XML according to the SOAP answer specs. The 
> client application can be done in anything that can write and read to 
> http connection.
> 
> Check the SOAP project at xml.apache.org to get the idea of the thing 
> although that particular project is not directly usefull in this context.
> 
> Some time ago I though of this and even inquired the list if this 
> SOAP/STRUTS idea was interesting but  got no feed back and moved to 
> other things. My recollection is that it would be easy to extend struts 
> to recognize a XML post  besides of a Form Post and so SOAP and Struts 
> could be easily mingled.
> 
> I have just finished a project of converting a legacy C web app to a 
> SOAP/Web app and the result is very encouraging. The same code that is 
> answering the direct browser requests also handles requests from clients 
> written in VisualBasic. We even have APSs as XML clients of our app.
> 
> 
> 
> On Monday, May 7, 2001, at 10:24 PM, Mike Williams wrote:
> 
>> Guess I'll add my 2 cents :)  I'm also researching using XML in the 
>> view component of struts.
>> 
>> My needs may be a little off from what you're looking at though.  We 
>> have a application that currently runs as a web app.  However, some of 
>> our clients are a bit spoiled to the GUI of a desktop app.  So, I need 
>> to leverage our current expertise in servlets to interact with a 
>> desktop application.  That's where I hope XML will come into play.
>> 
>> The idea is to use Struts as the framework since we will probably 
>> still have some clients using the web based system.  Hey, that's the 
>> power of the MVC pattern after all.  You can easily plug a different 
>> view in and everyone is happy :)
>> 
>> XML will basically be a messaging protocol between the client and server.


-- 


----------------------------
Mike Williams
mike@mikesbox.com
http://www.mikesbox.com
----------------------------
May the Source be with you!
----------------------------


Re: XSL instead of JSP

Posted by Mike Williams <mi...@mikesbox.com>.
Pat,

I agree with you.  Believe me it's not by choice that I'm doing this! 
Unfortunately, I haven't been able to convince management and customers 
:(  We're not going to scrap the browser based side anyway.  For a lot 
of our clients this is a better solution.

I haven't given up the fight but, I have to get this solution together 
first.  The biggest problem with our webapp is that we picked the wrong 
commercial framework in the beginning and are now paying the price.  The 
worst part about it is that most of the current development team wasn't 
around when the choice was made and we're paying the price :(

There is still hope.  Looks like some of our clients that want to stick 
with the browser based app are wanting better performance.  I see an 
opening for a rewrite with a better framework.., bet you can guess which 
one I'll pick :)

Mike


Ludwig, Pat wrote:

> hi,
>    with no offense meant, isn't the notion of promoting non-browser-like
> clients counter-productive to one of the basic benefits of network
> programming such as code maintenance and distribution? i certainly
> understand that this may be the best solution for some intranet and legacy
> apps, but it comes with a significant cost.  whether you communicate with
> these fat clients using SOAP or any other protocol, it doesn't change the
> fact that you have a substantial non-standard code resource on the client
> which will require periodic upgrades and bug fixes.  browsers remain
> frustratingly difficult to program sophisticated UI, but shouldn't we be
> focusing more on making browsers better client platforms than scrapping the
> benefits of zero client maintenance with custom clients?
> 
> Pat Ludwig
> Silverstream Software
> 
> 
>> -----Original Message-----
>> From: Joaquim Carvalho [mailto:joaquim@dei.uc.pt]
>> Sent: Tuesday, May 08, 2001 8:28 AM
>> To: struts-dev@jakarta.apache.org
>> Subject: Re: XSL instead of JSP
>> 
>> 
>> I think one way to go would be to implement a SOAP layer on top of
>> struts.
>> SOAP is a protocol to expose the functionality of an application to a
>> remote client through the use of XML requests/and answers
>> travelling on
>> top of http. Typically a SOAP client constructs a remote call to the
>> server much in the same way as a web form is filled with
>> information in
>> a browser. A post of this xml call could be sent to a struts
>> app where
>> it would be decoded in the same way a form is, creating the
>> form beans
>> and all that. The struts app them, instead of rendering the answer in
>> HTML would render it in XML according to the SOAP answer specs. The
>> client application can be done in anything that can write and read to
>> http connection.
>> 
>> Check the SOAP project at xml.apache.org to get the idea of the thing
>> although that particular project is not directly usefull in
>> this context.
>> 
>> Some time ago I though of this and even inquired the list if this
>> SOAP/STRUTS idea was interesting but  got no feed back and moved to
>> other things. My recollection is that it would be easy to
>> extend struts
>> to recognize a XML post  besides of a Form Post and so SOAP
>> and Struts
>> could be easily mingled.
>> 
>> I have just finished a project of converting a legacy C web app to a
>> SOAP/Web app and the result is very encouraging. The same
>> code that is
>> answering the direct browser requests also handles requests
>> from clients
>> written in VisualBasic. We even have APSs as XML clients of our app.
>> 
>> 
>> 
>> On Monday, May 7, 2001, at 10:24 PM, Mike Williams wrote:
>> 
>> 
>>> Guess I'll add my 2 cents :)  I'm also researching using XML in the
>>> view component of struts.
>>> 
>>> My needs may be a little off from what you're looking at
>> 
>> though.  We
>> 
>>> have a application that currently runs as a web app.
>> 
>> However, some of
>> 
>>> our clients are a bit spoiled to the GUI of a desktop app.
>> 
>> So, I need
>> 
>>> to leverage our current expertise in servlets to interact with a
>>> desktop application.  That's where I hope XML will come into play.
>>> 
>>> The idea is to use Struts as the framework since we will
>> 
>> probably still
>> 
>>> have some clients using the web based system.  Hey, that's
>> 
>> the power of
>> 
>>> the MVC pattern after all.  You can easily plug a different
>> 
>> view in and
>> 
>>> everyone is happy :)
>>> 
>>> XML will basically be a messaging protocol between the client and
>>> server.
>> 


-- 


----------------------------
Mike Williams
mike@mikesbox.com
http://www.mikesbox.com
----------------------------
May the Source be with you!
----------------------------


RE: XSL instead of JSP

Posted by "Ludwig, Pat" <pl...@silverstream.com>.
hi,
   with no offense meant, isn't the notion of promoting non-browser-like
clients counter-productive to one of the basic benefits of network
programming such as code maintenance and distribution? i certainly
understand that this may be the best solution for some intranet and legacy
apps, but it comes with a significant cost.  whether you communicate with
these fat clients using SOAP or any other protocol, it doesn't change the
fact that you have a substantial non-standard code resource on the client
which will require periodic upgrades and bug fixes.  browsers remain
frustratingly difficult to program sophisticated UI, but shouldn't we be
focusing more on making browsers better client platforms than scrapping the
benefits of zero client maintenance with custom clients?

Pat Ludwig
Silverstream Software

> -----Original Message-----
> From: Joaquim Carvalho [mailto:joaquim@dei.uc.pt]
> Sent: Tuesday, May 08, 2001 8:28 AM
> To: struts-dev@jakarta.apache.org
> Subject: Re: XSL instead of JSP
>
>
> I think one way to go would be to implement a SOAP layer on top of
> struts.
> SOAP is a protocol to expose the functionality of an application to a
> remote client through the use of XML requests/and answers
> travelling on
> top of http. Typically a SOAP client constructs a remote call to the
> server much in the same way as a web form is filled with
> information in
> a browser. A post of this xml call could be sent to a struts
> app where
> it would be decoded in the same way a form is, creating the
> form beans
> and all that. The struts app them, instead of rendering the answer in
> HTML would render it in XML according to the SOAP answer specs. The
> client application can be done in anything that can write and read to
> http connection.
>
> Check the SOAP project at xml.apache.org to get the idea of the thing
> although that particular project is not directly usefull in
> this context.
>
> Some time ago I though of this and even inquired the list if this
> SOAP/STRUTS idea was interesting but  got no feed back and moved to
> other things. My recollection is that it would be easy to
> extend struts
> to recognize a XML post  besides of a Form Post and so SOAP
> and Struts
> could be easily mingled.
>
> I have just finished a project of converting a legacy C web app to a
> SOAP/Web app and the result is very encouraging. The same
> code that is
> answering the direct browser requests also handles requests
> from clients
> written in VisualBasic. We even have APSs as XML clients of our app.
>
>
>
> On Monday, May 7, 2001, at 10:24 PM, Mike Williams wrote:
>
> > Guess I'll add my 2 cents :)  I'm also researching using XML in the
> > view component of struts.
> >
> > My needs may be a little off from what you're looking at
> though.  We
> > have a application that currently runs as a web app.
> However, some of
> > our clients are a bit spoiled to the GUI of a desktop app.
> So, I need
> > to leverage our current expertise in servlets to interact with a
> > desktop application.  That's where I hope XML will come into play.
> >
> > The idea is to use Struts as the framework since we will
> probably still
> > have some clients using the web based system.  Hey, that's
> the power of
> > the MVC pattern after all.  You can easily plug a different
> view in and
> > everyone is happy :)
> >
> > XML will basically be a messaging protocol between the client and
> > server.

Re: XSL instead of JSP

Posted by Joaquim Carvalho <jo...@dei.uc.pt>.
I think one way to go would be to implement a SOAP layer on top of 
struts.
SOAP is a protocol to expose the functionality of an application to a 
remote client through the use of XML requests/and answers travelling on 
top of http. Typically a SOAP client constructs a remote call to the 
server much in the same way as a web form is filled with information in 
a browser. A post of this xml call could be sent to a struts app where 
it would be decoded in the same way a form is, creating the form beans 
and all that. The struts app them, instead of rendering the answer in 
HTML would render it in XML according to the SOAP answer specs. The 
client application can be done in anything that can write and read to 
http connection.

Check the SOAP project at xml.apache.org to get the idea of the thing 
although that particular project is not directly usefull in this context.

Some time ago I though of this and even inquired the list if this 
SOAP/STRUTS idea was interesting but  got no feed back and moved to 
other things. My recollection is that it would be easy to extend struts 
to recognize a XML post  besides of a Form Post and so SOAP and Struts 
could be easily mingled.

I have just finished a project of converting a legacy C web app to a 
SOAP/Web app and the result is very encouraging. The same code that is 
answering the direct browser requests also handles requests from clients 
written in VisualBasic. We even have APSs as XML clients of our app.



On Monday, May 7, 2001, at 10:24 PM, Mike Williams wrote:

> Guess I'll add my 2 cents :)  I'm also researching using XML in the 
> view component of struts.
>
> My needs may be a little off from what you're looking at though.  We 
> have a application that currently runs as a web app.  However, some of 
> our clients are a bit spoiled to the GUI of a desktop app.  So, I need 
> to leverage our current expertise in servlets to interact with a 
> desktop application.  That's where I hope XML will come into play.
>
> The idea is to use Struts as the framework since we will probably still 
> have some clients using the web based system.  Hey, that's the power of 
> the MVC pattern after all.  You can easily plug a different view in and 
> everyone is happy :)
>
> XML will basically be a messaging protocol between the client and 
> server.