Personally, I'd have a DeliveryOptions object and have the logic in
there and inject it into the basket so I would have
numeric function getShippingCostGross()
{
return variables.DeliveryOptions.getShippingCost(
ShippingAddress().getCountry(), getItemCostGross() );
}
Of course, there's no "One True Way" so it's all about preferences and
trade offs. However, you have a DeliveryOptions table/object that
you're querying and that seems the obvious place for this
calculation...
Makes sense. Sadly, it gets a whole lot more complicated (recorded /
express / heavy all affect the cost as well!), so I just needed bounce
it off someone else.
Thanks again,
- John
> --
> You received this message because you are subscribed to the Google Groups "Object-Oriented Programming in ColdFusion" group.
> To post to this group, send email to coldfu...@googlegroups.com.
> To unsubscribe from this group, send email to coldfusionoo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/coldfusionoo?hl=en.
>
>
All the more reason to put it in a ShippingCalculator object then :)
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies, Inc. -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood