Friday, 16 May 2008

Building Collaborative CRUD Applications With ICEfaces and NetBeans

CRUD-style applications remain the mainstay of enterprise application development, but more and more, application developers are looking to add Rich Internet Application (RIA) capabilities into their development process. ICEfaces provides a comprehensive development framework for building RIAs using pure Java techniques based on JavaServer Faces (JSF), but beyond RIA features ICEfaces can truly revolutionize web applications by facilitating real time collaboration using Ajax Push. The latest ICEfaces 1.7 release includes complete integration with NetBeans 6.0.1 making it easy to build collaborative RIA-style applications, and Glassfish combined with the Asynchronous Request Processing (ARP) features of Grizzly provides the scalable deployment infrastructure required for push-style web applications. Note: NetBeans 6.1 integration is underway and will be available soon...

That is the intro to an article that was recently published at netbeans.org. You can read the full article here. You can find the code for the example at our tutorial page under the IDE Tutorials. More on this subject when the NetBeans 6.1 integrations is complete.

Technorati Tags:

Posted by steve.maryka at 3:22 PM in Entries by Steve Maryka

Thursday, 10 April 2008

Ajax Push Comes of Age

Ajax Push has always been an integral capability of the ICEfaces framework, but for the longest time it was not a primary consideration of the average technology evaluator. We always found this surprising, because the impact that push can have on a web application is far more profound than Ajax's primary claim to fame - eliminating the full page refresh. In recent months, however, we have seen a marked change in demand for push technology within the ICEfaces community, and we are now involved with a large number of projects where Ajax Push is front and center on the requirements list. So when people are evaluating their options for achieving web-based push, what makes them decide on ICEfaces?

Simply put - ICEfaces provides the most comprehensive open source solution in the industry for lightweight (plugin-free), push for web applications. Now, I will back up that statement with the supporting facts.

To begin with, while there are hundreds of open source Ajax libraries out there, only a small handful offer push capabilities - namely Dojo/Cometd, DWR/Reverse Ajax, and ICEfaces/Ajax Push. All three mechanisms are based on the same fundamental concept of HTTP protocol inversion - holding an open request from the browser, and responding to that request when something is available to be pushed. Normal and inverted HTTP connections are illustrated in the figure below.

Normal HTTP Connection

So if all push mechanisms are based on this low-level protocol inversion, then how can they be fundamentally different from the developer's perspective? With ICEfaces we have strived to provide a natural extension to the JSF programming model in support of push style application development, and have sheltered the developer from the low-level mechanics for Ajax-based push. ICEfaces provides an application-level managed bean, the RenderHub, that orchestrates push events within the JSF lifecycle. Basically, you define groups of client sessions that need to receive the same push events, and register those render groups with the hub. Some trigger point in application logic can then request a render on a given render group, and the hub will make it all happen. The hub is responsible for executing the render phase for each session in the group, coalescing requests and maximizing throughput with multiple parallel render threads. Furthermore, the RenderHub architecture supports clustered deployments. This basic push architecture is illustrated below.

ICEfaces Push Architecture

From the developer's perspective, it is a clean, natural mechanism for implementing push logic using pure Java programming techniques. What is less obvious (and rightly so) are some of the intricacies that the underlying push mechanism handles. The first relates to the browser and connection limits for the same URL. One connection from the browser is required for the push channel, and a second is required to handle user initiated requests, so an application requires 2 connections, which happens to be the maximum allowable in Internet Explorer. The connection usage for a single view onto the application is illustrated in the leftmost schematic in the diagram below.

Now if you attempt to open multiple views onto the same web application you will not have sufficient connections to support it, as each view needs a connection to support its push channel. With ICEfaces, the push mechanism in the Ajax Bridge provides connection sharing that allows multiple views to share a single connection for push updates. It is based on shared cookies where a single view marshals updates for all views, and if the controlling view is closed, another view takes over. The connection sharing for multiple views support is illustrated in the center schematic in the diagram below.

The connection problem is amplified in a portal deployment where you might have multiple portlets from different web applications looking to share the same push connection. In this case, not only do you need connection sharing at the browser, but also at the server. And because the server side connection management needs to communicate with multiple web applications you need some IPC mechanism to support it. With ICEfaces we have adapted the Asynchronous HTTP Server to handle connection management for portlets. The portal deployment support is illustrated in the rightmost schematic in the diagram below.

Normal HTTP Connection

Now if we turn our attention fully to the server-side connection issues related to push we see scalability concerns with multiple open connections at the Servlet level. Each connection requires a dedicated threat to handle it, so thread exhaustion can occur quickly within the application server. Efforts to address the asynchronous communication path within application serves has begun, and will ultimately be standardized under JSR 315. To date we have seen independent solutions emerge for Tomcat 6, Jetty 6, and most recently Glassfish/Grizzly.

 App Servers

All of these application servers support scalable asynchronous communication, and ICEfaces is integrated to work will all of them. Additionally, ICEfaces includes the Asynchronous Http Server, that can be deployed along side any application server and provides scalable handling of the push requests.

Because ICEfaces handles all of the connection related intricacies at the framework level, the developer is free to focus on application development, and to that end, has a straightforward Java API to work with. Without question, ICEfaces is the only solution in the market that provides such a comprehensive feature set and an easy to use programming model. The industry is definitely catching on to the revolutionary value of push, and when enterprises decide they need push, they are flocking to ICEfaces. Ajax Push has definitely come of age in ICEfaces.

Technorati Tags:

Posted by steve.maryka at 9:55 AM in Entries by Steve Maryka

Thursday, 18 October 2007

ICEfaces And Mobile Ajax

We have been pretty involved with exploring the applicability of ICEfaces in the Mobile Ajax space recently, so wanted to keep everyone in the loop. As it turns out, given our existing support for the mobile Opera and Safari browsers we have a pretty good story around mobile ICEfaces applications today. In fact, we have a customer, C3 Solutions, that has already developed a mobile enterprise system based on ICEfaces. Ted also blogged here about ICEfaces on the iPhone recently, illustrating a number of our demo applications running.

Key to ICEfaces suitability for Mobile Ajax applications is the server-centric nature of the framework. To begin with, the application runs as a pure JSF application, so the server does all the heavy lifting, utilizing only the lightweight Ajax bridge to facilitate the Ajax interactions. Regardless of application complexity, with ICEfaces, the client side of the deployment is a fixed, lightweight piece of JavaScript that is well-suited to resource-constrained mobile devices, provided they support a modern mobile browser.

We also see Ajax Push as a key feature for mobile applications, as it makes it feasible to updated the client in real time without the user needing to interact with the device. Despite improvements in interaction mechanisms you find in devices like the iPhone, they remain awkward to interact with, so reducing the need for interaction is critical to developing effective mobile applications.

I recently did a talk on ICEfaces and Mobile Ajax at AjaxWorld and demonstrated a couple of mobile ICEfaces applications at the show. We went to the painstaking effort to record these demos and they are now available for your viewing pleasure here. You will see the prominence of Ajax Push in both the demos, so make sure you have a look. If you are interested in viewing the slide deck that was presented, you can grab it here. I will also be giving at talk at WEB Builder 2.0 on the same subject in Vegas on Dec 3, so if you are planning on attending you can track me down there.

While the demos are wireless mobile demos, the process of capturing them on video was far from wireless as the photo below illustrates.

Wireless Demo??

Right after AjaxWorld, the OpenAjax Alliance and W3C cosponsored a workshop on Mobile Ajax, and I was lucky enough to be one of the attendees. There was a vast cross-section of the industry represented there and a wide range of discussion topics. While it was a tremendously interesting day, it is unlikely that anything concrete will come from this gathering in the near term. I think that once again Moore's Law will have a bigger impact on penetration of Ajax technologies into the mobile space than standards initiatives ever will. But why wait when you can deliver in the mobile space today with ICEfaces?

I will keep you posted on new developments around ICEfaces and Mobile Ajax as they arise.

Steve

Technorati Tags:

Posted by steve.maryka at 6:57 PM in Entries by Steve Maryka

Friday, 12 October 2007

Welcome to the ICEfaces Water Cooler

Welcome everyone. You are looking at the new blogging site for the ICEfaces team. As you can see, we are just getting up and going. I am Steve Maryka, CTO at ICEsoft, and will be spearheading our external technical communications initiative, for which this blog site will become one of our primary vehicles.

Until now, Ted Goddard, senior architect for ICEfaces, has been our primary blogger. You may already be following his story here . Ted will be mirroring his posts to both his existing blog and this one, so you can follow his Ajax Adventure at either.

I will start with a few posts related to the history of ICEfaces, our partnering efforts in the community, and our progress in the mobile space. Most importantly, we want to make sure the information we provide is interesting, relevant and useful to the ICEfaces community, so please let us know what you want to hear about.

As we build momentum, I will get other members of the team involved. Over the last 4 years of R&D we have developed such a tremendous breadth and depth of knowledge that no single mind (except maybe Ted's) can contain it all, so as we delve in to more complex subjects, we will make sure the subject matter experts are involved.

Once again, welcome. I trust that you will find the new ICEfaces Water Cooler useful, and I hope to hear from you along the way so that we can consistently present the kind of information that is pertinent to you. Stay tuned for more from myself and the ICEfaces team.

Steve

Posted by steve.maryka at 8:59 AM in Entries by Steve Maryka