how to reduce the dependency.

Started by
1 comment, last by antareus 18 years, 11 months ago
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.
Advertisement
o_O
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.
--God has paid us the intolerable compliment of loving us, in the deepest, most tragic, most inexorable sense.- C.S. Lewis

This topic is closed to new replies.

Advertisement