Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to think about JSF

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article shows you how to think about JSF. The content is concise and easy to understand. It will definitely brighten your eyes. I hope you can get something through the detailed introduction of this article.

After using Woodstock for a period of time, I felt a little good at that time, but then the control of components was not very good, so I didn't use it in graduation design. I've thought of some disadvantages for JSF, so let's analyze it here. It's just a superficial opinion.

1. Stateful programming model

JSF makes Web programming very much like the JAVA SE GUI programming model. Maintain component tree and component status. It makes me feel very uncomfortable. Web development is Web development, which itself is stateless. All behaviors are based on ranges such as request,session,application. JSF insists on putting on the GUI model, and the result is very unnatural and a little different. And JSF maintains only view state, not data state, which is a bit of a mess in the programming model. I think Web is Web!

two. Component-oriented development, more OO

This is to see someone publicize JSF like this during the discussion. I admit that the statement of this sentence is correct. Because JSF basically turns Web programming into JAVA SE's GUI programming. It is indeed component-oriented. But through the use, I think whether the advantage of this approach is really that great, it is worth considering. Compared to JSF,PHP, Rails, JSP (JSTL), there is no deliberate provision of so-called components. This method facilitates the manipulation of HTML controls, which is direct and simple. When using the JSF control, his control becomes blurred and inflexible. We need to control the components in Backingbean. I feel-- it's too much. And the benefits of this component-oriented approach are far from offsetting the troubles it brings.

As for the so-called OO theory, is it necessary for things in the presentation layer to emphasize component-oriented such as JSF, OO? I can understand the component-oriented HTML of ajax like Widget. PHP/RoR is not component-oriented but it is also very easy to use. The presentation layer only needs to provide some page reuse and insertion capabilities. This reminds me of complaints about excessive layering of JAVA EE. It forms a sharp contrast with Rails. The so-called OO is of great use in server-side, business-processing code. But Web is a thin client (unlike Swing)! I think it's a misunderstanding to promote JSF-style OO with so much fanfare in the presentation layer of Web. We can take a look at the language frameworks such as PHP\ Rails. MVC is enough. The most important features required by the presentation layer of Web are easy to use, easy to control, and easy to reuse (also faceted fragments).

JSF's way of putting HTML and backend together, imitating Swing and making OO is a bit thankless.

The above content is how to think about JSF. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserve, you are 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.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report