MyFaces Ajax Architecture


name: Jiri Zaloudek
e-mail: Jiri.Zaloudek@gmail.com
age: 23
school: Brno University of Technology, Faculty of Information Technology

Technical knowledge

I started to work with Java in 1999 and concentrated on J2EE in the past three years. I have made my school project on the topic “Java, XML and web services” last year and wrote my diploma work “WML RenderKit for JavaServer Faces” this spring. WML is a markup language adapted to requests of small devices (mobile phones, PDAs...). I have created one of the first RenderKits for JSF and the really first for WML. After completion I have contributed this RenderKit to the MyFaces project.

About me

I’m a student in the 5th grade at the Brno University of Technology, Faculty of Information Technology. Final exams are on 20th of June, wish me luck :-). I would like to continue my studies at the Faculty of Business and Management to extend my economical knowledge and practice my English.

The problem

JavaServer Faces is a standardized server-side user interface framework for J2EE applications and uses the MVC design pattern. JSF is using a system of components that are separating the developer from the generated code. Components generate and process requests from the client’s device. Thanks to this is possible to generate output exactly adapted to the client (web browser, mobile phone, telnet terminal...)

In order to offer the biggest comfort possible for the user working with the web, a new approach named Ajax (Asynchronous JavaScript and XML) was developed. It could be the first step to create RIA (Rich Internet Application). Ajax makes components possible to communicate with the server without reloading the whole web page. It is possible to interconnect this technology with JSF and bring the comfort known from desktop applications as close as possible.

What is Ajax and how it works?

Ajax is not a new technology. It is now widely spread primarily because of the support of all significant web browsers. They start support XMLHttpRequest objects that with JavaScript enable an interactive communication of web pages with the server.

Why JSF and Ajax?

Ajax can be used in a wide range in connection with JSF. I will try to enumerate same examples:

Project overview

Each of such components needs some logic for asynchronic communication. There are two directions of communication – from the client to the server (requests) and from the server to the client (responses). The component’s renderer will generate a JavaScript code for requests. This request has to be processed on the server that sends the response back to the client. There is some JavaScript code that reflects all changes to the DOM of HTML page.

As you can see, there is a need of an API that will provide Ajax component creation functionality. This would ensure receivment of requests and calling the right method of the controller to process Ajax request. I would like to create a complete strategy of creating Ajax components in MyFaces framework and implement a server side API. All this parts must be flexible enough to support several sort of Ajax components.

The last part would be an implementation of at least one of Ajax component. It will demonstrate how to use API to create Ajax components.

Shedule and Milestones