Abstract: Ajax is actually a transition technology for new bottles of old wine. It is believed that it will be replaced by new technologies in the next one to two years. It is difficult to solve problems and means to form a highly abstract frame level. The solution, while JSF is an extensible framework-level solution. In J2EE next-generation specification JAVA EE 5.0, JSF is placed in a very important position, and the J2EE community attempts to unify the development model and method of the web application through JSF. As a JC-organization member of the JCP organization, the APUSIC JSF made by Chinese people is about to launch the Chinese.
1 Introduction
In J2EE Next-generation specification JAVA EE 5.0, JSF (Java Server Faces) technology is placed in a very important position. J2EE community attempts to unify the development model and method of the web application through JSF.
Compared to traditional JSP / servlet development models, JSF can bring a lot of benefits, such as:
Customizable Rich UI Component Good Event Response Mechanism Expression Language Form Data Automatic Conversion and Verification Based on MVC Frame Model, etc. ...
But at the same time, we have to see that there are some shortcomings and shortcomings in the industry's common JSF engine (not to say the JSF technology model itself, but some problems generated by the routine implementation mechanism), and these shortcomings will It has a negative impact on the mainstream development technology of Web applications in the future, including:
Conventional JSF implementation mechanism, operational performance is not very ideal for good tool support
As a member of the JCP organization, how is the JSF technology to treat JSF technology? Is it intended to fully support JSF? What solutions have been overcome by how to overcome the above?
2 JSF and AJAX
When I talk about Web development technology, I have to mention AJAX. This is currently the concept of purple in the entire IT world. Here I don't want to explain what is AJAX again, but we can have a basic understanding of Ajax.
Ajax is actually a new bottle of old wine technology, which provides an asynchronous programming model through Java Script and DHTML, making our web app to bring a better human machine experience. However, the level of Ajax is very low; or, it solves the methods and means of the problem, it is difficult to form a highly abstract frame-level solution, while JSF is an extensible frame-level solution.
In fact, I think Ajax is a transitional technology. I believe that in the next year to two years will be replaced by new technologies, it is Microsoft's XAML, Mozilla XUL, or any possible RIA standard, actually the entire industry Watching. But no matter what technology, JSF can be adapted, adapt to JSF to accommodate a new technology just replace a render kit. For example, if you want to implement chart function (Chart) in the web, Msie has VML, Gecko, and Opera have SVG, and only simply determine the browser type in the server, you can choose a render Kit to generate different Markup. Complete the same function, this is a task that is difficult to complete with conventional JSP technology.
3 APUSIC JSF: The Chinese people's JSF engine / 3.1 container level Ajax supports this idea of JSF AJAX, I am afraid it is not a Kingdee middleware, but many third-party JSF AJAX implementation is a component library. And an additional servlet or filter to process AJAX requests, and we are directly processed by the JSF container to process AJAX requests. We will determine according to the type of request, which is a normal HTTP request or an AJAX request. If you are a regular HTTP request running a JSP page, generate a page document (and we will embed the Java Script code must be in the generated page document, mention later); if the request is an AJAX request, the server is requested The parameter is decoded normally and performs all other phases other than the page output phase in JSF. At this time, a JSF component tree will be generated, traverse the component tree, and find out the changed data, and package the data into an AJAX response And by the client update these modified data, and even change the appearance of the page. In the JSF specification, the render kit used in the JSF page output phase is alternative. The default HTML_BASIC RENDER KIT output is a standard HTML syntax, which does not contain any Java Script code. The APUSIC JSF engine implements an Ajax Render Kit, you can Embed a Java Script code in the HTML document to implement the AJAX feature, and replace the Render Kit only needs to modify the configuration file. So what is the benefit of this? 3.2 Enhance JSF Running Performance, bringing a better human machine experience. General practices for regular JSF containers in status maintenance are: based on session, or based on request transmission type, this means that when each client is responsive to the server side, you need to pass all the status. This undoubtedly brings a large negative impact on the operating performance of the system, making the developer as: JSF is a technique model of heavyweight. Through the AJAX characteristics of APUSIC JSF, we can only pack changes in data to a AJAX request to send to the server, and the server side will only package the changed data into a AJAX response, which greatly enhances the operating efficiency of the system. Also, the traditional JSF request response will refresh the entire page, and the APUSIC JSF will only update the changeable client component, which gives customers a better human machine experience. 3.3 Simplified AJAX Development To write ajax app to write a lot of Java Script code, development, commissioning, and maintain these Script scripts are quite cumbersome. If you use Apusic JSF technology, you no longer need to write any Java Script code, the engine has helped you These code. All standard components of APUSIC JSF are supported by Ajax. Some third party components may not support AJAX, but use a label called
The APUSIC JSF also provides a label called