j2ee|js|web| Program
(1) View design
The easy and quick development of JSF based Web applications is achieved with JSF providing a rich set of reusable server-side user interface components. With the support of development tools, users can easily use these components to build a Web user interface in a visual environment, and handle user interface management issues such as data validation and event handling for components.
Design each desired JSP page, place JSF's built-in components in the page, and bind the component to the application-tier JavaBean. The RAD tool enables you to easily implement a paging file by dragging and dropping components without having to write a lot of code. The development tool automatically generates a page-corresponding Java file, where the JSF component of the page and its getter, setter methods, and the "action" attribute of the JSF component are defined in the file. Programmers can easily modify and debug on the basis of existing programs.
(2) Model design
JSF technology achieves a complete separation of application logic and representations. In the model design part, the programmer only needs to consider the logic function of the program, do not need to consider the data representation. The JSF model is implemented through the JavaBean program.
The JSF model is designed to be implemented based on the business logic that the components in the page need to handle. Using JavaBean in JSF can be declared directly in the JSF page or faces-config in the configuration file. declaration in XML.
If the application is deployed manually, the compiled JavaBean file should be placed in the Web-inf\classes directory of the Web application (Tomcat environment), and if the RAD Developer tool is used, the designer will not need to consider the details of the deployment. The development tool automates the deployment of JavaBean files that implement business logic (not compiled Java files and successful build jar packages) in the relevant locations.
(3) Controller design
The JSF controller design is done in the configuration file, with two files associated with it: Web.xml files and Faces-config.xml files (all under the Web-inf directory). Web.xml files are primarily used to control the lifecycle of JSF and implement deployment descriptors. Faces-config.xml files to achieve navigation, in the file control between the page jump process.
The configuration step is to configure the Web.xml file for the Web application first, then the control file Faces-config.xml file that is configured for JSF. These two file formats are fixed, and this process is done automatically by the tool in the IDE environment, without the intervention of the designer, even if the manual configuration is simpler.
The technical focus of JSF is in the View section, which implements a complete separation of Web application design roles. JSF web designers only need to focus on the design of the page; application developers are primarily concerned with the development of the JavaBean in the Model section, and the Process control of the program is specifically configured by Faces-config.xml.
Summarize
JSF is a reusable, extensible, component-based, tool-friendly, server-side UI Framework for Java-based Web application development. In the RAD development tools that support JSF, people can use visual Studio as a tool. NET as quick and easy to build the Web user interface, greatly reduce the use of Java technology to achieve Web user interface difficulty, improve the development efficiency.