PermaLinkAJAX for views?07:06:47 AM
Written By : Scott Good

Ever since I first saw AJAX and, for that matter, DHTML, I've wondered if there wasn't a way to improve the way Notes views work from AJAXViews.jpg the web by combining those two technologies. Well, I've just finished the seventh installment of my Lotus Advisor series on AJAX and that was the Challenge of the Month.

Well, as they say in the South of France, voilą y'all. Click on the image to the right (or here) and try it for yourself.

Is it ready for prime time? Probably not, but it's pretty close. Works great in IE and Firefox. Was working great in Opera until my last tweak, so either I have a caching issue or I need to spend another half hour soon and figure out what dumb thing I introduced.

But there are some cool things going on here. When you first load the page, notice that it puts only part of the top-level categories on the page, then pauses, then finishes out. That's actually by design: Since it really has no way of knowing how many entries are in the view, it makes the initial AJAX call without an &count= parameter...in other words, it only gets back whatever the server's default number-of-lines-to-return settings specify (ours is set to the default 30 lines).

That's a relatively small number of nodes, so it's quick, and quick is good.

Once that first set comes back, it reads the XML to find out how many more lines are out there and, after getting something up on the screen, goes back out and gets all the others. While, technically, it would be faster to get them all in one fell-swoop (if the list is small enough to do so), it feels faster to the user this way because (s)he doesn't have to wait for everything to be back before seeing something happening on the screen.

When you click on a twistie, there's another AJAX call (or two) that goes out and retrieves the next-level items right then. It is, if you will, a Just-In-Time inventory of view rows. Again, you get 30 (or your default number) on the first call and any extras (if there are more) on a follow-up call. This gets you around the hack of just picking a big number to return (&count=1000) and taking the performance hit waiting for all that XML to be returned.

Now, obviously, this won't work on a view with thousands of top-level categories. I'll need to introduce a paging scheme at some point for that. And, it really needs some kind of function available so you can get back to it from a document with things still expanded the way you left them.

I haven't tried response documents yet. Might work with them...might need some tweaking. Jury's still out on that.

So, there's still some work to be done.

But on the whole, I'm really happy with what it's doing here. It solves most of the traditional problems with Notes web views: It's pretty fast; it doesn't require you to reload the entire page every time you click on something; it lets you have many different twisties open at the same time (as does the Notes client); etc.

It's also nice, if I may say so, because it is not hard-coded to a particular number of levels in the view hierarchy: It reads what's there and builds it out, which means it should be relatively easy to adapt to other views.

Look for full details in whatever issue they're giving out at Lotusphere 2007. February 2007, I imagine.

Comments :v

1. Joel M. Phelan12/04/2006 10:58:18 AM
Homepage: http://www.steinmart.com


Just wanted to pass along that in FF 2.0, I'm seeing an empty div if I click on the link. If I right-click and open in a new tab, I the div is populated at first, but none of the links are active. Reloading the page in this tab renders it blank also.




2. Chris Whisonant12/11/2006 08:42:27 AM
Homepage: http://cwhisonant.blogspot.com


Good post! Now to make it not look like a Notes view...

I've been meaning to tell you that I'm working with your brother Brian on getting a Notes User Group going here in Charlotte. So does Notes just run in your blood?




3. Scott Good12/11/2006 10:01:18 AM
Homepage: http://www.scottgood.com


I guess it does run in our blood. Actually, as you probably already know, Brian ran our Cincinnati office for many years before heading your way. In fact, he's still an important resource for us.

Glad to hear you're starting a users' group down there. I can tell you the one here (CONDUG) and the one in Cincinnati (NUTS) have been pretty successful. FWIW we've found the meetings that draw the most interest have to do with application development. If you fill a meeting with content on Administration, our experience says you can work with a lot smaller room.




4. Chris Whisonant12/13/2006 03:08:50 PM
Homepage: http://cwhisonant.blogspot.com


Thanks for the tips Scott. Brian has offered to do some dev stuff if needed. I think that would be a good idea as well. We were hoping to go live in November, but that didn't quite pan out. I'm thinking maybe March now since Lotusphere is in January.




5. Sean Burgess12/19/2006 11:33:24 AM
Homepage: http://www.phigsaidwhat.com/


We have been implementing a DHTML view methodology at my company and it works much better than the standard Domino stuff. The largest problem we have is with the response document hierarchy. Does your method handle that nicely?

Sean---




6. Scott Good12/19/2006 01:11:49 PM
Homepage: http://www.scottgood.com


Hi Sean,

If it does, it's by accident. I've been hoping to get back to this before long and figure out what I need to do both to handle response hierarchies and paging of the views...maybe next week when things are quiet...

Scott




Enter Comments^


Email addresses provided are not made available on this site.





You can use UUB Code in your posts.

[b]bold[/b]  [i]italic[/i]  [u]underline[/u]  [s]strikethrough[/s]

URL's will be automatically converted to Links


:-) :cry: :-\ :huh: ;-) :cool: :grin: :emb: :laugh: :-p :lips: :-( :rolleyes: :-o :-D :angry: :-x
bold italic underline Strikethrough





Remember me    

Disclaimer & Copyright
Monthly Archive
Contact me...
Racing sponsors and such...

Thank you sponsors!

GABlogLogo.jpg

GOODAero

GOODAero specializes in building aerodynamic products for racing cars. Our first product, the GOODAero Raptor wing is available at a surprisingly reasonable price (under a grand) for a full carbon, full-sized, racing wing. Check it out.


Infinite Fiberworks Co, a great source for high-quality Porsche fiberglass parts

Infinite Fiberworks Co.

If you are looking for fiberglass for Porsches, IFC is the place to go. I have used parts from most of the major suppliers and IFC's are easily the highest quality and the most reasonably-priced. Contact Mike at Infinite Fiberworks for more information.

Located in Racine, OH (so far Southeast they're almost in West Virginia), IFC's goal is to be The Best. Give 'em a try.


Bent or ugly wheels? Call Wheel Medic!

Wheel Medic & The Round House

Whether you need to repair, repaint, refinish or just replace your wheels, the guys at Wheel Medic/Round House can get you back on the road in no time!

Wheel Medic, Inc is a family-owned company which specializes in the repair and restoration of aluminum wheels.

The Round House was founded to service Wheel Medic's clients looking for more than just repair work...from custom wheel colors to high-end wheel applications and body kits, the Round House is there to serve the discriminating automotive enthusiast.


Used Porsche parts, great prices!

A Part Above

Looking for used parts for 944s, 924s, 968s or other late-model water-cooled Porsches? Contact John at A Part Above.

Located in Strongsville, OH (20 miles south of Cleveland) their goal is to provide top quality parts and services. I can tell you, John is great to work with and the prices? Very hard to beat.


SMRT Motorsports wants you!

SMRT (that's short for Skid Mark Racing Team), a very-

loosely organized band of fun-loving friends who enjoy auto racing (heck, cars in general), and the occasional adult beverage, wants you to be a part of our team.

Go here to find cool T-shirts, sweatshirts, caps and mugs with the SMRT team logo.

The BlogRoll
Lotus Domino ND6 RSS News Feed RSS Comments Feed Geo URL RSS Validator Blog Admin Lotus Geek Open Notes Picture Database OpenNTF BlogSphere
Calendar
February 2012
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
By Category
What I do for a living


I am the President of Teamwork Solutions a long-time Lotus, now IBM, Premier Partner.

With offices in Columbus and Cincinnati, Ohio, we specialize in custom application development for IBM Lotus Notes, Domino, and related technologies. Our software product, ProcessIt! (see below), is quite possibly the world's best, most powerful and easiest-to-use workflow tool for Notes and the web.

Our clients are some of the world's largest corporations along with others that aren't so big.

We do excellent work, quickly, and often on a fixed-fee basis. We'd love to talk to you about your next project.




I am a Contributing Author to Lotus Advisor Magazine, with more than 40 articles under my belt.

I've written how-to series (serieses?) on LotusScript, JavaScript, Cascading Style Sheets (CSS), and now, AJAX (Asynchronous JavaScript and XML), as well as a bit on miscellaneous web development topics.


TheView.jpg

I also write for The View as of the July/August issue where I showed how to take an ugly Notes applications and make it beautiful with just a few minutes' (careful) work.



I am the chief architect and one of two primary developers for what many consider the best all-around workflow tool for Notes/Domino, anywhere, regardless of price.

It's called ProcessIt!, and you can read all about it at www.notesworkflow.com but the bottom line is this: ProcessIt! is fast and easy to learn, extremely powerful, and can be used by mortals. Even--dare I say it?--common users.

You can spend a lot more on a workflow tool but you won't be able to do a lot more for all the extra money.

Don't believe me? Download and try it for free for 60 days.



GTSLogoSm.gif
Copyright Porsche and NASA...not me!

I race a Porsche 944 S2 in National Auto Sport Assocation events and am the 2008 National Champion in NASA's GTS2 class.

Blame this event, a few years ago, for starting that particular money drain all over again.

In support of my habit, I am the NASA Great Lakes Region's GTS (German Touring Series) Director.

I'm also a Nationally-Certified Instructor for the Porsche Club of America and am in charge of classroom sessions for the Mid-Ohio region when we are doing high performance driving events.

In a prior racing life, I was the Midwestern Regional Formula Atlantic Champion and, in 1991, the Ohio Vally Region of SCCA's Regional Driver of the Year (but that, alas, went away when my credit cards let go of the rope!).




I'm writing a book...or at least trying to.

It's murder mystery in which, not too surprisingly, the main character runs a small software company and races cars for fun. Oh yeah, and lives near where I do.

Just where do they come up with these crazy ideas?

Facebook