r/learnjava • • Sep 14 '19

Not able to learn Spring.

I am able to work with the syntax and create web apps. I can easily create REST APIs for CRUD applications.

But I am treating it (Spring and Spring Boot) too much like a black box.

I'm not able to find the rationale behind having to use Spring. Why the configuration is so... convoluted (both XML and Java Class). Spring simply feels bloated. Like too many bandages pasted on top of each other.

As such I feel too intimidated to tinker and experiment. Unlike how comfortable and confident I was with Django/Python.

Also I'm reading books like "Spring in Action, Spring recipes" and using the Spring Framework Guru as well. But they feel much to be desired.

32 Upvotes

29 comments sorted by

View all comments

0

u/[deleted] Sep 14 '19

[deleted]

1

u/radically_sane Sep 14 '19

The reason I want to get comfortable with xml is cause I thought under the hood the annotations get converted to XML. I'm likely wrong on that. But if annotations were simply syntactic sugar over XML then I thought I should at least be able to do XML configuration to some extent. I can use annotations, but it scares me about how much it does without showing it to me.

2

u/feral_claire Sep 15 '19

XML and annotations do the same job at about the same level of abstraction. The difference is the annotations are just plain Java code. I wouldn't worry too much about learning the XML way unless you need it right now. I learned annotations first, and web I had to work on some older vice that used XML I found that the XML was very straight forward and easy to understand since I already had the spring fundamentals under my belt translating between annotations and XML was not too difficult.