I am trying to learn Spring currently reading Spring in Action as I've read here that it's your best bet in learning Spring. Problem is, what is it that you need to know before diving in? An example is the bean lifecycle. I have no idea what it does and why it is important. It's also in the book on how to do it. I have been coding Java for two years now using our in house framework and now moving to Spring and just recently passed OCJP 6 (I hope it still matters).
Another example is the dependency injection. Yes it is a good practice to make a loosely coupled codes but what if some programmer, let's say an ANSI C programmer, codes java enterprise apps using Spring but still does monolithic way of coding?
I do understand that you need a solid grasp of object oriented programming to fully understand how to maximize Spring. So, what else?
I did bet it on XML first, JAVA Bean conventions, Immutables, then on understanding type hierarchies and references, Design patterns - factory and abstract factory, object pool, singletons, adapter, facade, template method, proxy, visitor, etc. to understand various aspects of springs from DI, Templates, MVC, AOP, etc. May be a sprinkling of XML-Java bean binding can also help.
Of course there is more to Spring plugin modules, so depending on what else you might want to do, you may like knowing about Hibernate, JDBC, Webservices, RMI, etc. as well.
Java Pal - Your friend in technology and innovation...India.
It's always a good idea to know how deep the spring is before diving in!
Spring is a huge (and deep) framework with many facets. Some require more fore-knowledge than others. But to get started with the basics all you really need to know is basic Java, basic OO principles, and basic bean principles. The latter may even just come along for the ride.
Francis Zabala wrote:I think my brain snapped on Raja's answer. I guess Spring is really deep. Though Bear's answer is what I am going to keep as it is more newbie friendly. Thanks!
Yes, in Core Spring class, I always say the real only pre requisite is that you know Java, but in creating a Java class, instance variables, constructors, methods, and extending and implementing interfaces. You can do that and you can do Spring.
Now it is best if you follow OO best practices, but it isn't required to do Spring, so an ansi-C programmer can still come in and write poor OO code, or make things more complicated than needed. Or an ansi-C programmer can come in and write really nice clean OO code. And a good Java developer can also write poor OO code.
Francis Zabala wrote:Thanks Mark! It makes me feel easier that learning Spring isn't as hard as it would be.
Yeah the main goal of Spring is to allow you to write Plain Java Objects (POJOs) without you having to extend or implement any technology's/api specific classes or interfaces and to hide any technology's/api boiler plate code from the code that you write. To do that unobtrusively, in an easy way to learn and do. And I think they do a fantastic job at it.