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
blanks.

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="/PrepaidAccountInfo.do" />
  <forward name="PrepaidPlaceCall" path="/PrepaidPlaceCall.do" />
  <forward name="PpiAccountInfo" path="/PpiAccountInfo.do" />
  <forward name="PpiPlaceCall" path="/PpiPlaceCall.do" />
  <forward name="WifiAccountInfo" path="/WifiAccountInfo.do" />
  <forward name="WifiPlaceCall" path="/WifiPlaceCall.do" />
</global-forwards>

<action-mappings >
 <action
 path="/mainPage"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".accountInfo.mainLayout" />
<action
 path="/PrepaidAccountInfo"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".prepaid.accountInfoLayout" />
<action
 path="/PrepaidPlaceCall"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".prepaid.placeCallLayout" />
<action
 path="/PpiAccountInfo"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".ppi.accountInfoLayout" />
<action
 path="/PpiPlaceCall"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".ppi.placeCallLayout" />
<action
 path="/WifiAccountInfo"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".wifi.accountInfoLayout" />
<action
 path="/WifiPlaceCall"
 type="org.apache.struts.actions.ForwardAction"
 parameter=".wifi.placeCallLayout" />
</action-mappings>






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to