I’ve been taking a look into using the spring framework for my java apps.
It is such a different way of looking at programming in general, i’m talking about DI and AOP!
The level of breaking the fundamental parts up into reusable components to me seems like a lot of work up front(in the design process). Im questioning the part of when I’ll know its ready to get coding(this might just be in experience)
Guess I am looking at some tips? Where should you begin? It seems it has to be perfectly designed from the get go to avoid this tightly coupling scenario that seems so common amongst other applications I have worked with(not necessarily made them myself) When will I know its time to shoot my load and code?
Please don’t tag this is a subjective or something I just want some honest and decent advice from the community.
Thanks in advance!
Ive never seen an app that was completely designed (on the implementation level) up front. On the contrary, refactoring is (well should be) part of the process, regardless of whether or not you use Spring.
Perhaps you are overcome by the scope of the Spring framework. Don’t be. The main goal is to use dependency injection to invert control, and allow you to write simple POJOS to structure your app. It doesn’t make an app more complicated, it makes one simpler.
This is not to say that everything with Spring is strait forward – it isn’t. But you can learn the more complicated things as you go.
In response to your comment, think of the spring configuration as metadata for your class. You cannot configure Spring with a class you have not defined. Spring handles the creation and life cycles of the defined beans for you. So if ClassA depends on ClassB, then when a ClassA gets created, the framework will create the dependencies (and inject them) for you.