Question

Following on from this thread I started

The Singleton Pattern

It got me thinking about how coupled my classes are and how best to achieve loose coupling. Please bear in mind I am a new programmer (4 months into my first job) and this is really the first consideration I have given to this, and am very keen to understand the concept.

So, what exactly constitutes loose coupling vs heavy coupling? In my current(and first project), I am working on a c# winforms project, where the GUI section creates objects and subcribes to their events, when they are triggered, the GUI creates another object (in this example, a datagridview (a class that I have created that wraps around a standard datagridview and adds additional functionality) and attaches it to the GUI. Is this bad coupling or good?

I really don't want to get into bad habits and start coding poorly, hence I would appreciate your responses.

No correct solution

Licensed under: CC-BY-SA with attribution
scroll top