Whether really it is necessary to study JavaScript?


On the one hand yes, if you plan to develop new functionality with use AJAX in the web-applications.


On the other hand, JSF-components (JSF components) and their libraries can hide the details concerning JavaScript, DOM and CSS. These components can generate for you all necessary components for maintenance of support of interactions with use AJAX. Visual means of development, such as Java Studio Creator, also allow to apply JSF-components c support AJAX to creation of effective web-applications, allowing thus to developers to not care of specific details of realization AJAX.


If you plan to develop own JSF-components or to process events generated by them, it is important, that you were familiar with bases JavaScript. There are client JavaScript-libraries (look below) which can be caused from JavaScript on the page and which automatically solve a problem of incompatibility of browsers.

Except for it there is the interesting Internet-resource acquainting Java-developers with objects JavaScript: Hierarchy of objects and inheritance in JavaScript (Object Hierarchy and Inheritance in JavaScript).



What JavaScript-libraries and systems are offered in the help to the Java-developer?


There is a set of JavaScript-libraries and sets of components (still a lot appears new) which help to cope with such not palatable problems as distinctions of browsers. It is recommended to pay attention to 3 good libraries - The Dojo Toolkit, Prototype and DWR.


* The Dojo Toolkit contains API and a set of elements GUI for support of development of web-applications with the complex{difficult} graphic interface.

Dojo includes intellectual system for formation of structure of the web-application (packaging system), various UI-effects, API for realization of the mechanism " drag and drop ", API elements of management GUI, processing of events, API for storage of projects and API for realization of AJAX-interaction. Dojo helps to solve the general{common} problems of the user (usability), such as actions at navigation between web-pages, ability to distinguish pressing of button " Back " in a browser or changes in a line of input URL for creation of a bookmark (bookmarking), ability to disconnect superfluous functionality if AJAX/JavaScript are not completely supported by a client - browser.

On riches of opportunities, universality and convenience of use JavaScript-library Dojo can be compared to the Swiss army knife. She gives the broadest set of options and supports both new, and old browsers.

* Prototype specializes on AJAX-interactions and contains AJAX-object which includes some objects, the primary goals intended for performance, such as formation of HTTP-searches, updating of a part of the document unitary or periodically, an insert of new contents in the document, periodic updating of a part of the document. Besides this JavaScript-library contains a set of objects for performance AJAX of searches and a set of functions for access to components on page and manipulations DOM-object.s Script.aculo.us and Rico are superstructures above Prototype and give UI-effects, support " drag and drop ", and also include the general{common} elements of management GUI focused on JavaScript.

Technology Prototype has enough in cases when support of AJAX-interactions and the decision of some primary goals is required only. If UI-effects are necessary also, will approach Rico and Script.aculo.us.

* Yahoo UI Library is a library of utilities and a set of elements of management GUI, using API for support of complex{difficult} client applications. She includes support AJAX and the events, distributed on all kinds of browsers, animation, DOM, realization of the mechanism " drag and drop " and an exchange of events between browsers. Yahoo UI Library it is well documentary and contains many examples.

* DWR (Dynamic Web Remoting) is the system including both client, and a server part which is focused on use by developers of the mechanism of calls of the removed procedures (Remote Procedure Calls, RPC) between client scripts on JavaScript and server Java-objects (plain old Java objects, POJO), developed{unwrapped} on Java EE the web-container.

On server party{side} DWR uses servlety for interaction with Java-objects and returns or object - performance of the given Java-object, or the XML-document.

DWR it is easily cooperated with other technologies Java. If environment{Wednesday} with closely integrated client and server parts is necessary for you, use DWR.

* Zimbra - the client-server system focused on an exchange by messages and delivery e-mail in complex{difficult} client applications on base JavaScript. Zimbra includes API for tooling UI, taking into account distinctions between browsers and giving set of the built - in elements of management GUI, API events for an exchange of events both between elements of management UI, and between the client and the server, the auxiliary classes simplifying development of client functionality on JavaScript, a superstructure above DOM which facilitates the decision of the questions concerning discrepancy of realizations DOM in different browsers, and network API which help JavaScript-clients to communicate through AJAX and SOAP.


There is a set of out-of-date libraries and completely new libraries for JavaScript, but the above-stated list gives the review only several unspecialized libraries. You can choose as one library, and to use a little according to your needs{requirements}. Wider list of client systems: Survey of AJAX/JavaScript Libraries.