Question

I have a few questions concerning the differences between IoC and CBSE that I cant find for the life of me.

I have been using IoC/DI for quite a while now specifically with Laravel in PHP, so I like to think I have a pretty good grasp on how it works and how to use it. I recently purchased a book "Component-Based Software Engineering" by George T. Heineman. I ran into some confusion when it came to how the components communicated with other components so started doing some online research. I am specifically looking up C# examples and from what I can tell CBSE closely resembles Ioc/DI and in some cases I often wonder if people are just calling it the wrong thing.

The biggest difference I can see when reading the book is instead of injecting the dependency its more linear and in your interface your telling it what class your wanting to use. I feel as if I am completely off base and missing the whole point of CBSE but cant find any information that's giving me the ahah moment.. Anyone able to provide some information that may clear this up?


Small Update:
The idea behind CBSE if I am understanding it correctly sounds really good. But I am getting hung up on how the components talk to each other. If I understand right the components shouldn't know anything about any of the other components out there. So while throwing events for everything would work that only works if the component needing the information knows and or expects there to be x component throwing that event.

I am trying to figure this out for a few reasons. See if this is a route I want to learn and start using for my job as an application programmer, as well as my hobby for game programming. I came about CBSE through researching game programming.

Was it helpful?

Solution

Component based software engineering is a paradigm of software development that specifies that one should build software against interface dependencies so as to maximize the encapsulation and reusability of components. This paradigm, in many languages, requires inversion of control in order to satisfy this paradigm.

However, component based software engineering isn't inversion of control, it's just a model of software design that is most easily and completely accomplished by using DI and IoC containers. For C#, if you want to go down the route of component based software engineering, then I would look into getting familiar with how DI, IoC, and their respective containers operate.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top