hellodanylo / key2gym

The Key2Gym's mission is to create an open, excellent user experience providing, scalable, modern, platform-independent application for running small to medium-sized gyms.
1 stars 0 forks source link

ManageDialogs Factory #28

Closed hellodanylo closed 12 years ago

hellodanylo commented 12 years ago

Description

Some dialogs like ManageItems and ManageSubscription follow very close patter: add, edit, remove buttons, table with DTOs, and a form to edit. It should probably be encapsulated in a factory, because these dialogs dot not expose new properties or methods, just behavior.

Advantages

Better architecture design.

hellodanylo commented 12 years ago

I think factory is not really appropriate here. Inheritance (if code duplication is really that great) will give the same result, while allowing future extension that factories won't give.