Mike Levin SEO

Future-proof your technology-skills with Linux, Python, vim & git... and me!

OpenRico and Prototype

by Mike Levin SEO & Datamaster, 07/09/2005

As I research this Ajax stuff, I am beginning to question whether my planned move to Ruby on Rails is really worth it, or whether I couldn’t just more rapidly incorporate Ajax capabilities into my existing joyful VBScript-based rapid app-dev framework. Perhaps I’ll do them both, expanding my existing system, incorporating one of the toolsets to provide maximum bang-for-the-buck, and make Ruby on Rails a less urgent, parallel development effort. I already bought the Pick Axe 2 Ruby book. Ruby sure sounds like the bridge I was looking for from my Microsoft-dependent scripting world to both the open source object and oriented worlds. But every time I sit down with my own framework, I am newly impressed by how much I get for so little, and how easy it is for me to evolve the overall system. The question is how hard it will be to get back to that point with ROR? Anyway, that’s the subject for future articles. This entry has to do with my latest Ajax investigations.

One of the interesting articles I read was by Peter A. Bromberg, Ph. D. His point was that Ajax was nothing new, and is just a catchy term that gave an old technique new popularity. Indeed, I was interested in this stuff years ago, and adopted and adapted JSRS to my GS. JSRS stands for JavaScript Remote Scripting, and was essentially the same thing as Ajax, but with iframes instead of XMLHttpRequest (look at the JSRS file). He points out how the popularly used XMLHttpRequest method is a feature of the Microsoft XML parser, long built into MSIE, and how the only thing special now is that the other browsers are supporting it. But as a developer who tried to make this technology fly in those early days, I can say that the popular support that was forced by Google mainstreaming the concepts made all the difference. We no longer have to write our own JavaScript libraries and struggle with browser dependency issues and the tiny scraps of documentation that existed. Google has bullied the browser-writing community to at least support the lowest common denominator of support that will allow the open source people to write the libraries, and the developers to code apps more quickly. It needs to feel like simple, event-driven programming, with abundant documentation. So, reading Peter’s article is like listening to someone put down Henry Ford for the Model-T, because people had already been building cars. What he failed to see was that Google, and the now famous article by Jesse James Garrett of Adaptive Path, provided the tipping point. Ajax is no less significant because people had been doing it before. Now, developers like me can pursue a wide selection of implementations.

In my research, I discovered that one of the best open source implementations of Ajax is OpenRico. Thanks to Steve Elsner once again for pointing out important technologies to me. As I looked into the OpenRico and the remarkable demos, I discovered that they based their components on something called Prototype, an object oriented JavaScript library, and the same thing that Ruby on Rails relies on for it’s Ajax support. Lo and behold, I discovered a possible path to incorporating Ajax support into my existing generalized system!

The particular noteworthy demos are a Live Grid demo, which virtually eliminates the need for data paging with a scrolling solution that avoids loading the overwhelmingly large datasets that made scrolling solutions not feasible in the past. The argument for this approach is discussed in an article Death to Paging!, and they almost have me convinced. When you combine this live scrolling datagrid with their innerHtml demo (which I’ve called the preview pane or show-detail window), you have the makings of the fourth generation of my generalized system, which I documented here years ago. My mentor at the time was guiding me in this direction, and I see now how ahead of our time we were. It’s possible to build a browser-independent web-based application that performs as well as local custom compiled code, or whatever you want to call it. Think of the Web-based email vs. Microsoft Outlook. Web-based email was always characterized by compromises and lesser performance than it’s email-client counterparts. GMail started to change that in the smallest way. But you can feel from reading all the Ajax articles that a revolution is on the way. The concept of the browser as being an alternative and competitive computing platform to the underlying computer/OS/API’s is back. This was the allure of Netscape before MSIE became part of the operating system, and a better browser to boot. This was the allure of Java, before the average Web developer realized it was for the programming elite. And now, it is the promise of a standardized web browser document object model (DOM), Ajax libraries, and the server-side programming language of your choice.

OK, so where does that leave me now? I am going to prototype something like my plan in both Ruby on Rails and in my current GS3. I’m going to stick with the unglamorous naming convention of GS3 and GS4 for now, until I’m ready to popularize my work. I’ve got some kick-ass naming ideas. I’ve learned the lesson of Remote Scripting vs. Ajax! Anyway, I’m getting ready to learn about OpenRico and prototype.js.

Why is Sabre Supporting Rico as OpenSource?