logo

Why Ajax?

This, to most of you, will be one of those no-brainers that won't need explaining. But, as I said on Tuesday, it's my mission to convince you all of how useful Ajax is. So, I need to try and sell it. I like to think I know my readers (although I've not been so sure lately) and that not all of you know everything already. Lots of people need to see what a tool can do for them before they take the effort to learn how to use said tool.

The web is a static kind of place. You ask for a web page. It gets sent to the browser and that's that. If you want any more information from the server you have to send off another request for it. For a user this can become irksome if they have to submit and wait for a form each time the data in the page needs refreshing.

With Ajax we can make the web more dynamic. Based on user input we can fetch fresh data and update the page without the user's knowledge.

The real reason why is like this: This kind of behaviour will fast become the de-facto. Users will soon cotton on to what is possible and start to expect amazing things of you and your applications. Telling them "You can't really do that" will become less and less acceptable. If you don't want to be left behind you need to stay ahead. Learning to embrace technologies like Ajax will definitely help.

Convinced?

As with most things the clincher is in seeing samples of what can be done. You've probably already seen the amazing things Google have been doing, so here's are some more sites using Ajax. A good example is the Live Search at Ripped Tickets. Use the form at the bottom of that page to search for something like "The Felsons". See how the "view" of bands is built as you type. How can you fail to be impressed? Just think how impressed your boss/client would be with something like that!

Let's look at some examples closer to home:

  • Julian Robichaux was first off the blocks with a Google Suggest-esque Domino Directory lookup called Notes Suggest. Something you can pretty much put to use straight out of its box.
  • Julians' incredibly useful LDDMonkey script also uses Ajax.
  • Bob Obringer is working on the "Ultimate Domino View Navigator".
  • I've got a work-in-progress that prevents save "conflicts" in a document. Similar to my original demo but now cross-browser.

What will my contributions be? Mainly form-based stuff I expect. Starting with some simple things like an update to my first ever Notes community contribution and half the reason codestore got started. I've got plenty of ideas for using Ajax to improve Domino forms. Maybe we can make them as spiffy as The Form Assembly's.

Comments

  1. This stuff is going to be fun, isn't it? When the lightbulb went off about Ajax, I thought there must be just an infinite number of ways we could use this as Domino developers, and I think we're off to a good start.

    I hadn't thought about the save conflict thing, but thats a great idea. I previously had a document locking solution that had too many moving parts. This relied on a hidden iframe that automatically created, saved and updated (every 30 seconds) an additional "locking" document. When someone else opened the document, it would realize the document was already being edited. The user would be notified that the document was locked, who had it locked, and only open it in read mode. Lots of moving parts here though... a new form, a new view, a new subform, custom modifications to each form that implemented it, extra documents created that were only used to indicate a document was locked, and a view to clean up old locking documents. Makes my head spin.

    Ajax would be much cleaner but this would require an XMLHTTP "PUT" which I don't know how we would handle in Domino. Any ideas? Your "conflict" idea might be be the best solution here.

  2. Slightly off track here - but how far ahead was Lotus/Iris thinking when they added readviewentries and readviewdesign xml views to domino.

    I mean wasn't that a good 5 years plus ago.

    I built a dynamic view "widget" about 4 years ago - worked a treat - could have as many as you wanted on a page etc etc - all because you could specify a viewname and readviewdesign would give you the view design info and readviewentries would give you the data.

    And I still see java view applets being used - why why why! (I expect this was the reason for the readviewdesign etc being created in the first place)

    I love it all!

  3. Funny, I used to do a lot of Domino developpement several years ago (on R5) and I remember visiting codestore.net regularly... Anyway, thanks for mentioning the Form Assembly.

    • avatar
    • Jake Howlett
    • Thu 28 Apr 2005 10:21

    Small world Cedric.

    Your Domino know-how will come in handy when I start to hassle you about its use with Form Assembly. Muhahaha

  4. It's a bit rusty, but no problem. I'll be glad to help.

  5. Can't wait to see where you go with this one, Jake. If nothing else, some good Ajax "design patterns" for Domino would be helpful.

    Also, I know your buddy Mike Golding was making some improvements to the Notes Suggest code a while back. Next time you talk to him, you might want to ask him about it. I'd be really curious to see what he ended up doing (making it better, I'm sure -- he's much better about CSS layouts and proper HTML and all that than I am).

    And of course, thanks for the links!

    - Julian

  6. Some 5 years ago I played a bit around with LiveConnect and the pinpoint applet. (Connect to Java backend using CORBA). I think this is also very powerful but I never saw any serious application that was using this technique. I didn't use it in the end because my app did not needed to have a web frontend and because the DIIOP task at the server was unstable in Domino 5.0.x

    • avatar
    • Jake Howlett
    • Fri 29 Apr 2005 04:47

    Hmm, the pressure's on now Julian. Don't expect too much of me.

    Mike's a busy man. Last time I spoke to him I got the impression he was in aperture priority mode. If you know what I mean. Although I noticed he blogged yesterday on Notestips - about MySQL though. Here's hoping he returns soon. In the mean time we have Bob "the new Mike Golding" Obringer.

  7. Hmm. So we have Ajax in Domino since ND6 and no one really knows. If you want to see how it works, just point your Domino Designer at webadmin.ntf. In ND7, the Ajax engine has been separated from the webadmin application. The engine has been dubbed "DFC" (Domino Foundation Classes) by the developer and is in use in various of his customer projects.

    While webadmin in ND6 is still kind of static (point in case: it reads the full domino server directory once you select the Files tab), in ND7 it will load everything on demand. DFC is working by sending XML from the browser to the server and JavaScript from the server to the browser.

    So much for the good news.

  8. - Like mt69clp, I too made a LiveConnect applet to get data via DIIOP (has it been five years already?), but also found it to be too unstable. Looks like AJAX could fill that niche.

    - I've seen no articles (so far, just starting) regarding using AJAX to implement Notes client buttons with Java on the back-end. I'm playing with that now, just 'cause I can. (wink) May be better to just do this piece in a browser, but the user will already have the Notes Client opened, so I'm trying it there. (shrug)

    P.S. On Dec 15, 2005, the links to sample AJAX sites do not work. It appears as if they are no longer online.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment:


About This Page

Written by Jake Howlett on Thu 28 Apr 2005

Share This Page

# ( ) '

Comments

The most recent comments added:

Skip to the comments or add your own.

You can subscribe to an individual RSS feed of comments on this entry.

Let's Get Social


About This Website

CodeStore is all about web development. Concentrating on Lotus Domino, ASP.NET, Flex, SharePoint and all things internet.

Your host is Jake Howlett who runs his own web development company called Rockall Design and is always on the lookout for new and interesting work to do.

You can find me on Twitter and on Linked In.

Read more about this site »

More Content