« November 2006 | Main | January 2007 »
December 15, 2006
MochiKit In-Place Editing (Not Quite)
In his only blog post, Jakub shows this stub for in-place editing with the MochiKit JS library:
function make_editable(elem) {
function inplace(e) {
var obj = getElement(elem);
var editable_id = '_' (new Date).getTime() '_textarea';
swapDOM(elem, TEXTAREA({id:editable_id, cols:40, rows:5}, obj.innerHTML));
connect(currentDocument(), 'onkeydown', function(e) {
var textarea = getElement(editable_id);
var key = e.key().string;
if (key == 'KEY_TAB') {
obj.innerHTML = textarea.value;
}
if (key == 'KEY_ESCAPE' || key == 'KEY_TAB') {
disconnect(currentDocument(), 'onkeydown');
swapDOM(editable_id, obj);
}
});
}
connect(elem, 'onclick', inplace);
}
The only problem is, in his post he said it uses Ajax, which it doesn't. This is a good start on the user interface, though. It would be nice to see a completed version of this. (Perhaps as flexible as the one in strict.aculo.us?)
Posted by lsloan at 12:14 PM | Comments (0)
December 14, 2006
oXygen for Eclipse
oXygen XML editor Plugin for Eclipse might be worth checking out. Looks like it might require a paid license, though.
Posted by lsloan at 12:40 PM | Comments (0)
December 13, 2006
PostgreSQL Support for XML
As I use XML and XSL more often in my projects, I've come to appreciate databases that have XML support features.
PostgreSQL and XML
SELECT article_id, xpath_string(article_xml,'/beatles/@id') AS beatle_id FROM t_articles WHERE xpath_bool(article_xml,'/beatles/beatle[@alive="yes"]');
Posted by lsloan at 08:37 AM | Comments (0)
December 12, 2006
Screencasts: Education and Geeky Entertainment?
This evening, I set out to decide if I want to try using TurboGears
or Django for some Python projects. I've not come to any conclusion yet, but I did find something interesting.
ShowMeDo is a web site full of tutorial videos. Most of them show how to use one programming technology or another. They're usually "screencasts" of somebody doing something with their computer, filming the screen, and often with narration. I followed a link to this web site from one of the TurboGears tutorial pages.
The first such screencast I ever saw was for Ruby on Rails. It was for their Creating a weblog in 15 minutes video. (This version of the video doesn't appear to be the original that I saw, but it's close.) I don't know if this was the first of this kind of video, but it's the first I remember. (Probably partly due to the way that RoR can really rock the development world.)
While I was looking up information about TurboGears, I learned that theyhave done something similar with their 20 Minute Wiki screencast.
I'm often impatient and don't want to sift through a lot of documentation to make my decisions. Add to that the fact that I'm tired right now and these types of videos become very attractive.
Incidentally, there is a page for Django Screencasts. However, it's only one screencast at this time. The presenter demonstrates the creation of a CMS in about seven minutes.
Posted by lsloan at 10:55 PM | Comments (0)
December 08, 2006
Ajax Roundup: Yee-ha!
Git yer doggies ready fer the
The AJAX Framework Roundup!
This article should help pick out the right Ajax framework. At least for the next few days. Then the frameworks will change again.
I'm afriad to pick out a favorite framework, because when I do, I find that another one has some cool features, better implementation, etc.
However, there's absolutely no mention of MochiKit! Not just in that section, either. It's not discussed anywhere on devx.com.
Posted by lsloan at 10:57 AM | Comments (0)
Ajax Support in Rails
The IBM developerWorks article
"Crossing borders: Ajax on Rails" (Why Ajax works so well with Ruby), is another reason to check out Ruby on Rails.
I've been using a bit of script.aculo.us Javascript libraries in some of my own projects. A major discussionforum about it is on Google Groups, under the name "rubyonrails-spinoffs". So this article comes as no surprise. However, the example they use in it (getting the time of day) is a little boring.
Posted by lsloan at 10:40 AM | Comments (0)
December 07, 2006
Partial Success with Eclipse ATF & Mac OS X
Inspired by the article "Discover the Ajax Toolkit Framework for Eclipse" on IBM developerWorks, I set out to try to make it work for me under Mac OS X. I have achieved partial success. I can create a project with Dojo components, but I'm unable to run it in the Mozilla browser embedded in Eclipse.
Part of the problem is that the Mac OS X version of XULrunner isn't a finished package yet. There's no clear documentation for installing or setting it up, so I just had to guess. When I downloaded it (xulrunner-1.9a1.en-US.mac-pkg.dmg) and mounted the disk image, I found that it didn't contain a Mac .pkg as the name suggested. It contained a XUL.framework folder, whose name and contents suggested it should belong in /Library/Frameworks. I put it there, but I was unable to find the appropriate installation command.
The very spare ATF download/install instructions said that I should run "sudo ./xulrunner --register-global", but doing so resulted in the message "Registration not implemented on this platform!"
So, I just hope it's in a good place to use it. However, after creating my sample Dojo application, attempting to run it tells me that Mozilla couldn't be started because XULrunner can't be found. At least running it does get the project published to my web server directory, though. However, any attempt to run it a second time causes Eclipse to crash. I wish I knew how to cause the project to get published without Eclipse attempting to run Mozilla.
I'm sure there are newsgroup or mailing list conversations out there about this. If only I could find them...
PS: When I wanted to download the ATF extension, I found only versions for Windoze and Linux. I reasoned that Linux is closer to Mac OS X than Windoze is, so I downloaded the binary and source combination package for Linux.
Posted by lsloan at 10:21 AM | Comments (0)
December 04, 2006
Installing Eclipse ATF under Mac OS X
So, I'm trying to install Eclipse Ajax Toolkit Framework (ATF) on Mac OS X. It requires XULRunner in order to embed a Mozilla browser in Eclipse.
I was trying to follow a tutorial from IBM developerWorks, but it was very vague about where to get XULRunner. Today I looked at the Eclipse ATF page for documentation. Didn't find any.
Started browsing through the ATF listserv archive. Found a response to a user who had requested help finding XULRunner 1.8.1:
Re: [atf-dev] XulRunner 1.8.1 : where can I get it ?
That message linked to a download page with instructions. Here's a more recent one:
The only problem is that it only links to Windoze and Linux versions of XULRunner. I modified the Linux version URL and found a download site at mozilla.org:
Index of /pub/mozilla.org/xulrunner/nightly/latest-trunk
So this might be my source for XULRunner for Mac. However, it's the 1.9 alpha version. It's sure to be buggy. Strangely, it's a larger download than that for other OSes. The Mac ones are usually smaller, in my experience.
Well... Maybe more stable versions will appear soon.
Posted by lsloan at 03:05 PM | Comments (0)
Custom Scrollbars
Some folks like to create custom scroll bars for their content that match the design of the web site better than the ones provided by the web browser or OS. Some of the solutions look good and work well, but I've yet to find any that support cursor keys, page up/down keys, or mouse scroll wheels. Personally, if those features aren't supported, I wouldn't use custom scroll bars on web sites I develop.
A post on the Google groups "Ruby on Rails: Spinoffs" got me interested enough to look at some examples:
Google Groups: Ruby on Rails: Spinoffs
The poster's own site describes what they used:
This other one explains how theirs works:
Agave Group � Blog Archive � Scrollable DIV (and Blog Organization)
This one has some fancy features:
Posted by lsloan at 11:42 AM | Comments (0)