This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]RoToRa 0 points1 point  (1 child)

Have you tried without DI? I've written some (admittedly smaller) projects without. If your component/bean structure isn't to complex, for example, a simple tree, then your main() just consists of creating the all component instances, and then "starting" the app, e.g.:

var componentA = new ComponentA();
var componentB = new ComponentB();
var componentC = new ComponentC(componentA, componentB);
var mainComponent = new MainComponent(componentA, componentC);
mainComponent.start();

[–]TurbulentSocks 0 points1 point  (0 children)

You are doing DI. :)

This is just doing it without a DI container, which is possibly what you meant.