I want to settle on a GUI framework, and use AJAX, as simply as possible. Assuming adequate skills in both JSF and Flex, but not too skilled at AJAX/javascript, and assuming Java as the language for the application, and using a DB, which is a good choice, or both have equal set of pros/cons?
How to make HTTP requests with Flex: http://www.adobe.com/devnet/flex/quickstart/httpservice/
AJAX using JQuery (one of many JS frameworks): http://docs.jquery.com/Ajax
Both of these are pretty simple once you've played with 'em a bit. You specify a URL and a callback function to read the text response once it's finished loading. Assuming you're familiar with the pros of Flex, the pros of JS are:
- It doesn't require a browser plugin
- You don't weigh down the page with the Flex framework.
- You'll probably find more developers in the market who are familiar with it because the development tools are free and the code is usually visible to anyone who wants to learn from it.
...and the pros of Flex are:
- Flex Framework-built SWF files runs in the Flash Player JIT, which is 100x faster than browser-native JS, unless you've got a JS Jit-enabled browser which uses SquirrelFish, for example. So user performance may vary considerably, whereas the Flash Player works at the same performance across all browsers, all platforms.
- The Flex Framework is open source, so you can customize it to your heart's content. And since it runs on the Flash player, it runs the same everywhere. Unlike an AJAX framework, where you usually have to be highly expert at browser compatibility coding to customize it.
- Flex tools are also free, as the Flex SDK is open source.
Having said that, you can code desktop apps in AJAX using Adobe AIR, without using Flex or ActionScript, if you want to.
Try using Richfaces. As RichFaces library will provide ready made Ajax Enabled JSF Components. You can use them in your JSF Application.
RichFaces is a rich component library for JSF and an advanced framework for easily integrating AJAX capabilities into business application development. The RichFaces components come ready to use out-of-the-box, so developers can immediately save time in taking advantage of component features to create Web applications that provide greatly improved user experience more reliably and more quickly. RichFaces also includes strong support for the skinnability of JSF applications. RichFaces also takes full advantage of the benefits of the JSF framework including lifecycle, validation, and conversion facilities, along with the management of static and dynamic resources.