質問

I am trying to learn all I can about making specific objects and elements in a program more decoupled. I need to be able to extend them, move them, and reuse them without any needed alteration or possible errors cropping up.

What are the individual issues I will need to address and be aware of? Examples include:

  • Passing in objects with a class defined outside the object
  • Running a function or referencing a different object outside of the object

I'm also trying to find a list of techniques to solve this issue. What are the programming design patterns or perhaps even currently existing technology or languages that attempt to solve this?

  • I am familiar with dependency injection and that is all.

正しい解決策はありません

他のヒント

the new keyword is a place to closely look at. Adding a new keyword with custom classes as against the CLR provided classes is where dependencies start to crawl in to the code. Get rid of those statements and delegate object creation to a DI Framework.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top