Friday, 1 August 2008

JSFOne


JSFOne is rapidly (if you account for summer vacation) approaching: September 4th - 6th, near Washington D.C. It looks to be the most comprehensive JavaServer Faces event yet and will be a good opportunity to learn about and discuss JSF 2.0. As an ICEfaces community member you are eligible for a substantial discount if you register before August 15th (let us know if you missed the email with the registration code). Here are some of the sessions on ICEfaces:

We hope to see you there. Also, don't forget to check out Dan's new book, Seam in Action (especially the Ajax chapter).

Posted by ted.goddard at 3:04 PM in Entries by Ted Goddard

Monday, 28 July 2008

Snappy Calendar and Table components for ICEfaces


There are many dimensions to Ajax, yielding many different possible approaches. One particularly interesting dimension is the division of labour between client and server. Generally, ICEfaces assigns the most work to the server, treating the browser as a remote display. There are a number of reasons for this:

  • The data is on the server.
  • Server-side logic is not open to inspection by attackers.
  • MVC is preserved.
  • Only server-side events can trigger Ajax Push.
  • Java code is far easier to write and maintain: client-side code requires custom JavaScript.

So how do you implement a date picker? As a custom JSF component, of course. Clicking on an arrow to the right of "July" updates the page with a new calendar for "August", containing an <h:commanLink> for each day of the month. It can handle a wide range of locales and can account for varied daylight savings time legislation throughout history. But if we ignore the chaos introduced by daylight savings time, is this ultimately the right solution from a distributed computing point of view? Wouldn't it be more efficient to page through calendars in the browser, and only submit data to the server when the user had actually picked a date?

Of course, a client-side date picker is more efficient at runtime; the reasons that ICEfaces took a server-side approach with this particular component were because, at the time, we didn't want to write the JavaScript and we wanted to experiment with a component as complex as a date picker.

As an alternative, the Snappy Calendar is a purely client-side date picker for ICEfaces. You will also find a Snappy Table that provides a client-side table with sorting and row selection. There are two particularly interesting things about these components: one, that they are client-side implementations; and two, that they are developed outside ICEfaces.org. Please try them out and provide your comments directly to the author or on the ICEfaces forums.

Technorati Tags:

Posted by ted.goddard at 5:02 PM in Entries by Ted Goddard

Thursday, 12 June 2008

ICEfaces at Jazoon


Jazoon 2008 will be starting shortly (June 23 - June 26), and you'll have several opportunities to learn about Ajax Push at the conference:

mimacom ag has a great deal of experience building enterprise applications, and is now a strategic ICEsoft partner. The beginning of this partnership can be seen in an interactive locking demo that we have put together for Jazoon. The essential idea is to build collaboration features through the mimacom edoras lock manager and ICEfaces Ajax Push. The demo allows multiple users to edit and lock records in a common data set. Besides being able to see changes to the data in real time they can also negotiate locks through chat and lock operations right within the application.

The locking demo will be featured in the Jazoon talk and at the mimacom exhibition stand (where you can learn how to apply edoras and ICEfaces to build a complete application). For GlassFish Community Day, I plan to demonstrate WebMC and possibly the new SIP telephony demo.

Posted by ted.goddard at 6:07 PM in Entries by Ted Goddard

Wednesday, 11 June 2008

Ajax Push and the Telephone


The telephone is an excellent source of asynchronous events — you never know when it is going to ring. This means that web-based views of the telephony space make for interesting applications of Ajax Push.

Using SailFin and ICEfaces we've put together a very simple call setup demo. It shows when your phone is online and allows you to initiate a call between any two phones just by selecting them and pressing "call".

To run the demo:

  1. Download a recent build of SailFin.
  2. Download the demo binary callsetup.sar.
  3. java -Xmx512m -jar sailfin-installer-v1-b36-darwin.jar
    cd sailfin
    ant -f setup.xml
    bin/asadmin start-domain domain1
    bin/asadmin start-database
    cp callsetup.sar domains/domain1/autodeploy/
    
  4. Point your SIP phone (such as X-Lite Demo) at a localhost Proxy.
  5. Point your browser at http://localhost:8080/CallSetup/registrations.iface

As phones connect and disconnect, the list in the registrations page will be dynamically updated, showing user presence.

The full source code is available at http://anonsvn.icefaces.org/repo/projects/CallSetup/

Technorati Tags:

Posted by ted.goddard at 4:43 PM in Entries by Ted Goddard

Monday, 2 June 2008

Ajax Push in Real Time?


One popular question on our road trip has been "How do I ensure that each Ajax Push is delivered to all clients at the same time?" (By the way, if you don't happen to be a resident of Vancouver, Montreal, or Toronto, you can still catch the talk as a one hour webinar on Monday, June 2, 2008. Be sure to check out the other ICEfaces webinars that same week. If the webinar isn't convenient, Jeanfrancois has a copy of the slides available.)

Of course, it's not actually necessary that the page updates arrive at each client at exactly the same time, just that they arrive within some short interval. In the past, I have objected to applying the term "real time" to Ajax Push on the web. Real time systems typically are used to control physical processes and often have tolerances of a few milliseconds (using Java for real time applications is challenging enough, let alone using Java over the internet). Web2.0 is not yet ready to run your car's antilock breaking system from a central server (I'm sure Web3.0 will easily handle this, though).

But when we define a real time system as one where success is determined not just by the results of the computation but also by having the response within a certain deadline; and further, that a soft real time system is simply considered to provide a lower quality of service when deadlines are missed, it becomes possible to consider Ajax Push from a soft real time perspective. (We have removed the expectations that system responsiveness must be within a few milliseconds, or be "instantaneous", and that the system must be used to control a "real" physical process; instead, we focus only on the timeliness guarantee.)

We can now measure the quality of an Ajax Push system in soft real time terms: assign a time interval based on the application (say, "all bid notifications should be received within 3 seconds of the bid"), and measure the proportion of page updates delivered within the time interval (the more updates that lie outside the interval, the lower the quality of the system). Then, we can work on producing a system capable of operating at the desired quality. The good thing is that the problem is easily parallelized -- each node in a cluster can independently determine the page updates for its sessions (database and network infrastructure may not be so easily parallelized).

In other words, to ensure that updates are delivered in a timely fashion (that is, to satisfy our soft real time requirement) it's important to exploit parallelism within the cluster and to measure the running time of the Ajax Push updates under realistic application conditions. Producing the page updates for each user takes an application-dependent amount of time; this must be measured for the application and hardware planned accordingly.

Technorati Tags:

Posted by ted.goddard at 2:35 PM in Entries by Ted Goddard

Tuesday, 20 May 2008

Ajax Push Across Canada


Jeanfrancois and I will be on the road next week (ok, we're mostly flying) to explain how to use Ajax Push and non-blocking I/O in Web2.0 applications. The sessions are free, but please register to reserve your spot and have a chance to win an iPod touch:

The new ICEfaces technology behind these talks lies in two areas: Grizzly auto-detection, and a new Ajax Push API (SessionRenderer). Grizzly auto-detection helps you know when a grizzly is around. It's important for safety reasons, but it also makes application deployment easier -- ICEfaces automatically takes advantage of the threading scalability provided by Glassfish (you no longer need to configure GrizzlyPushServlet yourself).

The SessionRenderer is important because it considerably simplifies the development of Ajax Push applications (we're looking for community feedback on this API -- by introducing it in the org.icefaces package we won't freeze it until ICEfaces 2.0). One feature is that sessions are rendered rather than views (in other words, all views in a session are rendered) considerably simplifying the bookkeeping required by the application. The other feature is that the groups of sessions are maintained by the SessionRenderer and automatically cleaned up as sessions expire. This allows the application to refer to the groups by name, again eliminating bookkeeping in the application.

Technorati Tags:

Posted by ted.goddard at 4:45 PM in Entries by Ted Goddard

Thursday, 24 April 2008

ICEfaces at JavaOne 2008


JavaOne 2008 is shaping up to be an excellent show. In particular, you should be sure to pre-register for Asynchronous Ajax for Revolutionary Web Applications on Wednesday at 9:30 AM. Jeanfrancois and I have distilled the key ideas behind Ajax Push/Comet so that you can understand the Asynchronous Web Revolution. We will even describe how the Resin API works (even better than the explanation we gave at AjaxWorld).

If you would like to have your copy of Ajax in Practice signed, stop by the JavaOne DigitalGuru on Tuesday at 2:30 PM. There's even a chance to win a reproduction of the nice hat the lady on the cover is wearing (ok, I'm joking about the hat, but I will be there to talk about Ajax and ICEfaces).

At the ICEfaces booth, we will have a full contingent of people ready to answer your questions about ICEfaces (from core framework to components) and to give you a chance to provide your comments and influence the project roadmap. It's always possible on the forums, of course, but often its easier to explain your ideas in person. Most importantly, you can pick up this year's ICEfaces T-shirt and enter our iPod Touch giveaway.

This year there are a number of interesting sessions relating to Ajax Push; here are a few that I've found (titles are abbreviated in some cases):

  • TS-5250: Asynchronous Ajax for Revolutionary Web Applications : Wed 9:30
  • TS-6482: Ajax and JavaServer™ Faces Technology: Wed 2:50
  • BOF-5661: Comet: The Rise of Interactive Web: Wed 6:30
  • BOF-4922: Using Google Web Tookit and Comet: Wed 7:30
  • BOF-6584: Using Comet to Create a Web Game: Wed 8:30
  • TS-5415: Java™ Servlet 3.0 API: Thu 10:50
  • BOF-5495: Untangling the Asynchronous Web: Thu 8:30
  • TS-4883: Java™ NIO Technology w/ Grizzly Framework: Fri 1:30

Technorati Tags:

Posted by ted.goddard at 6:45 PM in Entries by Ted Goddard

Wednesday, 23 April 2008

Ajax Pushed at fisl9.0


fisl9.0 turned out to be a far greater success than I could have imagined. With over 7000 participants and a few (beneficial) schedule changes, I had a chance to present with Alexandre Gomes (standing room only; be sure to check out his BOF on GWT at JavaOne), Francois Orsini and Gregg Spoar.

Here I am, showing WebMC on the iPhone. The trick to giving web-based demos on the iPhone (when the server is on your laptop and a WiFi network may or may not be available) is to enable connection sharing on your Mac (even if you don't have a connection to share). This works much better than creating an ad-hoc network from the Airport menu. You can even use multicast DNS names from the iPhone, such as "icefaces.local".

Technorati Tags:

Posted by ted.goddard at 6:07 PM in Entries by Ted Goddard

Monday, 7 April 2008

Ajax Push at fisl9.0


I'll be presenting a comprehensive overview of Ajax Push (aka Comet) at fisl9.0 next week. Asynchronous Ajax for Revolutionary Web Applications will cover a wide spectrum on the complete push stack. Java servers and development will be certainly be emphasized, but Jeanfrancois and I have included information that is of interest to more than just Java developers. The talk allows you to compare the development environments available for applications with Dojo, DWR, and ICEfaces and the server APIs available to frameworks on Tomcat, Jetty, and GlassFish.

I'm not sure it's time to coin Web3.0 yet, but the combination of incremental page update and push is really a fundamental, revolutionary change for the web because it changes the way that communication and collaboration can take place.



Technorati Tags:

Posted by ted.goddard at 3:12 PM in Entries by Ted Goddard

Tuesday, 1 April 2008

Ajax Calendar component with Spacetime extensions


ICEfaces 1.7 will contain a number of enhancements; in particular, we've greatly improved the Calendar component (or "selectInputDate") to full spacetime support. Currently, ice:selectInputDate allows you to choose a date in your current locale:

This has now been extended to full spacetime selection with ice:selectInputSpacetime (simply a four-dimensional generalization of one-dimensional time selection) with accommodations for special and general relativity (without singularities; support for singularities is considered to be relevant only to large-scale commercial deployments, such as those exceeding 20 solar masses, and requires a support contract ).

Ajax Push works well with this new component, since it has both input and output aspects; for instance, to choose the location of a meeting while it is being scheduled by the other participants. Future enhancements to the component will allow spacetime range selection in the form of arbitrary but convex, bounded regions.

Technorati Tags:

Posted by ted.goddard at 4:21 PM in Entries by Ted Goddard

Friday, 14 March 2008

Ajax with Seam or Spring Web Flow?


When you're writing an Ajax application in Java (particularly using JavaServer Faces or ICEfaces) you will quickly find that you need more powerful abstractions to deal with scopes and navigation.

Of course, for many Ajax applications, navigation will not be necessary at all because an Ajax interface can often be created as a single page, but if you have any sort of workflow in your application, you will need to look beyond what can be done with JSF navigation rules.

Consider the standard scopes provided in the Java Servlet model (request, session, and application). Which of these scopes is suitable for multiple browser windows or tabs opened in the application? Clearly it's not "application", because that spans activity for all users, and it can't be "session" because that spans all activity for a given user. It also can't be "request", because a request spans only a single user interaction (but it can be the ICEfaces "extended request scope" where request spans a full page refresh). This is where Seam and Spring Web Flow come in. These frameworks do a variety of things that can help improve the architecture of your application, but specifically, they both provide additional scopes that work well with Ajax. With Seam, we get "conversation" and "view" scope, and with Spring Web Flow we get "flash", "flow", and "conversation" scopes. (With JSF 2.0, we're looking at "view" and "component" scopes, so those will be excellent to have in the standard.)

Which framework and which scope should you use? I'll provide the details in a talk at TheServerSide JavaSymposium on March 28th in Las Vegas. By presenting how these two frameworks allow you to work with new scopes and how they are integrated with the ICEfaces Ajax framework, you can then decide which configuration is best for your application.

Technorati Tags:

Posted by ted.goddard at 6:53 PM in Entries by Ted Goddard

Tuesday, 4 March 2008

JavaWorld ICEfaces PodCast


I had a chance to talk with Andrew Glover in a PodCast on Ajax Development with ICEfaces. We cover a variety of topics, including the development practices with ICEfaces that allow you to focus on your application, not Ajax (and certainly not JavaScript), how Ajax Push is a revolutionary change for the web, and how component templating being considered for JSF 2.0 should make component development significantly easier than it is now .

Technorati Tags:

Posted by ted.goddard at 12:28 PM in Entries by Ted Goddard

ICEfaces and GlassFish at AjaxWorld


AjaxWorld is rapidly approaching (March 18, 2008 in New York) and there are a number of sessions dealing with Ajax Push, ICEfaces, and GlassFish that you should be sure to attend:


Technorati Tags:

Posted by ted.goddard at 11:59 AM in Entries by Ted Goddard

Friday, 1 February 2008

Ajax at JBossWorld


JBossWorld is rapidly approaching and there are a number of Ajax and Seam talks at the conference:

  • SEAM, AS, EJB3, Hibernate, AJAX4JSF, RichFaces and Facelets
  • Leveraging AJAX and Metadata for Ad Hoc Reporting
  • Seam & JBoss Developer Studio
  • Case Study: EJB3, Seam, JSF, and RichFaces on JBoss 4.2.0
  • JBoss Seam: Integrallis Software
  • Agile Development with SEAM
  • Introduction to JBoss Seam
  • Introduction to Web Beans
  • Advanced Asynchronous AJAX Applications

    I'll be speaking in the Advanced Asynchronous AJAX Applications. Using seam-gen as the starting point, we've produced a variant of the ICEfaces auction monitor that illustrates how Seam Page and Conversation scopes can be effectively used with Ajax Push. I'll also show how Drag and Drop can easily be used with Seam.

    The JBossWorld talk won't contain anything on Portal integration, but we've been working on a number of Portal-related features. One of the trickiest problems is coordinating the JavaScript as it is loaded from different Portlets. Until the Portlets actually encounter each other on the page, they don't know that they're all trying to use ICEfaces (and trying to use the single allowable Ajax Push connection). You will find this (and more) in the upcoming 1.7 release.

    Technorati Tags:

  • Posted by ted.goddard at 2:41 PM in Entries by Ted Goddard

    Thursday, 17 January 2008

    Ajax Mobility Reflections


    Mark has a number of interesting comments on using ICEfaces on mobile devices. One that particularly draws my attention is

    Pretty much every input component could be made to simplify its rendering, visually, while not actively being used to input data. This is something that really would not be possible without Ajax.

    To some extent, Ajax is not necessary for building a dynamically changing user interface. DHTML techniques alone are sufficient to build a page with controls that spring to full functionality when clicked on. However, when the page is complex, and the configuration of the controls is context sensitive (such as, don't show the user an address form when you have their address in the database) you can see that Ajax really is necessary.

    Of course, building a simple user interface isn't only a consideration for mobile devices. We're constantly faced with web sites that prompt for redundant information and are generally difficult to use. Just like the one button mouse forced the MacOS interface to be simplified (remember the three different scrolling behaviors applied by the three mouse buttons in xterm?), we'll see improvements to web pages generally as designers work to accommodate the iPhone.

    Technorati Tags:

    Posted by ted.goddard at 2:15 PM in Entries by Ted Goddard