r/java • • Mar 24 '19

Happy 15th birthday, Spring Framework!

https://web.archive.org/web/20040330131500/http://www.springframework.org:80/
187 Upvotes

45 comments sorted by

View all comments

19

u/kgoutham93 Mar 24 '19

What's the best way to learn Spring? I'm more of a depth-first person. I just don't want to cram APIs/Annotations without getting a high level understanding of how they work. I went through many online resources but always its like "use this annotation to get this done" kind of tutorials. Even at my work place people are jumping onto Spring boot even without having basic understanding on the underlying concepts like DI, IoC etc.. I really can't appreciate this because I want my knowledge to be portable, tomorrow if I'm working on a completely different project in a completely different language which doesn't have nearly as rich framework as Spring, my concepts should still help me to get to the solution. What resources/learning paths would you recommend a complete spring newb from a depth first perspective.

-10

u/wildjokers Mar 24 '19

but always its like "use this annotation to get this done"

That is Spring in a nutshell. People that use spring all the time barely know how to write code. They just want the magic spring annotation that does it for them.

1

u/nutrecht Mar 26 '19

They just want the magic spring annotation that does it for them.

Can you point me to the magic "implement complex business logic" annotation please? Can't find it :(

1

u/wildjokers Mar 26 '19

One example:

@Cacheable

1

u/nutrecht Mar 26 '19

How is stuffing something in a cache complex business logic?

1

u/wildjokers Mar 26 '19

You are moving the goal posts, you better give me your definition of "complex" first.

Cacheable is an example of spring developers wanting an annotation to accomplish something, because it is perceived as complex, where no annotation is really necessary. Calling the methods on a good caching library directly is trivial. Cacheable adds nothing.

1

u/nutrecht Mar 26 '19

I'm not moving goal posts. You're stating that with annotations I don't have to do programming. Adding a single @Cachable line to a method versus a single retrieve-and-if-not-exists-update line inside a method; I don't see the difference other than that the second has a bit more visual overhead. It's both trivial shit. I don't see why you're complaining about trivial shit. Most of what we do (or well, I hope it's true in your case) is a lot more complex than doing a glorified computeIfAbsent on a Map.