In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is to share with you about the reason why Ajax is better than JSF. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
I think the reason why Sun came up with a JSF,JSF like this is this: first of all, component-based Web development will be a trend in the future. The self-contained components facilitate the processing of IDE and can improve the efficiency of development.
That is, the advantage of JSF over MVC frameworks such as Struts/WebWork is that it can be combined with IDE to automatically generate code. However, the traditional MVC framework written by hand affects the development efficiency. Because Java technology has no obvious advantage on the client side. Applet has been abandoned, and Java's strength is on the server side. It is impossible for Sun to use JavaScript, because in the eyes of traditional developers, JS is only worthy of doing trivial tasks.
So in the architecture they designed, all user events are handled on the server side, which leads to the fatal disadvantage of JSF. It binds the event handling model to the server and limits the more responsive interaction design. The resulting network latency can destroy the availability of the software. This is why Ajax does not play a full role in the architecture of JSF.
The design idea of JSF is a bit like VB. Component-based development is the right direction, and Ajax development will follow this path in the future. But the difference between JSF and VB*** is that VB's event model is handled locally. This is an essential difference, so if JSF does want to imitate VB, it is also a copycat. And in the design phase of JSF, synchronous request / response is the mainstream, and their ideas are still firmly tied to the page-based development approach. I didn't think about other possibilities at all.
Asynchronous request / response is the difference between Ajax and traditional development methods, asynchronous brings better interaction design.
In GoogleMaps, when the user scrolls the map, the user gets the new map image, which is requested asynchronously, so it will not interrupt the user's operation flow. In traditional mapping services, the page may need to be refreshed every time you scroll. Using Microsoft's mapping service, you can feel the obvious gap. It doesn't even allow users to scroll the map at all.
I used to say that GoogleMaps is not Ajax because XMLHttpRequest is not used, which seems to be a bit narrow. GoogleMaps requests a picture of the map by modifying the src attribute of the dynamically created img element. Such a request does not interrupt the user's operation, so it is asynchronous. We see in AjaxinAction that the author treats GoogleMaps as an Ajax application, while in PragmaticAjax the author says that GoogleMaps is not strictly Ajax, both of which make sense.
In fact, it might be better for JSF to combine with Applet. Applet is multithreaded and can capture the user's operation events and send them to the server asynchronously. So that the user's operation will not be interrupted. But in this way, the architecture designed is complicated. And Applet is something that has been decided to abandon. JSF and JavaWebStart can be combined, but JWS is designed to build a completely different class of Web applications, RichClient, rather than RIA applications that run in browsers. Therefore, JSF is at best a transitional scheme, which has long been lost under the competition of Ajax/Flash.
Ajax and Flash are the two most promising technologies for browser-based RIA development in the future.
According to Zexin's judgment, it may be three-thirds of the world, Ajax, Flash/Flex/Laszlo, and M$ Atlas. Atlas is a technology similar to Flash developed by M$, which is still a vaporware and has not been seen in its true face. JavaWebStart, by contrast, is limited to some internal applications.
These are the reasons why Ajax is superior to JSF. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please 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.