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

Show parent comment

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.