Today I’m going to talk about how Java is “out of date” and there’s no need to continue learning.

  1. The judgment is based on the following points:
  2. Can it be used in actual development?
  3. Does it help deepen the understanding of technology?
  4. Is it useful for an interview?

JSP

JSP in the actual development, mainly as THE MVC model of V (View) layer. Of course, View layer rendering technology in addition to JSP, FreeMaker, Velocity, etc.

JSPS serve as page templates that are rendered into HMTL by MVC framework on the back end and then sent to clients (such as browsers) for rendering. This is what we often refer to as “no separation of the front and back ends”, “hybrid” development.

Now, that includes a lot of companies, and a lot of Internet companies. Have either abandoned this model, or are on their way to doing so, in favor of a complete “front end separation.”

In the “front end separation” mode, the back end is only responsible for providing the service interface (e.g. REST), while the front end (e.g. HTML5) sends/fetches data through the interface (e.g. JSON format).

So, on the back end, the MVC framework, in a sense, has evolved into an MC framework. As a result, there is no need to learn any template technology related to V (View), including, of course, JSP.

** So, for later Java learners, my advice is:

“You can totally give up learning JSP.”

Struts

In Java backend development, the MVC model is still dominant. Struts, as an MVC framework, is technically excellent.

However, Spring has become so powerful that it is increasingly becoming a “one-stop shop” toolkit for Java development, and one of its great tools is Spring MVC.

As the name suggests, Spring MVC is also an MVC framework. And since it’s Spring’s own son, it fits perfectly with Spring.

At the same time, Spring MVC was designed with the strengths and weaknesses of other MVC frameworks (including Struts) in mind, so it’s a great experience to use. Therefore, in the MVC framework field, Spring MVC has a tendency to dominate the world.

So for now, many companies, the old Struts project is still being maintained. But new project development is moving more toward Spring MVC.

So if you’re new to Java and learning, my advice is:

“Stop learning Struts and start with Spring MVC!”

Hibernate

Hibernate, as an old OR mapping framework, has very powerful functions and covers a wide range of areas. But this is both its strength and its burden, a burden developers can’t bear.

Hibernate is designed to allow maximum programmer freedom, complete database isolation, and complete OR mapping. Programmers can even operate on the database through configuration without writing a single SQL statement.

Of course, Hibernate is also very sophisticated and sophisticated in its design to achieve this goal. Inevitably bring the following side effects:

  1. High learning cost
  2. Configure a complex
  3. Tuning difficult

The first two points are not hard to understand, but “tuning is difficult”.

Because Hibernate is designed for complete OR mapping, complete isolation of SQL statements. But it will inevitably bring some performance loss. In most cases, Hibernate is fine if the application is not performance-sensitive. But once an application is performance-sensitive and requires SQL-level tuning, Hibernate’s advantages become its disadvantages.

Hibernate also supports SQL-level tuning, but because of the complexity and sophistication of the framework design, it requires a thorough understanding of Hibernate, which leads to a higher learning cost.

Now the most popular MyBatis, as a “hybrid”, lightweight OR mapping framework, inherits the advantages of Hibernate, and at the same time draws lessons from it. Having access to SQL while supporting configuration provides more flexibility (including debugging, tuning).

Currently, Hibernate is being used less and less in actual development. MyBatis is the preferred lightweight framework.

So, for later learners, my advice is:

“You don’t need to learn Hibernate anymore, just MyBatis.”

Servlets (To be proficient)

Of course, no company is going to implement an entire Web application with pure servlets, but rather move to more advanced technologies (such as various MVC frameworks). As a result, it gives the illusion that servlets are obsolete and that newcomers don’t need to learn them anymore.

Here, I can say very responsibly that this view is extremely wrong and extremely irresponsible.

Servlets should not only be learned, but also learned deeply and thoroughly.

Currently, servlets are no longer a mainstream Web development technology, but they are still the foundation of Java Web development technology, the cornerstone of Java Web containers, and the industry standard. At the bottom of the heap, all the popular MVC frameworks, including SpringMVC, are still servlet-based.

To do this, I drew a simple diagram:

So, if you want to thoroughly understand an MVC framework, you must thoroughly understand servlets.

Also, servlets serve as an infrastructure. Mastering it will not only help you understand the various MVC frameworks. Even the servlets themselves have a lot of utility.

If you have a deep understanding of the life cycle of servlets, you can do a lot at the bottom. For example, when a Request comes in, it is blocked to determine the permission. It can also intercept, uniformly check and attach the Response when it is sent out.

So, if you’re learning Java, my advice for servlets is:

“Servlets should not only be learned, they should be learned deeply and thoroughly.”

other

At present in China, Java is more as a Web backend technology. Therefore, in practical learning, many technologies do not conform to the “national conditions”, the practical significance of learning is not great. Let me give you a few examples.

1.Applet

As a page plug-in technology, not to mention Flash is on the way out, let alone applets that never caught on.

2.Swing

As a desktop UI framework. Not to mention the design itself. In real life, the desktop applications I work with are either C++ (such as MFC) or C# (Winform, WPF). Therefore, there is no need to learn Swing.

3.JDBC

As a lower-level database infrastructure, JDBC is supported by many frameworks, such as MyBatis. But in real development, it doesn’t matter if a programmer doesn’t know. So, while I can’t advise you to give up JDBC learning, you can always make it a lower priority if your time is limited.

4.XML

XML is still widely used today. But as a Web data transfer format, it is gradually being replaced by JSON. So XML is easy to understand for Java backend learning. As for the plethora of XML manipulation apis, such as XPath, you don’t need to learn them at all. If you need it in the future, you can check it.

The last

Whether the Java technology is a must or an “outdated technology”, the most important thing is to know your Java basics. If you have a solid Foundation in Java, you will be better off, or you will fall down hard on the way.

If you want to have a solid foundation, you can’t forget the Java foundation,Java300 setHelp you solid your basic knowledge!