One More Move, and the Monkey Gets It!

I've been having more fun than a person should have over the past few months with Web 2.0, and you’re going to get a kick out of what I've been doing. Especially since it involves the impending death of a beloved Web mascot.

First I must confess that I'm a slime-sucking weasel. No, not the kind you meet in your lawyer's office. The kind that invents things and protects them with IP law. Some of the material I'm going to cover I have protected. If you have any questions, feel free to email me. I thought about being a better person and giving away everything I have, but I lost my last billion dollars at poker and strippers, so this time around I'm being more careful.

Did you know that you can't access domain other than the one you're in when you're coding web pages? I once read that somewhere, but I promptly forgot it until I ran into it a few months ago. You see little mash-ups like the Google maps, flicker add-ins, TTLB rating tags, and you think: hey! I must be able to add any number of programs into my page and they will all work together.

Well. Not quite.

The reason these add-ins work is that they are external JavaScript loaded when the page loads. When they arrive (by bringing in Javascript from another server), the foreign server knows who is asking to load the code -- your domain and path. So it tells you general stuff about your page -- number of hits, location of people browsing, your link-ranking, etc. That’s how most of the mash-ups you see work.

It's not like you can drag your mouse around your google map and have your weather trinket automatically tell you the weather in the spot that you’re clicking. The little widgets don't know what else is on the page, and they can't talk to each other. They're like little paintings you buy and hang on your web site. They are not interactive like the components you are used to in other situations. So what about those live chat mash-ups? Yes, it is possible to use frames and do some stuff that appears more interactive. That’s because frames are like little web pages running inside your outer page. They aren’t really part of it like the other elements, and most browsers prevent the frame fro talking to the page and vice-versa. It’s all a big head-fake.

Back in December I wanted to create a toolbox for web pages, specifically blogs. I had in mind a little button beside each blog entry that you click. Up pops a toolbox and the program can analyze your blog entry (or comment) and then do neat stuff.  You can find other articles on the web like the one you’re reading, do some text analysis on the article or comment, let the users rate the content on the site, maybe even have tools where the users could customize the look and feel of the site to fit their needs. I thought about this because I was unhappy with the current crop of user feedback systems, like on Digg or Slashdot. I wanted something that was more exact – I could care less if the article was popular, maybe I just wanted to read funny articles today. Or maybe I wanted to read stuff that was funny and kind of interesting too. I also thought it was stupid that such systems only worked on one site. What if I wanted rating information for a thousand articles on a hundred sites? What was the point of a user content analysis system if it only promoted material from one site? That didn’t help the reader much.

I also reasoned that once I had a more exact rating system, I could apply the power of large numbers of people and democracy to the “what do I want to read” game. So I basically wanted to take user-analysis of web content to the next level, not just thumbs, smiley-faces, tags, or voting buttons. From a technical standpoint, that meant either writing one program that could run everywhere; on all blogs and all domains at the same time, or writing one program and selling a billion copies to everybody and their brother.

Luckily for me, I wanted to do this the hard way. I wanted one program for everybody. Plus I wanted to give it away for free. I also wanted a date with Pam Anderson. So far this year I’m hitting two out of three. Hi Pam! Remember not to call me at the office.

I quickly found out (or remembered) that you can’t get from here to there. The bastion of AJAX and Web 2.0 interactivity, the XMLHttpRequest, does not allow getting information from a site that is not your own. I covered this in a recent article. Some people make these little trinkets or paintings to add to sites, and some people make these gizmos you can install on your server to have your site do stuff, but nobody makes one single program that runs on a bunch of servers and browsers all at the same time. Nobody makes a component system that allows each component to talk to other components on the page. Nobody makes something that doesn’t have particular server or browser requirements. Something that requires no installation. One master program that resides on web pages all over the internet.

Not yet, anyway. That’s where I come into the story.

Yes, I figured out how to do all of this after spending some time banging my head against the wall. Seemed like there were three major architectural problems to overcome: transferring data over the internet across different arbitrary servers, having a data-driven way of manipulating the HTML DOM, and dynamically creating HTML components that run correctly on multiple browsers.

After a lot of work, I got these problems mostly solved. When I finished I had a nifty little toolbox for blogs. Really for any structured HTML content. The first widget I wrote for it allows people vote on articles and a few other things. The second widget I wrote for it was a sidebar that showed people the best blog articles on that particular blog, and the best blog articles on all of the blogs using the system.

What’s the next widget? Well, with the world’s first true master internet program, XJAX, and a pluggable component system, I’m thinking the world is my oyster. I’ve invented something I call web-to-web collaboration. Maybe next I’ll write a chat program, only where the chat text becomes part of the comment system. Or I could integrate into coComment. Or I could hook into a number of tagging services. When you’re reading one blog about Madonna, wouldn’t it be cool to have a chat program that dynamically connects all of the current blog articles and comments about Madonna, where you could see who was online and send messages back and forth with each other? Remember, there’s nothing for the reader or content provider to do to make this work except adding one line of JavaScript in their HTML to bootstrap my program. The content provider simply checks a box on a screen somewhere saying he wants this functionality and BAM, he’s got it.

Since my widgets know both about the other widgets and about the content, it changes things a lot. When you start thinking about it, there are a lot of content clusters out there – flocks of blogs – that all have the same general readership. If there are a couple dozen anti-Iraq war blogs, wouldn’t it be cool to have a common calendar and hot-list of things to do as part of your movement? How about content-centered games that play on multiple blogs at the same time? How about blog competitions, where blogs that join can compete on various games no matter which hosting provider they use – interactive games where all their readers can participate?

It’s not only the real-time content analysis that changes things; it’s also the dynamic nature of the DOM manipulation that happens. How about dynamically sorting and organizing blogs and blog content? Say you are reading a blog article about UFO pictures in Spain. Wouldn’t it be cool, from the article you are reading, to be able to drag the mouse out and see current or past articles about Spain, UFOs, conspiracy theories, or photography? Yes. We already have this capability on the web through a bunch of clicking and poking around, but I want to do this inside the page, without all the clicking and poking. The dynamic nature means that if you’re a blogger, once the program is installed, you could visit the master site and add and subtract features to your page by dragging and dropping components. If you’re a reader, there’s not even anything to install. You simply visit the free widget supermarket and select your tools, and they are with you when you visit registered sites.

I don’t know what other inventions are out there. Maybe somebody already has a dynamic, cross-browser-and-cross-domain data-driven pluggable web framework. If so, I haven’t seen it. Step forward! I’d like to see it! I think it would make for a neat story. Maybe this is a major security breach and civilization as we know it will end tomorrow. Write me and let me know. I’m all ears. Let’s just be constructive and not snarky. I see room for more fun in this area. Perhaps in the future I can tell you guys about how this technology could replace the current crop of P2P tools. That oughtta get your blood pumping!

Writing all of this, I can’t help but thinking about that beloved web icon, GreaseMonkey. For those of you who don’t know, GreaseMonkey is an awesome plug-in for FireFox that allows people to run JavaScript and change the DOM when they visit web sites, effectively allowing the user to fully customize how the sites look. What I’ve been describing in this article is the same thing – dynamically running HTML DOM modification JavaScript based on site. Of course, I add user and content variables to the mix. The big difference is that GreaseMonkey is a plug-in and I am talking about a framework that runs without plug-ins on any browser. I haven’t gone there yet – I guess just can’t bring myself to shoot the monkey (although it would be way cool to make him run without the plug-in, on most any browser. The monkey, finally free from that oppressive organ-grinder!) Maybe I’ll do it and maybe not. It’s really already there, but I should make it easy on folks and add a GUI for manipulating the screen and saving it to my plug-in format. (In FireFox this tool already exists as a plug-in called Platypus.) My tool would be cross-browser. No plug-ins required. Imagine: manipulating and personalizing other web sites, mashing them together, ordering them by best articles, personal desires, dynamic content information. Then having that configuration persist with you when you are at work or at home, no matter what kind of browser you have! All without installing anything. I’m warning you guys: one more move, and the monkey gets it!

No matter what, I’m having more fun than a person should be allowed. I’m really excited about the potential that XJAX has to offer, and hopefully I’ve explained it well enough that you are too.  I have a working prototype that is in production, so you’re welcome to check out the Flash demo or stop by and see ranking happening on several browsers and providers all from the same code and database. I’m not even sure what to call it – perhaps Web-to-Web Collaboration says it best. W2WC using XJAX. There are still some very neat things out there on the internet that are waiting to happen! I encourage all of you to challenge the technical problems you might face and push for the solutions your customers need. Don’t just accept limitations. It has been terrific fun for me watching it all come together. By the way, Gates or Jobs, I still live in the same place. Just don’t bring your playing cards this time, okay?

0
0 ratings
Aiden Reynolds
Aiden Reynolds
Aiden Reynolds is a content editor at WEB 2.0 JOURNAL. He was born and raised in New York, and has been interested in computer and technology since he was a child. He is also a hobbyist of artificial intelligence. Reynolds is known for his hard work ethic. He often puts in long hours at the office, and is always looking for new ways to improve his writing and reviewing skills. Despite his busy schedule, he still makes time for his interests, such as playing video games. In his free time, Reynolds enjoys spending time with his wife and two young children. He is also an active member of the community, and frequently volunteers his time to help out with local events.