JSP hand JSF to create the perfect Web application

Source: Internet
Author: User
Tags interface java se advantage
Js|web Java has warmed up in recent years, and with the introduction of Java SE 5 and Java SE 6, the future of Java is even more glorious. But Java-based JSP has not looked up until Java SE 5 was launched, the most important reason is that JSP although the function is very powerful, but the biggest advantage is its biggest drawback, powerful means complex, especially the design of the front-end interface of the visual tools are not much, nor strong enough. Therefore, the design of JSP page becomes very complex and cumbersome ...

Java has warmed up in recent years, and with the introduction of Java SE 5 and Java SE 6, the future of Java is even more glorious. But Java-based JSP has not looked up until Java SE 5 was launched, the most important reason is that JSP although the function is very powerful, but the biggest advantage is its biggest drawback, powerful means complex, especially the design of the front-end interface of the visual tools are not much, nor strong enough. Therefore, the design of JSP pages becomes very complex and cumbersome. However, while Java SE 5 was launched, Sun introduced the new JavaServer Faces (JSF) specification to simplify the development of JSP. So that the JSP embarked on a broad road.

   first, what is JSF

JSF and JSP are a couple of new partners. JSP is a technique for logic processing in the background, and JSF, on the contrary, is a presentation layer technology that enables developers to quickly develop a java-based Web application. Currently, JSF1.2 has officially joined Java EE 5 as a standard.

As a highly modular technology, developers can implement a drag-and-drop editing operation with the support of some development tools, and the user simply drags the JSF components onto the page, making it easy to develop the WEB. This is its greatest benefit as a modular technology, and the components we can use are not just some simpler input boxes, but also more complex components that can be used, such as table components such as a DataTable, tree-like trees, and so on.

As a standard technology, JSF has also been supported by a considerable number of tool providers. At the same time we will have a lot of good free development tools to use, not long ago, Sun Java Studio Creator 2 and Oracle jdeveloper 10g as a free JSF development tools to release, to bring a little anger to JSF. In addition, we also have some excellent business development tools to choose from, BEA Workshop (formerly M7 Nitrox), exadel,myeclipse, such as the Eclipse-based plug-in development tools, for the current vast number of Eclipse users have brought great convenience, IBM's The JBuilder of the Rational application Developer and Borland is also a good commercial development tool that supports JSF visualization development.

JSF and traditional Web technology are fundamentally different, in the traditional Web technology requires the user to capture the browser request, save the client state, and manually control the page's turn, and so on. The advent of JSF has undoubtedly brought us great convenience, and JSF provides an event-driven page navigation model that enables application developers to design the page flow of an application. In a manner similar to Struts, all page flow information is defined in the JSF configuration XML file (faces-config.xml) rather than hard-coded in the application. This largely simplifies developer development and simplifies application development.

JSF is also a framework that follows the model-view-controller (MVC) pattern. The complete separation of view and application logic (Model) enables applications that use JSF technology to achieve a good separation of the page from the code. All requests for JSF pages are processed by a front-end controller (Facesservlet), which automatically processes the user's request and returns the result to the user. This is not much different from the traditional MVC framework.

Not only is the POJO technology used in JSF, but also the control inversion (IoC) (or Dependency injection-di) technology similar to Spring is used, in the JSF backing Bean, we can put the data and operations required by the view into a backing bean. At the same time, thanks to the DI technology used by JSF, we can initialize the Managed Bean in the configuration file, and we can also use this technology to easily integrate with Spring with similar technology.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.