hello Matthias,

>I'd like to follow your suggestion of September 21 where you say:
>
>> Btw, currently I have improved the cartridge already considerably,
>> I have taken your input into account and this has lead to some
>> other significant changes. I will not go into that yet, as
>> I will write a nice document to describe them all.
>> ... snip ...
>> I propose this: I will continue to work as it is now, I will finish
>> it and put a first beta in CVS, give everybody the time to try it out
>> and give some feedback. Given all that input we can then compile a
>> new strategy for this cartridge if needed. Is this okay ?
>
>I found this very reasonable. Discussing an intermediate result is
>always easier and more effective than discussing a possible future
>result. :-) So, I'd like to wait for your first beta to appear in CVS
>HEAD, along with the document and sample model that you mentioned below.
>Then, I'll have another (closer) look at it and give you feedback.
>

Very happy to see it's getting along; as I mentioned before, this week will be 
difficult, but next week you can expect something in CVS, with documentation and a 
sample. The sample will not be part of the CarRental (too much), but a smaller 
temporary model showing the features.

>Makes me curious what's coming up... ;-)
>

FYI and to already give you an idea about the way I handle the JSP <--> Controller 
events, here is what I had in mind when writing the cartridge:

1) I concluded that since we are modeling the process objects an action state maps 
onto a specific state of the front-end, in our case the rendering of a Struts/JSP page.

2) process states that do not need an actual View are modeled using ObjectFlowState 
elements.

3) Per use-case (activity graph) there is 1 and only 1 controller class, the Struts 
DispatchAction suits this job very well

4) an action triggered from a JSP page would call the controller class, each page has 
a specific action to call (remember, a DispatchAction has several 'execute()' 
methods), this is achieved by the cartridge taking a look at any triggered transitions 
going out of the action state (this JSP page)

5) no business logic anywhere in the front-end, only calls to the back-end (such as 
EJB facades (called Services in Andromda UML modeling) or something)
... etc

my experience was that this is very easy to model, I always found the modeling of 
classes with methods very cumbersome (but that's hardly a reason not to do it :-);

anyway, the result is a controller class per use-case and a method in this controller 
class per action state in that use-case, that method will known what kind of trigger 
originated the event

short example:

If you have a JSP asking the user if he is sure to log out or not, providing two 
buttons 'Yes' and 'No', you would have these files:

ask-if-user-is-sure-to-logout.jsp

<html:form action="/LogoutController?target=askIfUserIsSureToLogout">
  <html:submit property="trigger" value="YES"/>
  <html:submit property="trigger" value="NO"/>
</html:form>

(or hyperlinks, depending on what is desired)
LogoutController.java

public ActionForward askIfUserIsSureToLogout(ActionMapping, ...)
{
  final String trigger = form.getTrigger();

  if ("YES".equals(trigger))
    ...continue...
  else if ("NO".equals(trigger))
    ...continue...
  else
    return null;  // application error, should never occur!
}


I always liked this and felt comfortable with this approach since everything seemed to 
fall in place, but then again.. we never know what issue might popup ;-)

In your approach I was always wondering about these methods in the presentation 
classes, I understand why they are there, but I always thought that in Struts Form 
Beans ought to be simple beans, without any business logic (even delegating) ... 
anyway, I am confident we'll clear this up and come to an agreement

>Cheers...
>Matthias
>

b-bye
Wouter.

__________________________________________________________________
McAfee VirusScan Online from the Netscape Network.
Comprehensive protection for your entire computer. Get your free trial today!
http://channels.netscape.com/ns/computing/mcafee/index.jsp?promo=393397

Get AOL Instant Messenger 5.1 free of charge.  Download Now!
http://aim.aol.com/aimnew/Aim/register.adp?promo=380455


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to