문제

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