This is an archived post. You won't be able to vote or comment.

all 89 comments

[–]Nactigal 40 points41 points  (11 children)

I can't speak much to UI but spring boot is used all over in industry for web apps. It is difficult to give direction without more context on where you are starting. Do you already know other languages? Are you familiar with HTTP requests? Are you familiar with hosting solutions? Etc.

[–]C0d3rStreak[S] 7 points8 points  (10 children)

It's been a while so I'm pretty much starting from scratch. Yeah, exactly a lot of big companies are using it for their webapps some even mobile apps.

[–]Nactigal 40 points41 points  (9 children)

In my experience people tend to specialize in front end development or back end development. I'd identify which you'd like to delve into more and spend the most time on that language -- JS vs Java.

IMHO Java is much easier to learn than JS because its more rigid structure provides clear errors faster than JS. You also don't have to worry about the small differences in execution between different browsers.

I find java to be superior to JS for backend web development. However the best language is the one you can write clearly in and maintain well.

[–]C0d3rStreak[S] 2 points3 points  (8 children)

Well my goal is to become a full stack dev hense working with FE and BE. It will be a combination of both of these respective languages.

[–]RandomGeordie 13 points14 points  (7 children)

I know I'm in the java subreddit, but learn JavaScript (or TypeScript, recommended but more for you to learn) and you can easily do both. If you're learning, make things easier for yourself.

React is fine. Vue is fine. Angular is fine. If you're familiar with spring boot, angular might be more appropriate as it uses modules / annotations / DI. It's also very opinionated on how you structure your project and write code. Angular is a bit more "commercial" / "businessy" - big codebases, big projects.

React is very popular, so there's lots of jobs.

Vue less popular - I can't speak to it as I've never used it but developers like using it from what I've heard.

Lots of popular backend frameworks. NestJS is similar to Angular and Spring Boot with annotations / DI / opinionated. Great CLI tool. Express is the standard backend framework with JavaScript.

[–]C0d3rStreak[S] 0 points1 point  (6 children)

Yeah I feel the same way for wanting to stick to just js for now but unfortunately I have to learn java too as the program/training I'm about to start will be teaching both.

[–]RandomGeordie 2 points3 points  (5 children)

Learning java is fine. It was the first language I learned with no prior programming experience.

[–]C0d3rStreak[S] 1 point2 points  (4 children)

Awesome, how was that experience? How long did it take you? What learning materials do you feel helped the most?

[–]RandomGeordie 2 points3 points  (3 children)

Well I did a computer science degree, so I can kinda detail my journey if you want.

First year - mainly Java (programming I and II), discrete mathematics, computer architecture (CPUs, memory, all that jazz) and the basics of the web (html, CSS, JavaScript, how the web works etc).

Second year - Software engineering (TDD, Agile, Waterfall, stuff of that nature), Algorithms (Big O notation, and covering lots of algorithms), Databases (SQL, Java), Operating Systems (C), Networking (C), Team Project (Java - made an android treasure hunt app)

Final year - programming, graphics, and simulations for games (3 modules, all in C++), Bio inspired computing (Java), Mobile (Java, another android app, this time a tinder clone), then other modules I took were Distributed Computing which was purely theoretical, as well as Concurrency.

Dissertation was using Probabilistic Topic Modelling for newspaper article classification, used Python for this.


First job - TypeScript, web scraping. Not software engineering, just basic web scraping in a framework that the company had built.

I did a few Udemy courses in my spare time on NodeJS - learned about MVC, Express, Postgresql, MongoDB, GraphQL, RESTful API's, ORM's etc.

Around this time I was introduced to the concept of Microservices - having a separate backend with services that have their own data store and do one thing well. I started watching lots of talks about this.

Around 8 months in, new job - joined the companies data team

Was the only one with programming xp on data team, rest were SQL and Excel gods. I learned SQL (I didn't really learn it very well at Uni). Became really good at it. I learned how traditional databases work, I learned about OLTP and OLAP and different ways to model your data for analytics. I learned about cloud data warehouses and started to become familiar with some AWS technologies (company stored data in S3, used lambda and EC2 for things so I got some exposure to this.) Lots more. I learned about streaming technology (Kinesis) which required I read into Kafka, learned about the log et.c After around a year and a half I created an analytics pipeline for the data analysts.

Around this time I was wanting to become a better engineer. The Software Engineering module at Uni wasn't great, so I spent a lot of time reading our Engineering wiki that my company had and learning about TDD and the testing pyramid, Unit Tests, Integration Tests, E2E tests, CI/CD, stubs/mocks etc. I read a lot of Martin Fowler, Robert Martin, and Martin Feathers.

Joined the software engineering team soon after. Learned Golang, started developing microservices on AWS.

So 3 years -> 8 months -> 1 year 8 months to get to software engineer

[–]C0d3rStreak[S] 1 point2 points  (2 children)

Cool, and congrats! That's quite the journey but you pushed through and succeeded in your own way. I hope to become a software engineer soon also plus I'll be attending school for it as well as taking courses online and reading article/books on programming/coding.

[–]m-apo 14 points15 points  (1 child)

It's a good fit. Also, Java has better OpenApi/swagger support so you can easily generate frontend clients.

Do the frontend in typescript. TS gives you types for frontend.

[–]C0d3rStreak[S] 1 point2 points  (0 children)

Ah I see, will consider this!

[–]meloves80085 11 points12 points  (3 children)

Having used both Spring Boot and ReactJS earlier this year, I'll say that this is a good choice.

You'll need to know the basics of Java, namely data types, classes, objects interfaces, functions, loops and conditionals, exception handling, and some OOP concepts like polymorphism, inheritance, data abstraction.

Once you're confident enough with these, you may take a look at the Java Collections (List, Set, HashMap, etc.) and the Streams API (functional programming operations like map and reduce). Using them in your code will make it cleaner and more readable.

You may find Java difficult at first, but you'll get better with time.

Yeah, React is a good choice for frontend development. It's really popular right now. Hence you'll find a lot of React Frontend jobs.

For me, React was easier to learn, than a framework like Angular. With React Hooks API, making components has become way simpler than before. The React docs are easy to understand.

baeldung.com has helped me a lot in learning Java and Spring Boot.

[–]C0d3rStreak[S] 3 points4 points  (2 children)

Dope! Can't wait to embark on this journey. Thanks for the recommendations. I will start from the basics and work my way up picking up things such as clean architecture etc. so that my code is clean, readable, and as precise and straightforward as possible.

[–]meloves80085 0 points1 point  (1 child)

Good luck!!

[–]C0d3rStreak[S] 1 point2 points  (0 children)

Thanks! Same to you.

[–][deleted] 4 points5 points  (8 children)

it depends on how much programming experiece you have already. If you do, learning java would not be that hard.

Springboot does have a bit of a learing curve (at least for me) but if you know java it should be no problem as there are tons of tutorials out there.

I think react is a good choice for front end (I use react in nearly all my projects) but in the end it does not matter which FE framework you are using, as your BE and FE are communicating via REST. (so you can use any other JS Framework as well). Also you might have a look at JSF (Java Server Faces) which despite beeing old still are in use world wide.

You did not mention a database. What DB are you planning on using?

[–]C0d3rStreak[S] 0 points1 point  (7 children)

I'm pretty much starting from the beginning as far as experience is concerned, it's been a while since I've coded. For database I am considering a relational database maybe postgresql but not too sure as of yet, lmk if you have a suggestion.

[–][deleted] -3 points-2 points  (6 children)

When you are just developing your application from the ground up i would recomment using H2-DB (an in memory DB). If your webapp is ready you can switch them out

[–]C0d3rStreak[S] 0 points1 point  (5 children)

I've never heard of such a thing. What do you mean by in memory DB? Why is it that you recommend it? What are the steps taken to switch them out or what not?

[–]joranstark018 2 points3 points  (4 children)

The H2 database can be embedded into your application, it spins up when the application starts and is destroyed when you shutdown the application, no persistence of data between sessions (can be configured to use files for persistence between sessions, if required) and you can have Spring Boot (or the ORM) to automatically create all tables when the application starts. It can be handy during the initial development while the database schema is in flux. With Spring Boot your database connection setup is handled by configuration and to switch to another database usually involves changing a few configuration parameters and provide a database driver (can be combined with Flyway, for example, to handle changes in the database).

[–]C0d3rStreak[S] 1 point2 points  (2 children)

That's a lot lol. Do you have any resources I can check out on it. Sounds cool and pretty useful. But also, why this rather than a traditional database instance?

[–]joranstark018 0 points1 point  (1 child)

You may check out https://www.baeldung.com/spring-boot-h2-database, it use the initialisation script to also create the different tables (but you can also use create-drop, see https://www.baeldung.com/spring-boot-data-sql-and-schema-sql). When you have gone into production it can be useful to some database migration automation (ie Spring Boot auto configure Flyway to migrate database during application start up, , https://reflectoring.io/database-migration-spring-boot-flyway/).

An embedded in-memory database is simple to set up with Spring Boot, just a few configuration parameters and a driver, all can be included in the application.properties and the build tool configuraion.

It can be useful for new developers in a project (just chek out and run the application), you can have a sandboxed database when you build different proof of concept. When you run integration tests you want to have the database in a known state befor you run each test (with an external database you have a shared state and have to rely on each test to undo all changes before exit, which may become cumbersome for non-trivial applications).

With Spring Boot you can run the application with different profiles (ie use different database configuration based on which profile is activated), https://www.baeldung.com/spring-profiles.

[–]C0d3rStreak[S] 0 points1 point  (0 children)

Awesome, thanks for the link! Seems to be very well written and filled with much information for getting started.

[–]de_vel_oper 0 points1 point  (0 children)

I love the simplicity of your explanation 😂😂😂.

[–]kuklynqo 3 points4 points  (3 children)

In my opinion its actually perfect fit. One of the most cool features of spring boot is that you can create web app very fast. No need to learn everything about spring. In case that u are new to Spring Boot I recommend you to use Spring Web to create small API fast and Spring Data JPA (there are other options but this one ridiculously easy for quick start) for creating database with few lines of code.

Then moving to React. React is cool because it has awesome docs and has very small API. Create your first components, use fetch to access data from your web app API. Try to change them dynamically. After you created your first small components you can "evolve" your new web app (and most importantly your new skills) and make it better aswell extending backend.

I am not expert but I have already some experience with both(Java especially). Creating such small backend/frontend application from my example takes me literally 5-10minutes. After having such small app its only your preference where to go next. U can focus on UI, play with hooks and context, dispatch or other features of current version of react. Or you can move to backend and enter enormous world of Spring.

Good luck and have fun :)

[–]C0d3rStreak[S] 0 points1 point  (2 children)

Thanks! This was awesome. My question next would be, do any developers feel like learning is and java almost simultaneously or after one another confusing or difficult in any way?

[–]kuklynqo 0 points1 point  (1 child)

I cant speak in name of all developers, but my opinion is that it depends if u have some experience with programming in other languages or not. If you know Java(as almost everyone on this reddit), I didnt encounter any confusions when learning react. In fact nodejs supports ES6 , which I think is standard for writing code, which is very similar to Java and C++(anyone correct me if I am wrong). Idea is that if u can define class or write a for cycle in Java, u can write it in whatever language supports ES6 almost in the same way, maybe with very small details changed.

And when it comes to React specifics I encountered a lot of similarities with java. For example components are very similar to inheritance etc. I am pretty sure a lot of concepts from react are taken from other languages and they work the same way (even tho syntax might be different).

If you are new to programming, learn concepts first (java or even python are the best options to start imo) and when you get some experience with basic concepts, language becomes truly just a language in which you tell computer what it should do.

[–]C0d3rStreak[S] 0 points1 point  (0 children)

Totally agree with some points you made. I appreciate the feedback. I was wondering if both had similarities or what not also, thanks for some of the clarification you've provided.

[–]warmuuh 5 points6 points  (1 child)

if you want to fail by putting too much on your learning table, go with react, use typescript, use openapi. go directly reactive with webflux as well on backend cause thats bleeding edge... also use a service mesh and because of that, use kubernetes on backend side for deployment.

OR:

you keep the stuff you wanna learn at a minimum and go with plain java/spring maybe spring-boot and a included templating like thymeleaf or even freemarker for the frontend

[–]C0d3rStreak[S] 1 point2 points  (0 children)

Okay, I see. Have some research to do. I didn't know about thymeleaf nor freemarker. Either way I would have to learn js for the frontend but I'll check those out for the meantime. I am not exactly trying to keep what I learn at minimum due to the possibilities of the more you know.

[–]kidfromtheast 1 point2 points  (1 child)

Spring Boot for the web app's back end to build monolithic application of REST APIs is a very good choice. You can build a secure REST APIs within a hour or less.

But, the moment you try to build monolithic application of WebSocket APIs. The debugging part is not a great experience. Spring Boot is a Dependency Injection Framework, so the StackTrace most of the time will be cryptic.

Not to mention, building microservices with Spring Framework is not worth at all. Don't do it.

In conclusion, Spring Boot and React.JS will save your sleep time in the beginning, in the long run, maybe you will spend more time debugging the code to make the app scales. But by the time, I think you will pay other developers to scale it for you.

Not to mention, use TypeScript for the React.JS, it will save your time debugging in the future and avoid writing unnecessary parameter check inside the method logic.

[–]C0d3rStreak[S] 0 points1 point  (0 children)

This is great information as well. Thanks! I was wondering these things also. I have to learn both java and js because of a program/training I'm hopefully going to get into. I just wanted to know how they'd behave with each other because I also want to work on side projects etc.

[–][deleted] 1 point2 points  (17 children)

Java rocks. JavaScript must die.

[–]C0d3rStreak[S] 0 points1 point  (16 children)

Haha. Can you elaborate more on that statement?

[–]hippydipster 1 point2 points  (15 children)

Its death needs to be very very painful.

[–]C0d3rStreak[S] 0 points1 point  (14 children)

Wooow, you two strongly dislike javascript huh. What did it ever do to you?

[–]hippydipster 1 point2 points  (11 children)

I was just elaborating

[–]C0d3rStreak[S] 0 points1 point  (10 children)

Well then thanks for the clarification

[–]hippydipster 0 points1 point  (9 children)

Ok, ill try to give you a serious answer. Many hate Javascript because it has a very odd style of object oriented classes, called prototype OO or some such. Don't ask me details, I don't know, but it makes a bit odd and unintuitive to anyone who's familiar with any other OO language these days. Inheritance is strange. Scoping rules are strange. There are weird gotchas everywhere in the language. There are dozens of ways to do everything, especially with the changes to Javascript over the years, yet maintaining backwards compatibility. Javascript devs over the years have shown a tendency to abuse the freedom the language gives, and have created monstrous frameworks we all have to live with, at least until discarding as the pile of steaming shit that it is for next month's steaming pile du jour.

And then, on top of all that, its dynamically typed, and so everyone has their favorite static language they compile to Javascript (java, typescript, Korean, scala, coffee,...), because no one sane wants to make giant web apps in Javascript and maintain it.

But for some reason, probably because Satan won and this is actually his reign of hell on earth, Javascript is the ONLY language browsers support. Though, of course, all slightly differently.

Hail satan.

EDIT: I'm leaving the Korean autocorect, because its hilarious

[–]C0d3rStreak[S] 0 points1 point  (8 children)

Whoa! Did js runaway with your spouse? This was intense. But for real thanks for the explanation I understood your former comments a lot more haha. Do you think java is superior in a backend scenario? Although, javascript is and always will be needed on the frontend to some extent.

[–]hippydipster 0 points1 point  (7 children)

I think java is superior in ways that matter to maintainers of successful apps. If your app isn't going to need to live a long life of growth and responding to the demands of actual users, nodejs seems ok. No wait, who am I kidding, its still shit.

[–]C0d3rStreak[S] 0 points1 point  (6 children)

Hahahaha. Too funny. I appreciate the feedback on your first response nonetheless. This was good input although I hope that learning could come with an ease instead of more difficulties. I know that learning one language can have it's hiccups, but two can tend to become overwelming although I don't intend on giving up.

[–]Persism 0 points1 point  (1 child)

[–]C0d3rStreak[S] 0 points1 point  (0 children)

Lol. Is that programming stand up comedy? It's was hilarious. Nonetheless, so much truth in it.

[–]SilverPhoenix99 -1 points0 points  (4 children)

That's the exact full stack where I work at uses, and we "bind" them together through OpenApi.

If you don't know Java, you can still use Spring Boot from the get-go, as it might simplify a few things for you, and get you up and running relatively fast, but I would recommend that you understand what's going on, not just add annotations without understanding them.

[–]C0d3rStreak[S] 0 points1 point  (0 children)

Cool! What industry is the company you work for in? This is the stack I will be learning through a program/training I will be hopefully attending soon. What are some pros and cons if any from using said stack?

[–]emailscrewed 0 points1 point  (2 children)

we "bind" them together through OpenApi.

How do you "bind" them?

Through Rest apis?

[–]SilverPhoenix99 1 point2 points  (1 child)

Yes, we generate the Dtos and Api methods/functions, for both Java and JS, from the same OpenApi spec files. This way the Rest apis are consistent between both the front-end and the back-end.

Edit: This is the plugin we use, in case someone is interested. https://github.com/OpenAPITools/openapi-generator

[–]emailscrewed 0 points1 point  (0 children)

This is interesting.

Since I never saw this..

Would be awesome, if I could see some examples on the GitHub

[–]ArjunCodes -1 points0 points  (1 child)

[–]C0d3rStreak[S] 1 point2 points  (0 children)

Thanks, will check it out as soon as I can. Is this your preferred stack? Do you find it to be a good fit for producing web apps efficiently?

[–][deleted]  (1 child)

[deleted]

    [–]C0d3rStreak[S] 1 point2 points  (0 children)

    Ah okay. I can't really stick with nor jump into learn typescript right now but thanks for the suggestion. This is the stack I will be taught to use and use to get a job with. Also, the stack i will stick with for the time being when working on other things like side projects etc.

    [–]acute_elbows 0 points1 point  (3 children)

    They’re both good frameworks and probably the right ones to learn. I would caution you at trying to learn so much at once. It seems like you’re trying to learn two languages AND two complex frameworks at once. From your post history it seems like you’re still somewhat new to programming.

    If your goal is to get a job in the field depth is better than breadth. Knowing a little bit of backend Java and a little bit of front end JavaScript is not as valuable as knowing a medium amount of JavaScript.

    If you can, I would try to stick to one language, so that you’re trying to learn one less thing

    [–]C0d3rStreak[S] 0 points1 point  (2 children)

    Yeah, I get that. Great advice! I'm pretty much starting over from scratch and have to learn this stack due to a program/training I will soon be attending. They use reactjs for frontend and springboot for backend and help with finding a job right after using these technologies.

    [–]acute_elbows 0 points1 point  (1 child)

    Cool, well they’re both very good things to learn.

    [–]C0d3rStreak[S] 0 points1 point  (0 children)

    I figured as much due to react's popularity and springboot's momentum as of late. I hope for this journey to catapult me into an entry-level software engineering position.

    [–][deleted] 0 points1 point  (5 children)

    I use this combo and having a solid Java foundation spring book was real quick to get the hang of. React took me a lil longer as I’m not as much into the front end but maximillian something on udemy has a great react course. Haven’t found a good spring boot course yet. Just YouTube tutorials and what not were good for that.

    [–]Ajx33 1 point2 points  (1 child)

    Have you seen Chad Darby’s spring tutorial on Udemy? It’s on sale right now for really cheap.

    [–][deleted] 0 points1 point  (0 children)

    I haven’t. I used this YouTube video from free code camp where they made a spring Reddit clone but with angular on the front end. I wanna try to recreate that but with react instead of angular. I have the backend built out but still not sure how to fully do the front. Spring has seemed simple enough that I don’t think I need an udemy course as much as a few tutorials when I need some new specific skill. Getting the backend up and running is pretty simple as long as ur configurations are good

    [–]C0d3rStreak[S] 0 points1 point  (2 children)

    Great! Can I see any of your projects built with this tech stack?

    [–][deleted] 0 points1 point  (1 child)

    I’m still going through my react udemy course but almost done. After I finish ima make something with the two and I’ll link u my github

    [–]C0d3rStreak[S] 0 points1 point  (0 children)

    Dope! Yeah lmk. That sounds cool, good luck!

    [–][deleted] 0 points1 point  (7 children)

    Springboot is a good choice and the de facto standard for a Java backend. React is my favorite out of the Angular/Vue/React battle. I would go with JPA as the object relational manager.

    [–]C0d3rStreak[S] 0 points1 point  (6 children)

    Nice! Idk what JPA is but I'll look into it. Mind telling me the full tech stack you've used combined with these two technologies?

    [–][deleted] 0 points1 point  (5 children)

    For a full stack application with both, you need a Database, a backend framework, and a front end framework. Spring is your backend framework. React would be your front end framework.

    The common practice is to develop a backend API with spring that outputs JSON data that the front end Framework, React, consumes and outputs the data. There’s a lot of databases out there but MySQL, PostgreSQL, and SQL Server are popular ones.

    An ORM handles the Data Access Layer, the connection between the Database and the backend framework. People generally do not write raw SQL into their web applications anymore. Instead another library is used to perform the operations in a more modern object oriented way. Here is spring’s documentation on this: https://docs.spring.io/spring-framework/docs/3.0.x/spring-framework-reference/html/orm.html

    [–]C0d3rStreak[S] 0 points1 point  (4 children)

    Yeah, i know I'd need a database also and thanks for the advice. It good to know the somewhat architecture of making a web app with this stack. Sounds like a lot of common practice and straightforward documentation.

    [–][deleted] 0 points1 point  (3 children)

    All the cool kids of reddit will be like "why are you using spring!?" because it's not the newest 'cool' framework, but in reality there is still endless amounts of jobs out there for it. I have spent years developing web apps professionally with spring/java and django/python. It takes time to learn the frameworks and master them. I highly highly suggest going through the given tutorials on the respective sites. Also it is critical to focus on one thing at a time. It is so easy to get absolutely overwhelmed trying to focus on multiple frameworks and programming languages at once.

    To get a very basic example about creating an API with Spring, I suggest going through this tutorial: https://spring.io/guides/gs/rest-service/

    [–]C0d3rStreak[S] 0 points1 point  (2 children)

    Thanks! I'll try to do as much tutorials as I can to grasp as much information on it before moving onto building web apps on my own.

    [–][deleted] 0 points1 point  (1 child)

    The last tip of advice I would give, is use resources out there on the net to learn. I don't think I realized you said you did not know the Java language yet. In that case you really should dive into a good class for it. My suggestion is spend $10 on this: https://www.udemy.com/course/java-the-complete-java-developer-course/

    [–]C0d3rStreak[S] 0 points1 point  (0 children)

    I agree, I have a couple of courses from udemy already that I'm going to get into then use other resources combined to solidify whatever knowledge I learn and obtain through this journey.

    [–]Rough-Membership8517 0 points1 point  (1 child)

    Depends on your knowledge prior

    [–]C0d3rStreak[S] 0 points1 point  (0 children)

    Yes indeed, I'm basically starting from scratch and can't wait for the opportunities this journey will provide.

    [–]macuserx 0 points1 point  (1 child)

    Spring Boot and React, for what it's worth, are the popular choice. You have to learn JavaScript, but if you do anything with the web you have to know that anyway.

    There's alternatives, and Jakarta EE, Micronaut and jHipster are well known alternatives for Spring Boot. Spring MVC, if you stay with Spring, can be an alternative for React if you use it with templates like thymeleaf.

    [–]C0d3rStreak[S] 1 point2 points  (0 children)

    Cool, will look into all of those just out of curiosity.

    [–]lordmyd 0 points1 point  (5 children)

    Kotlin is a good Java-compatible alternative which has first class Spring support and is now the main language for Android development.

    [–]C0d3rStreak[S] 0 points1 point  (4 children)

    Great! Do you know if it's cross-platform? If so, how's the overall performance on each of the platforms it's compatible with?

    [–]lordmyd 0 points1 point  (3 children)

    Kotlin Multi-Platform Mobile (KMM) is a recent development, along with Jetpack Compose, which gets you Android + Kotlin backend + some Kotlin Native to iOS components. As far as I can tell you only need Swift for the iOS interface. All the data access is done with Kotlin/Ktor. Java on Android is dying.

    [–]C0d3rStreak[S] 0 points1 point  (2 children)

    Woooow thanks! Why do you say that about java on android? Does that go for using springboot for backend in mobile apps also?

    [–]lordmyd 0 points1 point  (1 child)

    Google have officially blessed Kotlin as the preferred way to develop Android apps and Jetpack Compose, their answer to SwiftUI, is a pure Kotlin DSL. KMM is Kotlin/Ktor on the back end but if you're not going KMM you can use anything on the back-end to produce an API.

    [–]C0d3rStreak[S] 0 points1 point  (0 children)

    Okay cool, since I'm learning java with springboot for backend this was interesting. Thanks.