PermaLinkA very cool application...08:42:54 AM
Written By : Scott Good

It's been a long time since I've posted here. Sorry about that. We have been extraordinarily busy lately. That's a good thing but it's only just now that I have, however temporarily, been able to get my head back above water.

Henry and I have been particularly busy with the rebuild of an on-line insurance quoting and management system. The story is terrific but I'm not sure I can talk about it right now.

Technically speaking, the project is even more interesting.

TableDuplicatorExample.gifInsurance rating, if you haven't spent much time with it, is surprisingly complicated. Take an Auto policy, for example. It's not always so simple as just you and a car. Families have multiple cars and multiple drivers. The rate you pay is influenced by all kinds of things including the driving records of all the folks on your policy, their ages, which cars they drive and a laundry list of other factors.

Trying to collect all this data--from many sources--into a single easy-to-use interface that is fast and attractive is really quite a challenge. We have come up with what we think is a great solution (wish I could show it to you right now) that uses all kinds of web development tools: HTML, Javascript, DHTML, AJAX, XML, Domino Agents...you name it, it's probably in there but the cool thing is it's all pretty transparent to the user.

Along the way, and based on a great suggestion from the lead developer at our client, we came up with a very interesting technique for building web applications that involve multiple sets of the same data. You know, like mutiple drivers, or vehicles, or buildings.

The challenge is in maintaining all the data-collection fields. Let's say you're collecting information about buildings. You need fields for address (street, city, state, zip), phone numbers, age, construction, and the like, but there are probably a lot of other things you'll want to know. For instance, the name, address, and contact information for the management company if there is one. Is it owned or leased? Single occupant or multiple? Is it heated? Do you store flammable or explosive materials there?

You get the idea.

There are a lot of questions that can be asked about any one building. But then, if you're talking about multiple buildings (think farm or manufacturing facility), you have to ask all those questions for each structure. This is nothing we haven't all built a hundred times before, and there are a number of solutions. The problem isn't so much building the table or whatever it is you're collecting all the information in, the problem is in maintaining it.

Let's say you need to be able to collect data on, oh, 20 structures. In a table, that means 21 columns (one for labels, 20 for data on each of the 20 structures). If you have 30 fields you need to maintain for each structure you have a total of 600 fields in your table. Not ideal, but not the end of the world, either. The problem comes in when you have to make changes to the fields, or to add new fields to the table. Any change you make has to be made 20 times. After a while, even small changes add up in terms of time and effort.

So, what if you didn't have to make every change twenty times? What if you only had to make it once? That was the idea we had (and solved).

We figured out a way you can, in a situation like I've just described, make a table in the Domino Designer which has just two columns (one for labels, one for fields) and the thirty rows of data, and to have that table automatically--programmatically--duplicated the 20 or however many times you need it to be, on-the-fly as your document is being loaded.

Let me say that again simpler:

You build a little table with one full set of fields; the code duplicates those fields over and over again as many times as your application requires. Tell it 8 and it makes 8. Tell it 20, it makes 20, with no more changes to the application than adjusting one variable.

It's really pretty cool. And, surprisingly fast.

You can see an example with three columns in the image at the top of this blog entry or, better yet, here's a simple example of it you can play around with. What you initially see is a typical form with three data columns. Notice, though, that simply by changing the number in the &cols= parameter of the URL you can change it to more or less whatever size you want. And, while there is some delay with larger numbers, even 50 columns comes up pretty quickly.

If you look at the underlying HTML you'll see there's not much there. It's just a two-column table that looks like this:

Just this one simple table can be manipulated with code to make as many separate columns as you need.

Before actually building this application (the real one, not the little demo here), we did some benchmark testing. We built a table with 10 columns and 100 rows. We filled the cells with fields, 1000 in all. Then we built some code that would build an identical table with identically-named fields except it would do it on the fly during the onLoad event of the form. We added some code to both forms to measure the time it took each to load. And, guess what? The dynamic form was significantly faster.

As you may imagine, there's more to all of this than I'm suggesting here. You have to load and unload data, for instance, which is not entirely trivial. But with some clever coding (thank you, Henry) it is quite do-able and, best of all, it makes day-to-day maintenance of the table quite simple. Instead of making changes on each of six or 20 or 50 columns, you make the change once and it automatically proprogates itself however many times.

With a little luck, I'll be able to show this to you at Lotusphere this year, and to go into more detail about the inner workings and benefits. In the meantime, I'll try to get back here again a little sooner and re-invigorate my blog. See you soon!

Comments :v

1. Rich Waters10/12/2006 09:43:14 AM
Homepage: http://www.rich-waters.com/blog/


There's a problem with the code in firefox, there's an error when trying to get a handle on the table:

var wt=tpd.getElementsByTagName("table")(0)

If you change this line to use [0] instead of (0) to reference the first element it appears to work.




2. Newbs10/25/2006 06:21:59 PM
Homepage: http://www.henrynewberry.com


Doh,

Thanks Rich,

I've been trying to figure that one out...

Newbs




3. Scott Good10/26/2006 08:30:28 AM
Homepage: http://www.scottgood.com


Rich,

Thanks for the fix...and Henry, thanks for making it in my example.

Scott




4. Ian Randall12/21/2006 10:11:20 PM


I tested it with 999 columns, it took a little time, but it worked.

I am impressed.




5. Erwin11/24/2009 05:48:37 AM


Looks promising, but is the code public?




6. Scott Good11/24/2009 07:22:24 AM
Homepage: http://www.scottgood.com


Sure. There's a link to code in the article.




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