The Artima Developer Community
Sponsored Link

Python Buzz Forum
Ajax Experimentations: Filebrowser

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ian Bicking

Posts: 900
Nickname: ianb
Registered: Apr, 2003

Ian Bicking is a freelance programmer
Ajax Experimentations: Filebrowser Posted: Jul 8, 2005 3:24 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ian Bicking.
Original Post: Ajax Experimentations: Filebrowser
Feed Title: Ian Bicking
Feed URL: http://www.ianbicking.org/feeds/atom.xml
Feed Description: Thoughts on Python and Programming.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ian Bicking
Latest Posts From Ian Bicking

Advertisement

This weekend I started experimenting with a filebrowser application. It's much more Ajax-y than my previous experiment with Ajax. Unfortunately I don't trust that it is secure yet, so I can't give you a demo, but I can give a screenshot.

I used the Prototype library from Rails. I found it quite pleasant. Despite its association with Rails, it has no noticeable server-side integration (which I strongly prefer). It introduces some new patterns to Javascript, but Javascript can use some new patterns. For example, you can use $(id_name) equivalent to document.getElementById(id_name). Which is damn nice, because document.getElementById is a stupidly long name. If there were a dozen such shortcuts, that'd be a problem, but there's not and it's not a problem.

It could really use some documentation. Good old hand-written documentation, not fancy generated API documentation. I can understand what the code does well enough, but it's hard for me to tell what the code is intended to do, or how I'm intended to use it. But it's short, so it's not that hard to work my way through it.

As an example, here's how you call a URL, and insert whatever it returns into a container by the given id:

<a onclick="new Ajax.Updater('container_id', 'http://...')">

I'm not entirely sure I like this style; I find I often want the page to run Javascript in addition to updating some content. You can do this:

<a onclick="new Ajax.Updater(
  'container_id', 'http://...', 
  {onComplete: function (req) {...}})">

But I don't like putting so much logic in the link itself. But experimentation will tell better than my inexperience opinion (especially with respect to Javascript). The underlying functions are easy enough to use that I could implement other techniques if I want. The whole library is just 768 lines long, 567 if you leave out the visual effects, 283 if you leave out the form stuff and Insertions (both of which are probably interesting, but I don't yet understand).

Read: Ajax Experimentations: Filebrowser

Topic: ... Previous Topic   Next Topic Topic: Python assisted Segway clone builder makes an electric unicycle

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use