new in CVS of ScaffoldingXPress (aka XP/bP) for good practices

Vic Cekvenich <[email protected]> Sat, 03 May 2003 13:20:57 -0400
Newsgroups gmane.comp.java.mvc.devel
Organization baseBeans Engineering
Message-ID <[email protected]>
1st- People asked for onActionFinalize to clean up session beans when 
actions change. Now checked and working in CVS.

It adds an action scope, similar to request or session scope. When 
actions change, onFinalize() gets called (via some class instance flags) 
where you can remove any beans action mappings put in session. Very 
helpful for larger/complex apps to keep sessions size small.
I originally just had dispatching in action to do onSave, onDisplay, etc 
to do simple dispatch. Then I added onLogon which uses flags to detect 
when J2EE authenticates a user.
Now there is onFinalize that gets fired when user changes action. (by 
using events like this, you can have other action signatures, such as 
Tiles Actions, etc.)

2nd. I got a lot of e-mail asking for multi row validator, also now in 
CVS in XP/bP base package. The Struts validator asks for [] (arrays) 
accessors /muttators. With this class, you can use same getters/setters 
as in single row for you multi row, so no need to use [], I think it's 
simpler.

 Next release of XP/bP will include this, but CVS (sf.net) has it now! 
Event driven action and list backed bean might be good wish list for 
Struts v2.

 

3: next? A good practice is to have a bean be backed by a list. This way 
any DAO, even non SQL DAO that might work against MQ, etc. can copy data 
to it. So XP/bP baseBean does this now of course.
Now I added getXDoc method (in CVS)  that uses JDOM and bean reflection 
to return a W3 XML Document. (This might be good to move to BeanUtils)  
So you can make your formbean return a XML representation of your data 
list. This lets you use Struts form beans in things like SOAP (so people 
interested in Struts/SOAP, take a peak). (I will be using it with 
actionscript (similar to ECMA script)  using Flash FireFly components 
for RIA, under Apache License, with $0 run time costs. Yes, Flash Fire 
Fly (aka Data Connector for Flash) is free runtime (unlike Remoting), 
but you do have to pay for IDE - like we pay for things like InteliJ, 
but.... 0 runtime cost and offloads scrolling, etc. to run on client 
side) So far I created a package org.apache.openSCF and tested flash to 
XML, then will remove remoting). As you might know, I wrote the first 
book on Struts, 18 months ahead of any others. Hear me now, listen to me 
later, but future is RIA. (Client Side Rich UI). MVC would be a view in 
Fire Fly, a Java FormBean  talking to stored procedures.  Example will 
be a Struts blog, that can emit RIA.

This will be one chapter in my upcoming book.

 

4. BaseBeans "best practice" online training is end of May, only for 
people that already know Struts and willing to code hands on.
We will cover MasterDetail processing, reporting, stress testing, 
iBaits, bean DAO helper, etc.

Also, there are some new mails lists in news.basebenas.com (JDOM, Fire 
Fly, Eclipse, pgSQL, Hibrenate, Struts, ApectJ, etc) and some new cheat 
sheets on www.baseBeans.com.

.V

<a href ="baseBeans.com">Struts Training</a> and project recovery in 
North East. <p>
<a href ="baseBeans.com">Content Management</a> basic Portal<p>
<a href ="baseBeans.com">Supported Struts</a> best practice 
ScafflodingXPress<p>