r/learnjava • u/saief1999 • Nov 18 '20
How to Learn Spring & Reactive Web in 1 Week ?
Hello everyone,
So since covid and all we won't be able to do our exams. So my Professor in College assigned a project for each group of two. And for me unfortunately I have to talk about Spring 5 & Reactive Web next week. Now keep in mind I have no idea about spring, I just have some experience with apache tomcat and its servlet implementation. I did some web on the side (Laravel,Symfony,vue...) but I don't think that'll help. Do you have any idea where should I start? which course do I need to begin with?
Any help would be much appreciated.
Thanks!
Edit: Thank you guys so much for helping a fellow student, you don't know how much this means to me!
UPDATE: In case you're wondering what I did. I kept learning about Spring's IOC container , its MVC model and Hibernate, how to implement them with maven and how to create and implement a RESTful API and also how to configure it, which took me a LOT of time. So I didn't have much time to learn about Reactive Programming and how it's implemented in Spring, which is mainly what i'm supposed to talk about. This is what I could wrap my head around : https://drive.google.com/drive/folders/1e2lxUPkynuD8SvvpCXW9sSTk3d_pcuPT?usp=sharing
11
u/RockleyBob Nov 18 '20
You know, I could be wrong but I don’t think your professor wants you to know everything about how to code with Spring. It sounds to me (and I’ve done a few of these “substitute projects in place of a final” assignments myself) like she wants you to be able to talk intelligently about what benefits it offers programmers and maybe provide some use cases for it.
So my advice would be to seek some clarification on just what tone your presentation should take, because again I think it’s highly unlikely that she wants you to demonstrate proficiency in this framework in just a few week.
3
u/saief1999 Nov 18 '20
Yeah it's exactly that! But also I have to make a small demo too, that's why i'm trying to learn fundementals first and go from there.
Thanks for your advice!
5
u/RockleyBob Nov 18 '20
Cool. If you want to make yourself a little demo app you could start here:
https://spring.io/guides/gs/reactive-rest-service/
And then use your Vue skills to make a pretty front end.
3
6
u/kebabvarjedag Nov 18 '20
Without having asked your professor about it myself, I cannot imagine they meant for you to do anything other than this.
Talk briefly about the history of Spring, what it does, where it's used, dependency injection, inversion of control and reactive programming. Then set up a quick demo app from a tutorial and have it take a get request that you trigger via Postman and return something using the web reactive framework.
What other people suggested are not bad if you want to truly dive deep and starting learning Spring but I highly doubt that is what you professor expects you to do in a week. Do what you need to do to get an A on this project then you can spend your free time learning more about Spring.
5
u/rhubarb_9 Nov 18 '20
"Quick" Demo. You can do this part for the demo. It is quite a bit more than just Spring, but it shows how everything connects together. Skip the videos, just setup everything and copy/paste the code. I had an error with babel-eslint and had to do this to fix it. Stackoverflow link. I also had an issue with multiple Reacts running, but that could have been from messing with it. You can also skip everything below "Package React app with Spring Boot" in that guide.
Other useful links for your project:
Original Paper - This is where Roy Fielding defined REST in 2000.
Brief intro into REST - Some easier to read REST principles
Spring Web Reactive - I wonder if your professor wants you to actually talk about this new Spring 5 module which it makes that demo above sort of moot if you need a demo using spring-reactive-web. Idk, but I'm going to leave everything up.
1
u/saief1999 Nov 18 '20
Thank you so much for taking your time and writing this. I'll get to reading right away!
3
u/flafotogeek Nov 18 '20
Good luck. If you know another framework you should be up to speed in three months, minimum. If you're more of a newbie, nine months. Even a good code camp won't get you there that fast.
3
u/saief1999 Nov 18 '20
Thanks man. But hey, I'm a college Student. This is what we do best here haha!
3
u/flafotogeek Nov 18 '20
Gotcha. The bar is set a little different for a college student vs. a full-time coder. You may just be able to do what you need to do to pass a course in a compressed timeframe. Happy learning!
2
u/iamsooldithurts Nov 18 '20
Spring has great documentation and there’s a bunch of sites about anything in particular you want to dive deeper into. https://docs.spring.io/spring-framework/docs/3.0.x/spring-framework-reference/html/overview.html
1
u/saief1999 Nov 18 '20
Thank you!
1
u/iamsooldithurts Nov 18 '20
Now that I’m looking at the link, it seems it’s for spring version 3, you might want to try to find something similar for Spring 5. That was just the first link that popped up when I searched for Spring Introduction. There’s been a lot of significant changes since Spring 3.
1
u/saief1999 Nov 18 '20
Oh yeah...I'm supposed to work on Spring 5. I'll do that okay
3
u/iamsooldithurts Nov 18 '20
Also, check out https://start.spring.io if you want to get into playing around with things quickly.
1
3
u/HecknChonker Nov 18 '20
https://docs.spring.io/spring-framework/docs/current/reference/html/
This is the current documentation.
/u/iamsooldithurts is on point here though. The absolutely best place to start learning spring is by reading the documentation. You need to a solid understanding of dependency injection and the spring context, and how to they interact.
After that, go to start.spring.io and to set up a simple project, and then google any questions to have.
2
u/bakahed Nov 19 '20 edited Nov 19 '20
the essence is that " Spring Framework 5 embraces Reactive Streams as the contract for communicating backpressure across async components and libraries. Reactive Streams is a specification created through industry collaboration that has also been adopted in Java 9 as
java.util.concurrent.Flow. "
if you got mvc experience from other languages then get an overview on mvc in spring
https://spring.io/guides/gs/serving-web-content/
I mean you don't even need to do that but it's good for comparison. Learn some on reactive spring
https://spring.io/guides/gs/reactive-rest-service/
Check out that baeldung website too that website has good content. here's another article on reactive streams:
it's probably too much but at least they write about mono and flux
one week is not a lot of time and this is a really different way of thinking and programming too. You only have to give like a theoretical presentation though so you might get an idea what it's all about in all that time.
1
u/saief1999 Nov 19 '20
Thank you for this. For the last day or so I've been trying to learn as much things as I can about Spring. I have some experience with mvc ( Laravel and symfony are both mvc ) so that actually helped a bit yeah. I'll definetely use your links as another reference, thank you!
2
1
18
u/Zee09 Nov 18 '20
Spring in 1 week? lol. Try this udemy course..apparently it is great for beginners.
https://www.udemy.com/course/spring-hibernate-tutorial/
Its on sale for $20 right now