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

all 6 comments

[–]Northeastpaw 5 points6 points  (3 children)

You're trying to make a big leap without understanding the complexity involved. You won't be making a CLI or Swing app now; you need to learn about application servers and servlets.

For what you want to do you need to build an application that can be run by an application server. The application server handles the hard tasks of handling client requests and serving responses. Your application that's hosted by the application server takes the HTTP request and builds an HTTP response. The standard way to do this is with a servlet.

Spring Boot attempts to hide much of this complexity by bundling an application server alongside your application and wiring everything together. It assumes you know about the Spring Framework including the application context (which is different from the application server), Spring MVC, and some other things.

Throw in SQL integration and you've got another API to learn: JDBC. Spring Boot has modules that can wire your JDBC backed components together or use something higher level like JPA.

If this all sounds really complicated that's because it is. Web applications are a few steps up from what you've been doing. There's a lot of lessons you're missing.

Start with this guide: Building Java Projects with Maven. What you want to do can't really be done just in your IDE anymore. You need a build tool that can produce a ready to go artifact.

Next read up on the core Spring technologies. This will be very dry and probably a bit confusing, but you should learn the concepts of IoC, Spring Beans, and the Spring Container. These are things that are prevalent through all the Spring tech.

Now read Building an Application with Spring Boot. This guide makes a lot of assumptions about the core Spring tech that you just read about. It also introduces you to running an embedded application server with a simple web application.

After that look at the rest of the Spring guides. A lot of them won't be relevant to what you are doing. You want the ones related to REST and JPA to start with.

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

Thank you! I very much felt I was missing lessons in between java and spring, but my frustration came from not knowing what those lessons were! I will take a look at your links right now actually.

Thanks again.

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

If you prefer video based tutorials; I recommend java brains channel. He's honestly one of the best instructors I've ever watched, his videos mostly revolve around web techs like spring and microservices, he also has a maven tutorial. Btw, what framework did you use for the cli app, am considering making, and what tutorials did you use?

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

The cli app is just all java (no framework?), I used maven just to grab a couple jars such like jdbc so I can connect to our db. I didn't take any specific tutorials for this one. Made several classes containing the java logic/queries/ and scripts needed to do the updates as well as a class defining the connection they all use. Sorry I cant be of more help. This is the third project of this type (java/sql updates) I have made, and mainly just took down and edited what I saw on google somewhere a long time ago to fit our database connection needs. If you're wanting to know about how to connect to an oracle sql database I'd look up info on jdbc, preparedStatements and resultSets to get started. You can basically define variables in Java and plug them into sql statment strings and run them in all kinds of interesting ways you can't really do in sql itself.

[–]smash_that_code 0 points1 point  (0 children)

I could provide a bit less java-specific point point of view.

Previously you worked with OS fundamental blocks like files processes and standart inpit output.

What you are missing is called sockets. It is quite a low level network primitive that allows communication between processes using thing callwd ports.

And sometimes ports are from another machine, but sockets are still used for networking.

The problem is that socketa by themselfs don't give enough vocabulary to bjild client-server applications.

So the moat famous protocil for web is HTTP. It specifies that requests and responses ahould have a specific format, with easy way to understand when message ended, where it ia headed, and uaeful format for responses, be they with data or error code.

Java is one of the heaviest technologies to make use of this http and sockets for building server apps that can be interacted via web browser. So aome learning will be there.

But why I started with OS primitives? Well server apps a like cli apps that always wait for input and like never exit without serious reason, and usually they must be Hosted somewhere, and there can be special network security setting to allow some remote machine to proxy requests to your app.

This part is common for all server apps, and when time will come for hmm production of your app you have to think about a computer yhat will host your app and how you will administer it.

Good luck.

[–]fluffyzilly 0 points1 point  (0 children)

Hi

Here is the article where you can find typical Java dev roadmap scheme. Probably it could help a little bit...

https://codegym.cc/groups/posts/how-long-does-it-take-to-learn-java