Starting to learn Spring in 2017? Why not to begin with Spring Boot?

There are at least two approaches to learning technical stuff: bottom-up, and top-down. Understand topic briefly, be aware of possibilities and try to go down into the details, or piece together some basic mechanisms while trying to comprehend the big picture. Which approach is better for a newcomer  to use when learning, for example Spring Framework?

Spring Framework is being developed for a long time now, so it is understandable that all of it’s possibilities can be more overwhelming for a newbie now, than they were in, let’s say, ten years ago. However, guys from the Pivotal came to the rescue – they decided to introduce new tool: Spring Boot.

One could say that it is a bad sign when you need a framework around another framework, but I will not even try to cover this topic here. Spring Boot seems to be the big thing for some time now.

Long-story short: thanks to Spring Boot you can create Spring-based application blastingly fast. No need to configure servlet container, no need to install database instance, or import and configure dependencies.

Spring Boot takes it even further. You can use Spring Initializer wizard to define build tool (Maven/Gradle), Spring Boot version, group id, artifact name and set of dependencies, and Initializer will prepare zip file with generated project structure. It cannot become easier than that.

Spring Initializr in IDEA
Spring Boot initializer wizard in IntelliJ IDEA

So not only you don’t have to worry about servlet container (you just assemble single jar with embedded Tomcat, Jetty or Undertow) or dependency management (you are just using very handy starter POMs)


Thanks to that you are able to develop backend for simple create-retrieve REST service from scratch in about 2 minutes:

Those three files placed anywhere in the project just do the job. All the boilerplate is provided by Spring Boot. No database setup needed. Not at all.

However, if you would like to learn Spring, doesn’t it feel a little bit too easy? Don’t you feel like we cheated somehow? Do we really understand what is going up under the hood?

Don’t be this guy

It can be hard to get the full understanding of Spring mechanisms relying solely on Spring Boot. There are just to many don’t-bother-doing-that‘s and I-will-care-about-it‘s.  It is great tool to improve development speed in certain cases, and can be nice starting point for beginners, but additional research has to be done.

Regarding fit-tracker project I am developing as a Spring Framework playground/battlefield: I am still going to use Spring Boot for that. But in the following posts on this blog expect some deeper analysis than “it’s nice because it just works”. 

Going back to the beginning of the post: should rookie follow top-down or bottom-up approach? In my opinion: both.

Leave a Reply

Your email address will not be published. Required fields are marked *