Sign in to follow this  

how to reduce the dependency.

This topic is 4595 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
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

This topic is 4595 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this