c# - Should all controls in a complex software inherit from a self written interface -


is idea, create interface controls should used in complex software (wirtten c#/wpf)? have problem, use controls microsoft , third party companies. our problem is, if want change third party components, don't want change howle software, because lot of customizing our customer.

so idea, create abstract class every control use, , use member abstract class/interface provides?

maybe bad solution reasons, , don't it.

thank you!

this deep question try give response.

i start saying separate presentation logic ui controls. generally, should peek design pattern derived mvp or use current trend pattern, called "presentation model" invented martin fowler.

i highly recommend read every information software design , best practices. start read here: http://martinfowler.com/eaadev/organizingpresentations.html

from experience, best gain of doing separation between ui , presentation logic not changing ui technology rather gives freedom test easy presentation logic. in entire career never switched ui controls provider.

so, have in mind testability not changing ui technology.

talking patterns, in wpf (you said use wpf) there presentation logic pattern used => called mvvm wich not fancy old presentation model in rebranded clothes.

related how think problem... aproach describing more related "model-view-presenter" pattern, more passive-view subpattern in wich controls abstracted presentation logic using interfaces. state present in ui , logic in presenter. contrary presentation model pattern in wich state in presenter , logic there.

i think should not make cocktail of presentation patterns in application , advice be: let mvvm base pattern , try use corectly. testability enhanced pattern , don't think ever need change ui technology in case. if change it, if coded corectly on mvvm pattern change doable.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -