You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Greg Hess <gh...@wrappedapps.com> on 2002/10/23 16:54:00 UTC

Managing User defined Web Content design advice?

Hi All,

I am developing a hosted ecommerce app. One of the requirements is that the
client's have the ability to customize sub menu navigation providing the
link name and link content.

I am considering several possibilities of persistency and tags that might
help me do this. I would like to take advantage of Struts features if it
would benefit the app i.e.: MessageResources to hold the custom content. One
of my main concerns is speed and not overloading the session with loads of
content. I know I have to store the content somewhere and the requirements
state that I use a flat file or multiple flat files. Some of my ideas are
below and I would greatly appreciate any advice that you all might have.

1) Serialize some java bean containing all the custom content and store in a
file(maybe using XMLEncoder and Decoder, I like it :-) ) or properties
file(why not use        MessageResources?) and have an Action load the
requested content and place the content String in the request and for ward
to a reusable contentDisplay.jsp.

2) Create new files for each body of content and simply <jsp:include> or
<bean:include> the page into the template. The problem here is that as the
number of links and content is user defined and I only know how to use the
include tags with static resources. Sure I could include an action but how
would I dynamically add parameters to inform the include resource as to
witch content to retrieve? I see that page param of bean:include is labeled
(RT EXPR) does this mean that I can use an expression the provide that
attribute, I have never been able to do this??? If I could do it in this
manner I think it would be cleaner but obviously not sure how.

Well those are my ideas, if anyone has done this before or could provide
some advise on how this should be done it would be greatly appreciated.

Many thanks,

Greg

Re: Managing User defined Web Content design advice?

Posted by "V. Cekvenich" <vi...@users.sourceforge.net>.
A good way to do this is to reuse.
There is a Struts sample app at basicPortal.sf.net that does content 
management, and already has 2 clients using it and the implemented 
design, db desgin and source code is free on above link.

It stores content as XML inside a DB.
It can be approved, RSSed, etc.

The XML content can be displayed using JSTL X:Transform on the server or 
  via STXX on the browser.

So take a look and use the existing/working code. It has several other 
neat features, like CMA, DAO, zero copy, commons-sql, etc. etc.

Of course, several people can do consulting on it, or anyone else who 
has developed Struts apps to production.

.V
917 345 1445

Greg Hess wrote:
> Hi All,
> 
> I am developing a hosted ecommerce app. One of the requirements is that the
> client's have the ability to customize sub menu navigation providing the
> link name and link content.
> 
> I am considering several possibilities of persistency and tags that might
> help me do this. I would like to take advantage of Struts features if it
> would benefit the app i.e.: MessageResources to hold the custom content. One
> of my main concerns is speed and not overloading the session with loads of
> content. I know I have to store the content somewhere and the requirements
> state that I use a flat file or multiple flat files. Some of my ideas are
> below and I would greatly appreciate any advice that you all might have.
> 
> 1) Serialize some java bean containing all the custom content and store in a
> file(maybe using XMLEncoder and Decoder, I like it :-) ) or properties
> file(why not use        MessageResources?) and have an Action load the
> requested content and place the content String in the request and for ward
> to a reusable contentDisplay.jsp.
> 
> 2) Create new files for each body of content and simply <jsp:include> or
> <bean:include> the page into the template. The problem here is that as the
> number of links and content is user defined and I only know how to use the
> include tags with static resources. Sure I could include an action but how
> would I dynamically add parameters to inform the include resource as to
> witch content to retrieve? I see that page param of bean:include is labeled
> (RT EXPR) does this mean that I can use an expression the provide that
> attribute, I have never been able to do this??? If I could do it in this
> manner I think it would be cleaner but obviously not sure how.
> 
> Well those are my ideas, if anyone has done this before or could provide
> some advise on how this should be done it would be greatly appreciated.
> 
> Many thanks,
> 
> Greg
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Managing User defined Web Content design advice?

Posted by Greg Hess <gh...@wrappedapps.com>.
Thanks Cedric,

I really like the tiles solution. One of my main concerns as this
application is in a hosted environment is hogging resources . I would like
to avoid not having the user content existing in memory. I am going to have
to test with large amounts of content and see the size of the bean object.
My other main concern is speed and I would like to not have to perform file
I/O for every content request. I am currently using Struts template strategy
because I am performing HTTP/HTTPS switching and employing sub apps in the
application that was not supported by Tiles the last time I checked, but I
will migrate to this design when the functionality is supported.

Greg

-----Original Message-----
From: Cedric Dumoulin [mailto:cedric@apache.org]
Sent: Thursday, October 24, 2002 3:59 AM
To: Struts Users Mailing List
Subject: Re: Managing User defined Web Content design advice?




Greg Hess wrote:

>
>2) Create new files for each body of content and simply <jsp:include> or
><bean:include> the page into the template. The problem here is that as the
>number of links and content is user defined and I only know how to use the
>include tags with static resources. Sure I could include an action but how
>would I dynamically add parameters to inform the include resource as to
>witch content to retrieve? I see that page param of bean:include is labeled
>(RT EXPR) does this mean that I can use an expression the provide that
>attribute, I have never been able to do this??? If I could do it in this
>manner I think it would be cleaner but obviously not sure how.
>
  Have you consider to use Tiles for the dynamic content ? There is a
(simple) example of user customized menu and user customized portal
content in the tiles-documentation.war (under examples). It should be
easy to adapt the examples to serve user customized body, with dynamic
attributes. One key point is that Tiles definition can be created or
modified dynamically, for example in a struts action.

      Cedric

>
>Well those are my ideas, if anyone has done this before or could provide
>some advise on how this should be done it would be greatly appreciated.
>
>Many thanks,
>
>Greg
>
>
>


--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Managing User defined Web Content design advice?

Posted by Cedric Dumoulin <ce...@apache.org>.

Greg Hess wrote:

>
>2) Create new files for each body of content and simply <jsp:include> or
><bean:include> the page into the template. The problem here is that as the
>number of links and content is user defined and I only know how to use the
>include tags with static resources. Sure I could include an action but how
>would I dynamically add parameters to inform the include resource as to
>witch content to retrieve? I see that page param of bean:include is labeled
>(RT EXPR) does this mean that I can use an expression the provide that
>attribute, I have never been able to do this??? If I could do it in this
>manner I think it would be cleaner but obviously not sure how.
>
  Have you consider to use Tiles for the dynamic content ? There is a 
(simple) example of user customized menu and user customized portal 
content in the tiles-documentation.war (under examples). It should be 
easy to adapt the examples to serve user customized body, with dynamic 
attributes. One key point is that Tiles definition can be created or 
modified dynamically, for example in a struts action.

      Cedric

>
>Well those are my ideas, if anyone has done this before or could provide
>some advise on how this should be done it would be greatly appreciated.
>
>Many thanks,
>
>Greg
>
>  
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>