Reputation: 1820
In my Flex app, I use one remote object and multiple destinations. Is that a bad idea? It seems to be working just fine except for the one or two fringe cases:
Upvotes: 0
Views: 607
Reputation: 761
As you've guessed. This is bad design for a multitude of reasons:
My suggestion would be to wrap two remote objects into a single parent object. You can pass this single object/class around and still have access to both destinations.
OR
If you're anticipating adding multiple features, create a singleton class with methods for handling remoting logic. This will keep Remoting access consistent across your application and leaves the destination logic contained in one place.
Upvotes: 1