struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Skip Hollowell" <>
Subject Need advice on design decisions and architecture issues.
Date Wed, 07 Apr 2004 15:29:05 GMT
I am not sure if this is an acceptable forum for a question like this but I
need some advice on how to proceed with a design for an application.  Some
of you (Andy, Niall) have helped on a few things already regarding the
DynaValidator stuff.  Let me describe the app first, and some of the things
that we are definitely doing, and then maybe you can help me fill in the

This app will require a user to log in, and based upon who they are, they
will have certain priveleges in the system.  Some of these priveleges may be
modified by a manager at anytime (user has processed their dollar limit for
the day, but needs a higher limit for whatever reason).

The interface will be Tab based, and tabs will be enabled/disabled on
per-user basis. Each tab will represent a page with a form (or several
forms) of data that display things from the database and allow the user to
update data in the database.  I also believe that since this is a
customer-care application, that not more than 1 user will be working with
any given set of customer data at any 1 time.

Things I know so far.  We are using Struts 1.1 as the basic framework for
the system.  We are using Tiles for piecing together the parts of the
interface (tabBar, header, body, footer for each page).  It has also been
suggested that we use SAIF (Interceptor Framework) to be able to process
before every action whether the user is logged in, and what they are allowed
to do.  We could then also do some after-action processing as needed.

Now the questions:

1. With my tabs, I have what turns out to be at least 30 actions, and will
probable be closer to 60 when it is all said and done.  So I have created
them all in the struts-config.xml as show below.  But then I am going to
need form beans for each one, and a DynaValidatorActionForm for each, won't
I?  The granularity of this is nice, and I like the concept of keeping
everything separated out, but is this overkill?  Is there a better way to do
this kind of work?  As you can see, some of this is related functionality,
but just for different types of data.  Is there some way to use just 1
Action for all these forms on my app?  (I would doubt it, but I want to see
what you have to say)

2. Is SAIF the best (probably not) way to go for handling users and roles.
How do you handle what a user is allowed to do and see in a struts based
application?  What do I do if a user tries to hand code an URL and go to a
part of the system he is not authorized for?  Right now I am looking at the
SAIF saying "not authorized" (which I already have) and then ... what?
Redirecting them to the login page I would assume (if they are not logged
in) or to the main (start) page if they are logged in.

Those are my two biggest dilemmas right now, handling the user-roles issue
and how to handle so many different forms and actions in the app.  I am sure
there are others, but they escape me know that I am actually writing this
all down.

Ideas?  Comments?  Pointers?  All are greatly appreciated.

Skip Hollowell

struts-config.xml [edited]
<global-forwards >
  <forward name="PrepaidAccountInfo" path="/" />
  <forward name="PrepaidPlaceCall" path="/" />
  <forward name="PpiAccountInfo" path="/" />
  <forward name="PpiPlaceCall" path="/" />
  <forward name="WifiAccountInfo" path="/" />
  <forward name="WifiPlaceCall" path="/" />

<action-mappings >
 parameter=".accountInfo.mainLayout" />
 parameter=".prepaid.accountInfoLayout" />
 parameter=".prepaid.placeCallLayout" />
 parameter=".ppi.accountInfoLayout" />
 parameter=".ppi.placeCallLayout" />
 parameter=".wifi.accountInfoLayout" />
 parameter=".wifi.placeCallLayout" />

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message