"Select JSP instead of servlet as the mainstream program of the BS front desk is a strategic direction error of Java." The article is a question of the experience angle to the JSP selection direction; it is not "publicized" (public themetology) The reverse thinking itself will argue, it is expected. I have answered some arguments, study, practice, argue, summarize, and then practice, this is a way to improve and break through.
First, JSP is a web interface processing mode (not language), so it is a great dispute to the actual MCV mode. So the MCV mode is not suitable as the selection basis of the JSP / servlet. However, the application method of the JSP / Servlet expression layer is not doubtful, and the business logic layer is separated, and the principle of project demand control and cost control will eventually increase the quality of the project and reduce maintenance costs. Whether it is the kind of program, it is also a class that is low-coupling with other modules / layers, and is also an inevitable choice. It is also an object-oriented manner. It is mainly reflected in inheritance / Interface, if you deny its positive significance, there is no room for discussion.
OOP will accept, but the key focus here is what the object is? In different environments, the object has a completely different meaning, from this point, OOP has become a useless noun for excessive flooding. In VB, it usually represents a window assembly in the interface; in C , it is usually a set of functions; in the business logic in Java, the object is generally an objective thing that has independent meaning, while Java uses When the expression layer, whether it is JSP / or SWING.AWT, it uses a VIEW diagram structure like VB. What can be expressed, what can be abstract, what should be abstract, greatly depends on the experience of the developer.
It is applicable to JSP. First, you should recall what JSP's development mode / imaginary is what is the analysis case when the JSP has appeared. In the text, the most fundamental arguments have been mentioned (there is no reading of netizens). JSP use cases are copied asp, which is "I hope non-program personnel can directly generate dynamic content" JSP, which is the Sun Selection to JSP Evolution The most fundamental reason. The biggest argument in the article is also: the fact that non-programmed personnel can't write JSP; so the JSP side focused on itself, it should choose to facilitate the direction of the programmer!
Let me recall what the projects of each person take over. Or start from the individual, according to customer requirements (or even the customer?) Directly; develop a version feedback to the customer to modify the second edition? Or take over a group of prototypes, usually html, then start from here, abstract, things can be packaged, can pack things? Even in the first case, the developer is playing the world, what is the most often? It should be all copied, find similar pages from the Internet, and become HTML and modified. It can be seen that the development of the Web can be seen as starting from HTML. The difference between the problem is how to start from HTML.
If it is considered to be directly starting from HTML, inserting various generated values from the <% =%>, the first way of sun is the earliest and hypothetical; eventually generating a simple page, when the function is not too ok, then a page extends, then JSP is indeed Is a suitable choice. By the way, if generated is simple to express the logical function, the page is complex HTML, (this is the most typical situation of the Chinese style website), and the superiority of JSP is very obvious. However, in turn, this shortcoming is that as the project is carried out, huge, complicated, developers and maintainers will eventually fall into the "web trap", which is the lack of logical linkage, it is difficult to maintain, This is actually why it uses a dynamic web page to replace HTML. More common practice is to process again on HTML, extract each feature code, one by one is a reusable component, (note the difference between business logic components), on the other hand, the HTML code in the component is convenient for modification, It is required to be modified. From this request, XML / XSL / XSLT has been derived, and TILES, SLIDE, STRUTS include Validator, and so on. Whether it is one, HTML must organize and decompose that it is possible to reuse and reduce maintenance costs. For functional / content / service-driven websites, web pages are generally simple and highly reused, this mode of operation is particularly efficient and concise, and the web page itself can be pre-designed directly with UML / UseCase. That is, "Select JSP instead of servlet as the BS front desk mainstream solution is the type of project type in the strategic direction error" of Java, that is, the inheritance of the object is the reality of the expression.
In fact, JSP is also fundamentally supporting web pages decomposition, abstraction, reuse, is often used in use; in taglib and struts: logic, it is also possible to determine include Include according to the context variable condition, so it is basically a similar purpose. "Select JSP instead of servlet as the mainstream scheme of the BS. The controversy is that JSP cannot handle the top-level template, which limits the level of abstract reuse of this expression level object. If servlet is the main direction, the same input, to achieve the convenient programmer to directly modify the interface code, and it is also easy to (select) the object application of each direction level, there is no JSP. Obstacles. Sun is a unloaded developer when starting JSP, but it can do this, but it has chosen the use of ASP mini, and does not use the most powerful object language. JavaALET, Through development of label / javabean to make up for the original shortcomings, not only, not only the burden of the learner (the JSP programmer who is skilled in TAG is the JSP programmer that can be skilled, which also reduces the opportunity of its own market share and market success. . This is the reason why SUN is the idiot of the stupid error for "Select JSP instead of servlet as the mainstream scheme of the BS."