RE: Problem Statement for some standard e-Biz requirmentsf

2003-06-10 Thread Navjot Singh
hi sadhas,

I am not a kind of geek but i guess i understand what you intend to do.

May be me views are totally wrong but this is what i think i.e simple.

1. For intercepting uris with customer format and then forward
   If we don't underestimate the power of FilterServlet, Can't we use them?

2. Hooks
  You may be able to solve the problem by overriding processPreprocess
method
  that get's called before we actually determine mapping and process the
roles.

regards
Navjot Singh


|-Original Message-
|From: J, Sadhasivam (Cognizant) [mailto:[EMAIL PROTECTED]
|Sent: Friday, June 06, 2003 7:09 PM
|To: [EMAIL PROTECTED]
|Cc: [EMAIL PROTECTED]
|Subject: Problem Statement for some standard e-Biz requirmentsf
|
|
|Hi,
|
|   Problem Statement
|   =
|   As per my understanding towards the struts that it
|doesn't have the Trigger kind of mechanism to solve
|   some of the  typical e-Biz scnerios or standard requirments
|for example
|
|   1. Log all the URIs with some custom format and
|give to some other serivces
|   This has to happen irrespective of regular flow.
|
|   2. Standard channel behaviour in portal. Like Yahoo
|shows weather/ads etc to a User or User group. etc.
|
|   Such kind of requirement is very common and not
|been taken in struts i belive.
|
|   I have come up with an approach to cater these problems.
|   I did a proof of concept also and i would like to
|know is its really a good approach
|   or is there any othere standard way to implement
|this in Struts.
|
|   Hope apache/open source foundation people spent
|some time to give me
|   an indication whether this approach is correct or not.
|
|   Approach Taken
|   ==
|   Shall call this phenomenon as Hooking
|
|   Step 0: Write a Standard Interface to perform this Hooking
|   ==
|   public interface ActionHook
|   {
|   public void prePerform(
|HttpServletRequest request );
|   }
|
|
|   Step 1: addition of XML Nodes in struts-config.xml
|   ==
|   Justification
|   =
|   Since these problems are pertainting to the
|problem space and
|it should be configured at the runtime to
|pick up these data.
|
|   struts-config.xml
|   
|   
|   
|   
|
|
|
|   Step 2: Load ActionHook Object through digester.
|   ==
|   Justification
|   =
|   Configured classes are loaded by
|HookRuleBase and HookRule classes as a standard way from apache.
|
|
|   Step 3: Changes in the ActionServlet to process ActionHooks
|   ==
|   Justification
|   =
|   Load the ActionHooks Object and process the
|ActionHooks before even start the form processing.
|
|   processHook(ActionMapping mapping,
|HttpServletRequest request )
|   {
|   Iterator keySet =
|hookMap.keySet().iterator();
|
|   while( keySet.next() )
|   {
|   Object key = keySet.get( key );
|   ActionHook hook = (
|ActionHook )hookMap.get( key );
|   hook.prePerform( request) ;
|   }
|   }
|
|
|   Step 4: Write a custom ActionHook object to perform this.
|   ==
|   public class ChannelHook implements ActionHook
|   {
|   public void prePerform( ActionForward
|forward, HttpServletRequest request, HttpServletResponse response )
|   {
|   // TO DO
|   // Required Busisess Logic and Set
|the Object Object in the mentioned Scope
|}
|   }
|
|
|   Tnx for the patient reading. About to hear more
|things from you guys.
|
|
|regards
|sadhas
|
|
|
|
|
|-Original Message-
|From: J, Sadhasivam (Cognizant)
|Sent: Wednesday, June 04, 2003 10:25 PM
|To: '[EMAIL PROTECTED]'
|Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
|Subject: RE: Struts redirection problem
|
|
|The doubt is can implement portal channel kind of behivour where
|in channels are dropped in my dynamic contents
|and in the content area requalr CRUD operation will be followed.
|
|-Original Message-
|From: J, Sadhasivam (Cogn

Problem Statement for some standard e-Biz requirmentsf

2003-06-06 Thread J, Sadhasivam (Cognizant)
Hi,

Problem Statement
=
As per my understanding towards the struts that it doesn't have the 
Trigger kind of mechanism to solve 
some of the  typical e-Biz scnerios or standard requirments for example

1. Log all the URIs with some custom format and give to some other 
serivces
This has to happen irrespective of regular flow.

2. Standard channel behaviour in portal. Like Yahoo shows weather/ads 
etc to a User or User group. etc.

Such kind of requirement is very common and not been taken in struts i 
belive. 

I have come up with an approach to cater these problems. 
I did a proof of concept also and i would like to know is its really a 
good approach 
or is there any othere standard way to implement this in Struts.

Hope apache/open source foundation people spent some time to give me 
an indication whether this approach is correct or not.

Approach Taken
==
Shall call this phenomenon as Hooking

Step 0: Write a Standard Interface to perform this Hooking 
==
public interface ActionHook
{
public void prePerform(  HttpServletRequest request );
}


Step 1: addition of XML Nodes in struts-config.xml
==
Justification
=
Since these problems are pertainting to the problem space and
 it should be configured at the runtime to pick up these data.

struts-config.xml 







Step 2: Load ActionHook Object through digester.
==
Justification
=
Configured classes are loaded by HookRuleBase and HookRule 
classes as a standard way from apache.


Step 3: Changes in the ActionServlet to process ActionHooks
==
Justification
=
Load the ActionHooks Object and process the ActionHooks before 
even start the form processing.

processHook(ActionMapping mapping, HttpServletRequest request )
{
Iterator keySet = hookMap.keySet().iterator();

while( keySet.next() )
{
Object key = keySet.get( key );
ActionHook hook = ( ActionHook )hookMap.get( 
key );
hook.prePerform( request) ;
}
}


Step 4: Write a custom ActionHook object to perform this.
==  
public class ChannelHook implements ActionHook
{
public void prePerform( ActionForward forward, 
HttpServletRequest request, HttpServletResponse response )
{
// TO DO 
// Required Busisess Logic and Set the Object Object 
in the mentioned Scope
 }
}


Tnx for the patient reading. About to hear more things from you guys.


regards
sadhas





-Original Message-
From: J, Sadhasivam (Cognizant) 
Sent: Wednesday, June 04, 2003 10:25 PM
To: '[EMAIL PROTECTED]'
Cc: '[EMAIL PROTECTED]'; '[EMAIL PROTECTED]'
Subject: RE: Struts redirection problem


The doubt is can implement portal channel kind of behivour where in channels are 
dropped in my dynamic contents
and in the content area requalr CRUD operation will be followed.

-Original Message-
From: J, Sadhasivam (Cognizant) 
Sent: Wednesday, June 04, 2003 9:22 PM
To: 'Struts Users Mailing List'; '[EMAIL PROTECTED]'
Subject: RE: Struts redirection problem


in the problem statement i have mentioned that we are doing that but its not the right 
way to do as per my assumption.
because do the formvalidation if its invalid instead of going to the action.perform 
redirect to jsp directly
is the struts thumb rule and design. 

Ideally is it good to over look that and 
hypotheically if the user knows that action then get the view without doing form 
validation.. i don't think struts will allow this even thought its a good work around.



-Original Message-
From: Andrew Hill [mailto:[EMAIL PROTECTED]
Sent: Wed