Philip Riecks - header image

Philip Riecks

The Spring Interviews

Last updated on July 10, 2020 -

Who the hell am I?

I'm @MarcoBehler and I share everything I know about making awesome software through my guides, screencasts, talks and courses.

Follow me on Twitter to find out what I'm currently working on.

This interview is an excerpt from The Confident Spring Professional course.

Marco: Hi Philip! Would you mind quickly introducing yourself?

Philip: Hi Marco, sure. I’m Philip and work as a senior software engineer at Immoscout24. I have been working with Java since university and I’m curious about the latest trends within the Java ecosystem but also highly focused on productivity & simplicity with proven Java technologies.

Marco: Since when do you program with Spring and how did you get into it? Do you still remember your very first Spring project?

Philip: My first contact with Spring was in university (around 2016) as part of a group project. My task was to make sure the frontend and the backend can talk to each other: API design, security, CORS, etc. and I was literally throwing annotations at our Java classes to make it work (somehow).

Professionally I started working with Spring at my first job in 2017. I was somehow frustrated working with Java EE 7 and CDI as I couldn’t get dependency injection working. Adding @Inject, @Dependent, @RequestScope everywhere, adding different constructors, always led to WELD exceptions during deployment.

While I couldn’t find a good tutorial on CDI (tailored for a Junior Developer right out of university) I found Spring while searching for solutions. As we were also searching for a new tech stack at this time, the team and I were impressed by the number of good tutorials and started using it and I was finally happy to (somehow) understand dependency injection at this time.

Marco: For people new to the Spring ecosystem, what Spring projects would you recommend having a look at and in which order? Why?

Philip: For new people, I would recommend starting with a basic Spring Boot application.

While you might not understand everything at the beginning, push for the first successful experiences as early as possible. Nothing is more rewarding than to get something working if you are a beginner.

Try to wire your first beans together using dependency injection, take a look at Spring Web to expose something over HTTP, and then Spring Data to read data from a database.

Marco: What would you say is the one thing where most developers go wrong with Spring?

Philip: Not investing time to understand the difference between Spring and Spring Boot and claiming everything is just magic and a bunch of annotations and slow.

Marco: What project(s) would you recommend to build in order to get more practice with Spring?

Philip: Start with the guides at https://spring.io/guides to get in touch with several parts of an application: database access, web layer, business logic. Then try to combine everything into a full-stack application to see everything working together.

Next, I would recommend building something you are personally interested in with Spring. It might be something like a personal finance tracker, an application for your local club, etc.

This way you stay motivated and learn a lot along the way.

Marco: Would you still invest time in learning Spring based on servlets and JDBC, or go straight into reactive Spring?

Philip: That’s a good question. Something I should have done way earlier. Once you have a basic understanding and can write a web application with Spring, I would still recommend investing time to understand the underlying basics.

While you might not get directly in contact with them (as a lot is abstracted by Spring) it’s definitely helpful to understand the building blocks. Your courses on Spring and JDBC are my go-to resource whenever someone asks me for a recommended tutorial.

Marco: With the advent of client-side frameworks (React, VueJS, Angular), what’s your take on writing web applications with server-side template rendering, like Thymeleaf? Is that now legacy?

Philip: I’m still using Thymeleaf for several projects at work and also personally. The integration with Spring is excellent and you can be quite productive. It’s also funny to see the frontend world now claiming server-side rendered applications with React/VueJS/Angular as the new thing.

I would recommend starting with Thymeleaf and only switch to something on the client-side if there is a good reason for it.

Marco: What is your favorite way to connect your Spring application with a database? Would you recommend plain JPA? Hibernate? Spring Data? Any other of the 500 available choices?

Philip: Start with Spring Data JPA. Next, start following Vlad Mihaleca and work your way through his book and/or video courses. If you still encounter some limitations, try something like jOOQ or Spring Data JDBC.

Marco: There are some misconceptions that Java or Spring might be slow, bloated or simply too legacy. What do you think about other choices, like Micronaut, Quarkus or even other languages like Kotlin or Scala?

Philip: Calling some technology stack slow is always subjective. Java and Spring might be to slow/bloated for writing a real-time operating system, that’s for sure. Do you want to handle 10 million requests within one minute with almost no latency? Java and Spring might not be the ultimate fit for this.

But, if we take a look at the requirements and use cases for standard applications (not talking about Google/Amazon/Facebook scale) then Java and Spring are perfect. At ImmoScout24 most of our tech stack is based on Java and Spring and we are handling Germany’s largest real estate marketplace with it.

As long as Spring and Java solve your problems, why would you switch?

Marco: Is there something you would say that Spring could do better and needs some improvement?

Philip: I’m really impressed with what the whole Spring team achieved over the years. The documentation is great, they offer a lot of integrations, get involved with the Java community, organize great conferences, and make our lives (as developers) simpler. Nothing comes to my mind about what they could improve.

Keep up the good work!

Marco: What is the best way to follow you and learn more about your work and what you do?

Philip: You can follow me on Twitter @rieckpil, visit my blog (https://rieckpil.de) where I’m publishing content about the Spring Framework, Jakarta EE, and Eclipse MicroProfile under the slogan "Enterprise Development with Java made simple".

For more than just text/plain, take a look at my YouTube channel.

Marco: Thank you, Philip!

There's more where that came from

I'll send you an update when I publish new guides. Absolutely no spam, ever. Unsubscribe anytime.


Share:

Comments