On 19/11/2008, at 9:59 AM, zwigby wrote:

So I was thinking of each calculation being a command and
then the steps would be helper classes that use delegates to get the
information from local database. Any thoughts would be great. Thanks
in advance.


Hi Zwigby,

All your calculation helpers and data access delegates are part of your business package (not everything in business has to be a remote service delegate - it's also home to filters, validators, formatters and the kind of helper utilities you describe). As you suggest you would instantiate and call these business classes from a command*.

When in doubt, my rule of thumb is to strictly think of a command being responsible for co-ordinating responses to a single user action, so if there was one act to kick off the calculations I would write one command and get it to run all the calculations, even going to the extent of making multiple asynchronous calls if necessary or writing a little state machine to keep track of things - this is when having command logic in it's own class gives you the elbow room to do more complex stuff. BTW commands don't have to implement IResponder if they aren't calling asynchronous methods.

HTH,
Robin

*or occasionally directly from the view, if what you're doing isn't changing the model. Think of the way the Flex SDK validators and formatters are used in views all the time - they are really business classes helping the view out. Dependency and isolation-wise the important bit is that they themselves don't know they're helping the view.

                
        ROBIN HILLIARD
Chief Executive Officer
[EMAIL PROTECTED]

RocketBoots Pty Ltd
Level 11
189 Kent Street
Sydney NSW 2001
Australia
Phone +61 2 9323 2507
Facsimile +61 2 9323 2501
Mobile +61 418 414 341
www.rocketboots.com.au  
                


Reply via email to