[ajug-members] the return value itself, not its type

Chris Abney Chris.Abney at theice.com
Fri Aug 22 10:53:45 EDT 2008


In the Java World article is an explanation.  The View allows the Model to update the view. The model using the views callback method after the view has 'said' to the model - "hey I'm an Observer of you"

Java World Article.

http://www.javaworld.com/javaworld/jw-10-1996/jw-10-howto.html

The Java programming language provides support for the Model/View/Controller architecture with two classes:

 *   Observer -- any object that wishes to be notified when the state of another object changes
 *   Observable -- any object whose state may be of interest, and in whom another object may register an interest


Callbacks, Observer pattern, Inversion of Control are all closely related concepts.  Very intesting stuff.  Certainly not your Dad's old procedural, top down design programming stuff.

Chris


________________________________
From: Wesley, Kammy [mailto:KAMMY.WESLEY at echostar.com]
Sent: Friday, August 22, 2008 8:51 AM
To: ajug-members at ajug.org; 521 at ofig.org
Subject: Re: [ajug-members] the return value itself, not its type

what you need is a callback method.  You should be able to google it.

Kammy

________________________________
From: 521 [mailto:521 at ofig.org]
Sent: Friday, August 22, 2008 7:55 AM
To: ajug-members at ajug.org
Subject: Re: [ajug-members] the return value itself, not its type


I am trying to watch computations as the process in a method.  Must I handle that with serparate methods for each operation?  It seems that I should be able to send values to a calling method at various ponts; or, perhaps better described would be that it seems I could push values from a running method in any direction I would like; via on method calling another and so on I would guess.

thanks gene,

barclay

On Thu, 21 Aug 2008 21:02:59 -0400, Eugene Thompson wrote
> Tell us what you are trying to achieve and maybe we can offer ways to do so.
>
> That being said, if you wish to return more than one value from a
> method call, you can either user a collection to gather them (a map or
> vector), create an object to hold the values (not recommended unless
> the collection of values actually describe some concept in your
> problem domain), or have the method set member variables (properties)
> in the current object as it processes the data.
>
> I'm assuming that you do not need access to the various return values
> before generating the others (as if you have a multi-threaded
> application which creates a whole 'nother set of issues).
>
> Hope this helps,
> Gene
>
> On Thu, Aug 21, 2008 at 8:27 PM, David Page <david.james.page at gmail.com> wrote:
> > I have no idea what you are talking about.
> >
> > On Thu, Aug 21, 2008 at 7:49 PM, mcdaniel <521 at ofig.org> wrote:
> >>
> >> how do most of you return/get values from a method that is running
> >> 'before' the method completes?  can i have multiple return statements?
> >>
> >> barclay
> >>
> >> _______________________________________________
> >> ajug-members mailing list
> >> ajug-members at ajug.org
> >> http://www.ajug.org/mailman/listinfo/ajug-members
> >
> >
> > _______________________________________________
> > ajug-members mailing list
> > ajug-members at ajug.org
> > http://www.ajug.org/mailman/listinfo/ajug-members
> >
> >
>
> _______________________________________________
> ajug-members mailing list
> ajug-members at ajug.org
> http://www.ajug.org/mailman/listinfo/ajug-members



________________________________
This message may contain confidential information and is intended for specific recipients unless explicitly noted otherwise. If you have reason to believe you are not an intended recipient of this message, please delete it and notify the sender. This message may not represent the opinion of IntercontinentalExchange, Inc. (ICE), its subsidiaries or affiliates, and does not constitute a contract or guarantee. Unencrypted electronic mail is not secure and the recipient of this message is expected to provide safeguards from viruses and pursue alternate means of communication where privacy or a binding message is desired.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.ajug.org/pipermail/ajug-members/attachments/20080822/edc2992e/attachment.html 


More information about the ajug-members mailing list