DEV Community

Rick Delpo
Rick Delpo

Posted on • Updated on

Why Learn Java in 2021

Learn Java, why do we want to do this in 2021 by Rick Delpo 11-26-21

Learn Java because we appear more sophisticated

Learn Java because there is money to be made

Learn Java and have it in your tool box

Learn Java because other languages use similar syntax

Learn Java to become more well rounded

Become Full Stack by Learning Java along with SQL and Javascript

Have I given u enough reasons to learn Java? Many opinions out there have java as a dying, old school language but in fact, Java is still very widely used and definitely worth learning. But my recommendation is to learn only the absolutely necessary pieces like JDBC, Servlets and Arrays with for loops. By combining some basic sql with java we can achieve our basic understanding in as little as one day. But I must warn that it is up to u to expand ur knowledge by practicing the many free java tutorials out there. Another reason I am touting this fast track java learning approach is because, when overwhelmed, it is very easy for the java beginner to give up. Also I want u to beware that self teaching can result in what i refer to as research hell. There are many ways to accomplish a section of coding and it can get confusing during research and the beginner finds himself way over their head very quickly. But hang in there and focus first on my abbreviated agenda.

I like to demonstrate how a Java Servlet works very early on. The reason for this is because we learn about the request and response mechanism (http api) right away. The user requests something and the server responds by answering the request. This is called a response object in the Java Servlet spec. Lesson learned here, Request and response is the very backbone of the internet and is used in all programming languages. This is why it is imperative to learn it right away. The Java Servlet is one way to access request and response thru the service method. Servlet is essentially the http client for Java like Axios is one such http client for Javascript.. Probably the most common way to request something is to do a Fetch in front end javascript where u will get a json response. Back in the ole days Ajax did this very task of fetching. PHP and Mysql was and still is very popular along with Java and Node.

Another programming structure is the for loop of an array or collection of data. When we fetch data we iterate over its contents and render the result. This act of iteration or looping is another must have in any programming language. Thus we have SQL (structured query language) which is found in the JDBC api of the java2 platform. BTW, servlet above is a separate specification and not part of the java 2 platform.

Thus far, I have introduced two important concepts, java and sql. We need to embrace them both for quicker learning. In my opinion I offer tutorials for the beginner on using both these concepts together. The main reason for this is because we need to do more than just a hello world program in java. We need a reason to use java and that is to access some data.

By now some of u are rolling their eyes because these two concepts can be done in most any programming language. Yes I agree but we must begin somewhere and it is good to be multi lingual as we appear more well rounded, more full stack to a hiring manage out there.

I recommend SQLite for the beginner because it is an embedded database right inside our java application. My tutorials show u how to do all this. We also use Tomcat as a servlet container or simply referred to as the server. BTW, Javascript circumvents the container and for more advanced learners the Java Springboot platform embeds the tomcat container right into the app and uses the jdbc api.

As we progress I would like to quickly get away from the Tomcat container structure and move onto the Lambda process which replaces the need for a java servlet. But it is recommended not to skip all these beginner steps because it is a good foundation to build upon.

I also want to introduce Lambda because these days (2021) java servlets seem to be more passe. We can still use request and response and can store our data elsewhere like in a Serverless environment which is all the rage these days.

So by all means, please do Learn Java, u will not regret it.

Happy Coding !!

more on this topic at my GitHub page https://github.com/rickdelpo1/Learn-Java

Oldest comments (0)