• Advertisement
Sign in to follow this  

how to reduce the dependency.

This topic is 4661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

if a program have n component and relative isolation.must have a function like winmain it dependency almost all these component.so the winmain component is a bad component I think. so how to avoid these happen. I take this way .I design a few function that depend just a few component and then again design other a few function depend the function that depend a few component. then a tree dependency shape. so I reduce the dependency into many small scale. but amount of dependency is not reduced.

Share this post


Link to post
Share on other sites
Advertisement
WinMain is always going to know the basic structure of your program, but you can use techniques such as the factory pattern, or dynamic linking to ensure it only depends on a certain interface to the rest of your software. This is better than an explicit dependency.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement