In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly introduces the example analysis of JSP and BEAN, which is very detailed and has certain reference value. Friends who are interested must finish it!
JSP is a technical standard for dynamic web pages. JSP has a lot to learn. Here we mainly introduce JSP and BEAN, including the powerful aspects that Servlet is used to write business layer.
To put it simply, SUN first developed Servlet, its function is relatively strong, and the system design is also very advanced, but it still uses the old CGI way to output HTML statements, which is a sentence output, so it is very inconvenient to write and modify HTML. Later, SUN introduced a mosaic JSP similar to ASP, which embeds JSP TAG into HTML statements, which greatly simplifies and facilitates the design and modification of web pages.
New network languages such as ASP,PHP,JSP are mosaic SCRIPT languages.
From the perspective of network three-tier structure, a network project is divided into at least three layers: data layer,business layer, presentation layer. Of course, it can be more complicated. Servlet is very powerful for writing business layer, but it is not convenient for writing presentation layer.
JSP is mainly designed to facilitate writing presentation layer. Of course, you can also write business layer. Friends who are used to writing ASP,PHP,CGI often mix presentation layer with business layer unconsciously. Just like the previous friend, put the database processing information into JSP, in fact, it should be placed in business layer.
According to SUN's own recommendation, only things related to presentation layer should be stored in JSP, that is, only the part of the output HTML page. And all data calculation, data analysis, database connection processing, all belong to business layer, should be placed in JAVA BEANS. Call JAVA BEANS through JSP to realize the integration of the two layers.
In fact, the DNA technology launched by Microsoft not long ago is, in short, ASP+COM/DCOM technology. Just like JSP and BEANS, all presentation layer is done by ASP and all business layer is done by COM/DCOM. Through the call, the integration is realized.
Why use these component technologies? Because the simple ASP/JSP language is very inefficient, if there are a large number of user clicks, the pure SCRIPT language will soon reach its functional upper limit, while the component technology can greatly improve the functional upper limit and speed up the execution speed.
On the other hand, pure SCRIPT language mixes presentation layer and business layer together, which makes it inconvenient to modify and the code can not be reused. If you want to modify a place, it will often involve more than a dozen pages of CODE, using component technology can only reorganize the parts.
To sum up, Servlet is an early imperfect product, writing business layer is good, writing presentation layer is smelly, and the two layers are mixed.
Therefore, the introduction of JSP and BAEN, writing presentation layer with JSP, and writing business layer.SUN with BAEN means that JSP will replace Servlet in the future.
However, this is not to say that it is useless to learn Servlet. In fact, you should start from Servlet, then JSP, then JSP and BEAN.
The emphasis is: if you have learned JSP, you will not use JAVA BEAN and integrate it, which means you have not learned it. Everybody put more effort into JSP and BEAN.
Add a few more words:
We can see that when ASP+COM and JSP and BEAN all adopt component technology, all components are compiled first, resident in memory, and then executed quickly. Therefore, the speed advantage of compiling resident memory before executing Servlet/JSP, which is often boasted, is gone.
On the contrary, ASP+COM+IIS+NT is closely integrated, and there should be a greater speed advantage. Moreover, ASP+COM+IIS+NT development is very efficient, although there are many BUG. So, why use JSP and BEAN? Because JAVA really has a bright future. After the split of Microsoft, the operating system will rise together, and the developers of application software must find a general development language for development. The time has come for JAVA to dominate the world. If Microsoft's spin-off goes well, the split of the application software company will become the new JAVA. It is disappointing that both SUN and IBM, the big heads of JAVA, are dead. I hope the new company will inject new vitality. However, the new company is likely to launch a JAVA standards war with the old SUN, and both sides develop their own standards, affecting the JAVA boast platform.
In addition, today's machines are getting faster and faster, and the speed disadvantage of JAVA can be overcome soon.
The above is all the content of this article "sample Analysis of JSP and BEAN". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.