Monday, March 28, 2005

AJAX and Rails demo application: taskTHIS!

I thought that since I was involved with the new AJAX stuff in the latest Rails (0.11.1 as of this writing), that I would create a quick demo application showing how to actually use the stuff.

So I present to you taskthis!

Before you roll your eyes and say: “Ugh! Another todo list example?!”, this one is different! Honestly. Sort of. It's using the new Rails (0.11.1) asynchronous AJAX tools. It's using them a lot. Plus, you can download the source and play around with it.

It's been tested on Safari and Mozilla blends (Firefox/Camino), but not too extensively on Windows/IE. So I'd appreciate a shout out if you find any issues there.

Links

22 comments:

  1. very nice! i'm only just learning, but thanks for releasing the code. the demo rocks the casbah!

    ReplyDelete
  2. As a newbie, I was just reading about the Ajax in 0.11.1 and thinking to myself, "Man, I wish I had a starting point for examining this material." And then I see you have released this. Thanks a ton! I look forward to learning from your code.

    ReplyDelete
  3. Just to echo the other comments, thanks so much for releasing this code. I find that studying actual apps is a great way to learn "the rails way" rather than piecing it together through the documentation.

    ReplyDelete
  4. Thanks for releasing this. I could repeat what the other people here just said. This is just what I'm looking for - a working example of the ajax stuff, ...

    ReplyDelete
  5. nice... but :)
    * style buttons
    * change that #F0F0F0 background (text fields) in light light blue
    * find some nice icons
    * sharing?
    * rss?

    ReplyDelete
  6. Hi
    Thanks for releasing it, but there's some strange behaviour if you let the site alone for a while (logged in) and come back after some hours. If you then click on the "Completed" checkbox you get a login form that shifts down to the position where the completed item should sit ;-) looks cool, but I think that's not intended, is it?

    ReplyDelete
  7. Nice, runs a little slow (development server?) Like the usage of ajax and its a clean and simple interface. Good work!

    ReplyDelete
  8. Is there a license on this code?

    ReplyDelete
  9. Thanks for the feedback! It's great to hear when your work is appreciated!
    Matt: There aren't any docs, really. Are you interested in API docs, or installation docs, or something else? I do plan to write an article about taskthis! that focuses on it's use of AJAX in the next few days.
    Nikola: Sharing, RSS Feeds, Public Lists, and more are all on my 'nice to have' feature list. I'm debating how the public stuff should work... Can the 'public' add new tasks for you, and complete them?... Stuff like that. The RSS support will kinda depend on that decision. If anyone has any thoughts on that or further feature requests I'd be happy to hear them.
    Wolfgang: Really? Heh... I wondered what would happen when the session timed-out. Thanks for pointing it out, I'll have look at that.
    Misuba: Thanks for asking, I forgot to include the license. Sorry about that. It's a form of GPL, you can find it here.

    ReplyDelete
  10. downloaded the code, and i've mysql ruby rails etc.
    how do i start the taskthis app?

    ReplyDelete
  11. Hi,
    Thanks for the tip.. Got it working and the code is great for a ruby/rails newbie to fiddle with.
    Cheers

    ReplyDelete
  12. I'm fairly new to this, but I'm liking your application.
    Am I missing something? How do you get this to work with Apache? If at all?

    ReplyDelete
  13. Actually, sorry.
    That's not my issue anymore. I'm getting the following error when trying to add a new task list:
    NameError in Tasks#new
    uninitialized constant RedCloth
    /app/models/tasklist.rb:20:in `create_html'
    app/controllers/tasks_controller.rb:35:in `new'
    script/server:48

    ReplyDelete
  14. I got this up and running with postgres, but trying to use rake and the Rakefile is not working. a quick glance at the Rakefile looks like you are grabbing the wrong postgres username during the dump. it is dumping all the postgres system tables. in anycase if I don't rake it seems to work ok.

    ReplyDelete
  15. That's good to know. It probably should be brought up to the ActiveRecord guys -- I don't use postgres. Whatever's in the rakefile is what Rails spits out by default.

    ReplyDelete
  16. Cool stuff, much better than TaDa except for one feature - the ability to reorder list items. Kudos.

    ReplyDelete
  17. I've installed this on OS X Tiger. I created the databases using sqlite3. I've started the server using script/server. When I enter localhost:3000 in my browser I get '/' not found. Anything else I need to configure?

    ReplyDelete
  18. Rod: Nothing that comes to mind. However, I do recall having problems with sqlite3 -- I wound up having to use sqlite 2.8.16.

    ReplyDelete
  19. Seems the demo and source for this is unavailable...

    ReplyDelete
  20. Christer: Sorry about that, some URL's changed... I've updated the post to reflect the changes.

    ReplyDelete