how to reduce the dependency.
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement