Friday, August 18, 2006

Speaking of huge libraries ...

... is there any interest out there in a general-purpose JS/Ajax library specifically for Domino?

I've seen adaptations of Prototype, Sarissa, Scriptaculous (and even Rico, which is a lovely library but wants everything in its own format) and so on, but would there be a market for a library of components that grok Domino? One that would not force you to write responses that conform to a library designed for other platforms? One that would include not only JS functions that already know about ?ReadViewEntries, categorized views and response documents, but design elements that can make up for the difference between server time and workstation time, that can prevent save conflicts, and so on? One that lets you dynamically refresh fields using, oh, let's say @DbLookup syntax in JavaScript?

If there is any interest, what features would you like to see? Be wild and scary if necessary. There's no law that says I have to include everything everybody could ever want. And I've already got a few tricks up my sleeve that may be as wild and/or scary as what you have in mind. I haven't quite rewritten the Formula Language engine in JavaScript yet, but I have borrowed a few of the more useful list-processing bits, along with their familiar-to-us syntax.

It is my intention to release such a library into the wild. The library itself will be free to use anywhere, both as in speech and as in beer. Thanks to View->Source and browser extensions, there's no good way around that. Even if the code is obfuscated (and it is, has been, and will continue to be, for compactness' sake), a determined developer can copy it and find a way to use it. The API documentation, though, I can charge for, so I will. Or, rather, somebody will.

The documentation will include the clear, unobfuscated code with comments. While the clear code would be entirely impractical as a user download (it is not a little file, or even a bunch of little files), forcing an interested developer to figure out which bits do what in the obfuscated code alone is not going to result in better code or in a better developer. Properly done, this might make a good addition to a certain training materials package, since the doco is as much about "why" as "what".

You see, I'd like to see this, or something not unlike it, become a standard part of the Domino developer's toolkit. While I would like to see every developer equipped with the knowledge and skills to do all of the work themselves, it just doesn't make sense that each of us needs to reinvent the wheel with every new application. Okay, the truth is that I was tired of reinventing wheels by the third go-around. So I've taken the bits and pieces of what I've been doing over the last year or so, located the reusable bits (and refactored to include them where they'd been redone), and come up with something I think is worth sharing. But I know that I've only included features that I needed at the time, and that there have to be things you might think are commonplace that have never occurred to me.

So if you can think of anything you'd like to see, anything that can help you elevate a garden-variety web-enabled database to a holy-crap-gotta-have-it application with minimum effort, let me know. Your suggestion may be what makes the whole thing worthwhile.


Anonymous said...

Great idea there. I have been trying to come out with useful libraries for web applications replying on Prototype but always don't have the time as I don't have much chance to work on web apps in LN.

Just an idea for you, it will be great to have a script that can render a normal Notes view into neatly displayed views on web, supporting unlimited no. of categories, and ideally a variety of possible display styles.

Ben Dubuc said...

I've been looking at a few AJAX toolkits lately (Dojo, Backbase, even Atlas) and there is a few additional things I'd like to see in that Domino AJAX library...

A thing like the Microsft Atlas UpdatePanel could be neat. It gives the possibility to refresh only a part of the form you see without reloading everything on the form.

Standard NAB picker and dialog list icker would be nice too: update multiple fields when a value is selected in the dialog box (select something like a name and the dept, phone number and other fields get updated as well).

View column sorting : always good to have in JS instead of creating huge Notes indexes.

Generic form validation tool for forms: mandatory fields could be configured in an external document along with some validation rules.

Can't think of more right now, but I will probably get more ideas along the way. So I'll be back!

BTW, great idea and I'm sure that if you post the same topic in the LDD forums, you'll get a lot of suggestions.

How's the move to your new place coming along?

Take care,

Jack Ratcliff said...

Great idea. That's been my goal with the Domino Web Tools project from the beginning. I haven't done much work on that project in about a year due to being in the .Net world on some projects at work. Things look to be changing soon, however, and I plan on updating this project soon as a result.

It's a lot of work to do something like this. And even though I would like for it to be all free, I envision that what I end up with will have two versions. A free version and a more advanced paid version. Perhaps we can work together on something like this? Heck, if it's good enough, perhaps we can sell it to IBM? :)

Karen said...

Off topic, but another "speaking of...": it'd be nice to have a feed for your blog, Stan.

Stan Rogers said...

Sorry, Karen. The feeds (Atom and RSS) have been available for a while, but the links seem to have gone AWOL. I've re-added the links.

Thanks for the ideas so far, folks.

Jack, I'm not sure how far a commercial variant of the code would go. Thanks to View->Source (and Web Developer toolbars), just about anybody can get just about anything JS for free. But it CAN be tremendously abstruse without the doco, can't it? I should probably state up front that I am not fundamentally opposed to selling things to large corporations when the opportunity presents itself.

Let me get an initial version ready to go, and we can take a look at compatibilities.

"qqmgije"? That's a funny name....

karen said...

Great. Thanks. You've been Netvibed.

Egor Margineanu said...

Great idea. I'm also thinking about such kind of toolkit. My interest is creating a bunch of JS functions simmilar to @-formula UI functions. Is not a complex task, but it needs time. But as everyone know, time is money.