samedi 10 octobre 2015

Pattern that supports multiple related logics

I need pattern or idea how to refactor my architecture, because, in my opinion, what I have now is a bit inelegant.

I'm creating server in C#/.NET. I have interface that provides multiple methods to client (IClientLogic) and class that implements this. All methods in one class would create BLOB with over 16k lines. So, I cut it into couple small logics (UsersLogic, StocktakingLogic, BookLogic etc...). They all inherit from DataLogic, and ClientLogic calls what it needs (it have instance of all logics). And now, I need to be able to call some methods from all logics in others logics.

For example: call in BookLogic method Foo() from UsersLogic or call in StocktaingLogic method Foo2() from BookLogic etc...

Is there ay pattern that helps me achive my goal?

Aucun commentaire:

Enregistrer un commentaire