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.
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.
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!
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.
Small world Cedric.
Your Domino know-how will come in handy when I start to hassle you about its use with Form Assembly. Muhahaha
It's a bit rusty, but no problem. I'll be glad to help.
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
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
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.
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.
- 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.