Webbekend questions

Asked 1 years ago, Updated 1 years ago, 82 views

I'm going to study Beckend with Java or Spring Even if you google it, there is no Java like spring or php Is the Java-based jsp sound used for the web?

back-end

2022-09-22 19:53

3 Answers

No, the servlet is a cgi made of Java.

Php is to make cgi, not servlet, with php. You can feel it when you make a servlet with Java, but you have to create a screen (html) from the servlet.

In Java, we have to create html in the same format as println(""), which is very cumbersome. That's why I came up with a script-type technology that can be mixed with HTML like jsp.

If you write it by mixing Java language and HTml, create it as a java file and compile it into servlet class.

Next is the rise of the mvc framework. The downside of jsp is that data processing and screens are concentrated in one file, making it difficult to maintain and recycle.

Jsp accesses the database and processes all the data that is imported in one jsp from processing to screen generation. As a result, a single file of jsp typically has thousands to tens of thousands of lines. Still, it's okay to operate a small system, but it's harder as it gets bigger.

That's why the mvc-based framework is in the spotlight. By separating the model (data) and the view (screen), we want to keep the five object-oriented principles (search) as much as possible.

If you develop it using a framework, it's at least built on that framework (because you can't get out of that framework), so even if you're a less skilled developer, you'll be able to guarantee some degree of completeness.


2022-09-22 19:53

Let's organize the terms first

Java: Programming Language

Spring: Web Application Framework

jsp: Java Server Pages abbreviation, which dynamically compiles and creates servlets when requested by the user.

You should know that jsp creates and compiles a java file, creates a servlet, or class, and the class loader loads the class.

Java can only be loaded by class.

Also, Java-to-Web callable (serviceable) classes are called servlets.

In other words, the meaning of web development in Java is to produce servlet classes.

The framework now acts as a structural framework for those servlets.


2022-09-22 19:53

I know that Java Server Page is the language that is expanded and used on the web.

Spring is known as a web framework based on such JSPs.


2022-09-22 19:53

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.