We had some actions which would create beans from request and session
attributes and place the bean in the request. This made it hard to go
'back' to the page in question, because it was no longer just a matter of
getting the form attributes in the request and forwarding to the JSP, you
also had to create a bean to go along with it.

Most of these got fixed so that all relevant information for the JSP was in
the form bean attributes and hence could be passed in via a URL.

One of the points on the elements of struts development page that rang
especially true was having base actions. We also had a base form bean as
well.
Our structure is like this:

Form Bean -> Project Base Form Bean -> Multitask Base Form Bean
Action -> Project Base Action -> Multitask Base Action

where -> is "extends".

The project 'base's hold project relevant code, and the company (Multitask)
level holds stuff reusable across projects.

We had a value object layer to separate EJBs and actions as well, with
Session EJB methods only accepting value objects as parameters, not form
beans. The value objects had a 'base' class as well that handled copying
bean properties and had a generic toString as well.
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
NetRexx: http://www.multitask.com.au/NetRexx.nsf
----- Forwarded by dIon Gillard/Multitask Consulting/AU on 11/07/2001 01:45
PM -----
Re: SV: Struts, EJBs and Pizza


[EMAIL PROTECTED] wrote:
> I could go on and on....but the good news was Struts was an immense help.

Please do -- I think the world may be ready for "The Elements of Struts
Development"

< http://husted.com/about/struts/elements.htm >

The "avoid transient beans" point sounds especially interesting ...


[EMAIL PROTECTED] wrote:
>
> Lots.
>
> - No java code in JSP pages is achievable if you're willing to write tags
> - Look for reuse between forms beans and between actions.
> - Call the same field the same name on all forms
> - Keep all data necessary to process the request either in the request or
> in an easily accessible bean.
> - Don't create transient beans to process requests - make them part of
the
> form bean
> - Layer your application: Separate form beans from value objects - use
> factories.
>
> I could go on and on....but the good news was Struts was an immense help.
> --
> dIon Gillard, Multitask Consulting
> Work:      http://www.multitask.com.au
> NetRexx: http://www.multitask.com.au/NetRexx.nsf
> ----- Forwarded by dIon Gillard/Multitask Consulting/AU on 11/07/2001
> 02:07 AM -----
> SV: Struts, EJBs and Pizza
>
> nice!!!
>
> how was the development??? any lessons learned???
>
> Mikkel


                                                                           
                                                                           
                                                                           
              Previous Document (Embe (Embe Next Document                  
                                dded   dded                                
                                image image                                
                                moved moved                                
                                to       to                                
                                file: file:                                
                                pic00 pic18                                
                                041.p 467.p                                
                                cx)     cx)                                
                                                                           
                                                    Return to View         
                                                                           
                                                (Embedded image moved to   
                                                  file: pic06334.pcx)      
                                                                           


pic00041.pcx

pic18467.pcx

pic06334.pcx

Reply via email to