First of all, a big HELLO to all of you at Club Linux! It's great to still receive the monthly meeting notices and get and idea of what you're up to, and if I'm ever back over that way, like a bad smell I'm sure to turn up again. :)
It's been a while, I know, but you see I've been busy...
I've always been annoyed by slow websites, and even more annoyed by full page refreshes in the browser just to get something you didn't really want to see anyway. So, out with the AJAX!
A bit over a year ago now, I started a project to get my openPC Labs website improved before updating it. I'm afraid it's still not updated because in the process things developed into something much bigger.
I wanted to use AJAX techniques for the site to get the responsiveness I yearned for. I also wanted to fix up the navigation so that the location bar, history and bookmarks would work.
At the time, there was very little support for browser navigation in AJAX. I stumbled on one system called Really Simple History. It was open source, but a bit buggy and a bit too slow for me, I just didn't feel comfortable with the way it was done.
So I started to roll my own..... BIG mistake.... just over a year later I might be able to start updating openPC Labs!
To cut a long story short, Xanjax and xanjax.org were born.
For the Web Savvy: Xanjax presently gives AJAX event driven navigation capability (that could be a world first, I think the others are all polling), converts XML to HTML on the fly and inserts it into the DOM, and does XHTML 1.0 strict Virtual Frames. And especially for you Matthew, it degrades gracefully! Actually, I listened carefully to your advice on that subject a long time ago, and agree with you. Of course a huge benefit is that it's then search engine friendly too, something else that is often lacking in AJAX applications.
I don't know if any of you have a use for or real interest in what I've done but I thought anyway you might be interested to know I've released an open source project under the GNU licence. Could that be a first for Club Linux?
I'm sure you'd all like to know that in the process I was able to confirm that all the horror stories about non-compliance of Internet Explorer with W3C Web Standards are true.
More than 90% of the effort that went into Xanjax was to get around IE bugs or non compliance with web standards. IE7 is little better than IE6; frankly theyre just poxy! Ironically though, Xanjax probably now goes a little better in some ways with IE than it does with Firefox. Unfortunately Konqueror isn't going yet, and perhaps it won't - maybe the developers should concentrate on the fundamentals before trying to fit it out with Active X! Opera is nearly going but is by far the better browser, even though I still use Firefox personally.
The whole development process was done under Linux. Testing Internet Explorers also; running in Wine, configured by ies4linux. What other platform can you run IE5.5, 6.1, 7.0 and Opera, Firefox and many others on - all simultaneously?
Finally, I'm still stuck on Mandriva, now on 2008. If I had broadband I'd be on Gentoo, but since I'm on dial-up thesedays I'd never be able to build it. I'm about to look at ubuntu again, Fedora looks pretty nice now too.
So long
David
Comments
Great to hear from you David!!
Hi David,
That xanjax.org looks very interesting, I shall have to have a play with it. When I get a computer... I think Gentoo could be interesting although I'm not sure about portage and emerge, seems a bit weird, like eating snails. Guess it is OK once you've had a few platefuls :)
I like your timeline:
very real.
Cheers
Ruben
tregeagle.com
Hey Ruben!
Nice to hear from you too, Ruben!
Things have been a bit hectic around here with child raising and renovations... have to be stupid to do open-source as well! Too real for comfort really!
Maybe I could commandeer you into trying to open the xanjax.org site on a Macintosh - if you're still at the Uni - there must be at least a few laying around. I still have absolutely no idea if the site will work in Safari. I would be very grateful if you could, and post the result, good or bad, to the xanjax blog.
The Gentoo experience was a good one for me. It's very good to install just what you want, have a configuration which is not someone else's idea of what a configuration should be; plus you don't ever really need to do another system install as Gentoo is capable of transmogrification over time into whatever one considers the 'latest' version to be. Finally, as monopolisation extends ever deeper into private territory, binary only distributions may one day become illegal. I hope it never gets to that! Even the big guns will not ultimately be able to extinguish privately held source code because it will be held by commited people. Although you can download the source of other distributions, few actually do, myself included, so Gentoo effectively provides a bit of insurance. Finally, emerge and portage. Emerge is a bit tricky at first, but if you keep your installation you do it once only. Portage is as easy as any linux software updater and better than most. The documentation on their website is great.
I had a quick look at your website - I miss the trips we used to make to MinnieWater. I had no idea you were into nature walks otherwise I would have invited myself along!
Cheers
David - openPC Labs - Xanjax.org
A few thoughts
Hi David. Nice to hear from you.
I like the use of AGPLv3 as the license. I'm inclined to agree with some in the FSF who argue the "web services loophole" isn't a critical problem, as it's perfectly possible for people to run their own equivalent of GMail (any of the dozens of webmail systems out there) or Facebook (using FOAF and so on) on their own computers. It's very much an optimist's argument, in the face of the hordes of people willing to give away their privacy (and the privacy of anybody who emails them) to Google, so I'm not entirely convinced. However, the fact that AGPLv3-licensed code can be used in GPLv3 licensed projects and vice-versa means that every use of AGPLv3 makes GPLv3 more attractive, and that is unquestionably a Good Thing.
In fact, now I think of it, I'm not entirely sure how JavaScript programs stand in relation to the GPL. As the code is copied to and executed on the client's machine, doesn't that mean that a copy has been "distributed" or "conveyed" to the user, thus triggering the copyleft provisions of the GPL, without requiring the additional clauses in the AGPL? Is there a lawyer in the house?
Looking at Zanjax (well, your description of it, at least) from a technical point of view, and bearing in mind that I am practically JavaScript-illiterate, I started thinking about how it might apply to Drupal (of course), and other content management systems/frameworks. I've concluded that probably it shouldn't, as fitting it to a traditional CMS would probably require enough additional server-side processing to cancel out the efficiencies that Zanjax provides, and these systems are often already integrated with a JavaScript library for AJAX-y stuff (Drupal uses jQuery - you might want to look at using jQuery to at least help get around your browser-compatibility issues; it's only 14k in size).
I think where Zanjax will be most useful initially is for people using cheap shared hosting plans which aren't up to running a heavyweight CMS. There might even be a broader argument for keeping the "C" server-side while the "MS" is client-side. It would certainly be very "Web2.0". If you look at it in terms of the "LAMP stack", you'd be completely replacing the "M" database layer with HTTP (and probably WebDAV), and the "P" output processing layer with the JavaScript interpreter in everybody's web browser.
Some processes of course will always have to be server-side. On-the-fly image manipulation would be an example of this, but you could easily provide pluggable server-side components.
A couple of feature requests:
Can Zanjax give some kind of visual indication of when something is loading? I know the idea is that everything should be so fast that there shouldn't be a noticable loading time, but my slow ADSL connection with BitTorrent running in the background means that even on the Zanjax site, I can click and wait a good few seconds without any reasurrance that anything's happening.
Does Zanjax do any pre-caching? It would certainly be cool to be able to fetch the next page of items in a long paginated list.
Hi Matthew! Good to hear your comments.
I hope you ran Xanjax through the lynx (mangle?), considering it was your comments that led me down that path! :~]
As far as the AGPLv3 goes, I have to admit I'm not really sure if it was the right move, so I have retained commercial rights so xanjax could potentially be re -released on another free licence in future if a. it ever becomes popular and useful, and b. I made the wrong licensing decision.
The JavaScript being downloaded onto everyone's PC seems to me to be the crux of the issue - any website using licenced JavaScript software is without doubt 'conveying' - the actons of the end user are largely inconsequential, most will not even be aware of any use of software and cannot re-convey it unless they know what they're doing. The object is to get web authors to do the right thing, and to hopefully contribute sometimes too.
Once I get past the basic framework reliability hurdle, lots of your other comments will be answered.
I intended for example to do the typical AJAX loading indicators but decided to err on the side of 'release early' and 'release often.' The other thing is that I'm not sure if that's supposed to be part of the framework or not, but should certainly have been built into the website.
I use one of those ultra cheap shared hosting sites in the US against my better judgment - latency, even a few seconds deadtime, is too often a problem now, although it wasn't before the operator got too many customers; time to move on I suppose! That might be why xanjax was slow for you; occasionally it is for me too, especially in US daytime. Xanjax can help a lot with a hosting situation like this, but of course can't correct seconds of deadtime. Probably I should get a better host so people don't think it's xanjax otherwise they won't see the point.
The pre-caching idea is in mind already; perhaps it could be automatic based on content popularity metrics. This is already being done on many commercial sites to force feed victims with commercials... yuk! But let's use it for worthwhile puposes. From what you say I don't know if you're suggesting the user creates the demand list. I have thought of using a mouse over to begin/cancel an update but haven't tried yet.
If/when I find time, these features will happen.
As far as libraries like jQuery go, they have some very useful routines, but I think they miss the point a bit. Loading a static 14K (or even 7K like xanjax) is a huge time hit on a slow connection. One day, xanjax will be capable of intelligently loading compatible routines and CSS. Instead of a static compatibility 'layer' the AJAX approach to compatibility should be implicit - what is needed is loaded; nothing else. At the moment, I deal with compatibility as far as possible by narrowing my code to commonly supported functions; there's very little browser specific stuff. This is surprisingly effective and not as limiting as one might imagine.
I haven't looked too carefully at the typical 'stack' style analysis of what xanjax might look like yet, quite purposefully. I don't want to get limited in my approach by a technical analysis which probably is more useful for technicians and end users. Some things 'stack' quite nicely like hardware and software layers in network design. I'm not convinced that web design neatly fits into such a model, although it certainly may be useful as a mental tool.
Your comment about the 'M' layer becoming http is interesting - is this a RESTful principle?
It seems to me that there are two sharp ends to the web design dilema, both opposing (of course). One is user demand for easy, unlimited use, the other is scalability (at the server end). Oodles of excess processing power already exists at the client end whereas quality server power is both limited and hugely expensive. The fixation on centralisation, even for content, is one largely brought about by the monopolisation desire of capitalism. It's in our thinking. Free sofware offers the potential to escape some of these limits. Perhaps, for example, a 'future' website might exist everywhere and nowhere, as an array of self migrating nodes on thousands of private PC's; something of an expansion of the idea behind Bit Torrent. Getting the browser to do most of the work would be fundamental to such a scenario. (And wouldn't it worry the hell out of the copyright cops!)
So, now, maybe we need a 'C' (co-ordination) layer instead of an 'M' layer, to enable the database to be replaced with http?
If Xanjax makes even a micro-step in that direction, or inspires someone else to make it work I'll be very happy. But we're right at the beginning and maybe it won't even get off the ground in a small way.
I've recently transformed the HTTPRequest routine into an object so we can now run multiple download requests simultaneously - now we can begin to go beyond a basic website into more dynamic micro content. That's the next step (I think), after which I probably need to think about a more structured approach to dynamic module loading and API's... hmmm!
Cheers
David - openPC Labs - Xanjax.org
MAC Testing...
Hi David,
I've just grabbed an old 6 ton beast, a Power Mac G4, which is chugging along under my desk like a steam engine. It is running Mac OS X 10.4.11 with a gig of RAM. The browser I am using is Safari version 3.04
Opening http://xanjax.org/ in a new window it looks fine, so I follow the left menu link ,license to http://xanjax.org/#license.xml and we hit the first problem. The scroll bar in safari shows that it has more content to scroll down to but it refuses to actually scroll down the page.
Moving on.... I go to: http://xanjax.org/#howto.xml and click on the "How to think AJAX" text expander links but nothing happens. Nothing shows in the status bar, I cannot highlight the text - it is as if the browser cannot see the text.
Next, the Blog link gives me a 404 error. I have noticed that when i roll over the menu links Safari seems to have stripped out the #. So the browser tries to go to: http://xanjax.org/xanblog/xanblog.php and fails. If I change it to: http://xanjax.org/xanblog/#xanblog.php it works but without the xanjax menus.
Let me know if you'd like me to dig a little deeper.
Cheers
Ruben
tregeagle.com
...and Safari 3.1.1
Have just done a quick test in Safari 3.1.1 with identical results. No scrolling, text expander link not functioning. It seems as if the mouse cursor is not even aware of the text in the main body of the Xanjax site.
I notice that the menu links are all missing the # but when I click on them it seems as if Safari gets redirected to the url with the #
dodgy browser....
Ruben
tregeagle.com