Fog Creek Software
Discussion Board




To the OOP, Java and Patterns buffs out there

I have an Swing application. I have defined an action to be used by a menu and a button on a toolbar. Of course the action os going to do something, but here comes my doubt. Where should I put the businnes logic: in the Action class or should I put it in another class and instantiate that class from the Action?

And if so, what about performance? As far as I know, instantiating Swing classes in Java is one of the heaviest operations around.

Any advice on this is extremelly welcome.

RP
Friday, April 23, 2004

Have the action call another class or 'service layer'.

Nothing too heavy weight just something like 'saveCustomer(Customer c)'

Koz
Saturday, April 24, 2004

I agree with Koz.

James
Sunday, April 25, 2004

*  Recent Topics

*  Fog Creek Home