Blue and gold Cloud patterns Dawn at the pier Abstract weed Capybara

7th November, 2004

GTD on Rails

Filed under: — bsag @ 09:11 AM

A while ago, I mentioned Rails—the Ruby-based framework that allows you to quickly build database driven web applications. I’m still in the process of learning Ruby, but I decided that perhaps the best way to learn would be to actually try to build something. By using Rails, I could build something with a GUI, not just a command line interface, without having to jump through hoops to install and use something like Tk to draw windows, menus and so on.

I worked though Vince’s excellent Todo application tutorial, and decided to use that as a base to elaborate a more complex GTD-style Todo application. My aim was really to use it as a learning tool, but if I come out with something I can actually use at the end, so much the better.

I haven’t finished it yet, but it’s coming along nicely. I’ve got a main page which lists all my todos by context (@office, @call etc.), stores a creation date and completion date automatically, and allows you to set a due date (I’m going to flag these up visually when they get within a few days of being due). You can also store notes for an item (and have Markdown syntax in the note marked up as HTML automatically!). A link indicates if an item has a note attached and you can then click the link to toggle display of the note inline. I’m planning to set up a Projects page which will allow you to view and manage Todos which relate to a particular Project, though these will all be visible (sorted by context) on the main page. I also plan to provide an interface to edit and delete contexts so that you don’t need to mess with the database tables if you decide you want to add a new one.

There’s nothing particularly fancy about it, but remember that I’m not only new to Rails, but also new to Ruby and MySQL. I’m stunned that a framework which can create something as complex and professional as Basecamp can also allow a totally green newbie like me to make something cool and functional, without making me tear my hair out. In fact, it’s been really fun, and I have at times felt moved to punch the air and exclaim, “I rule!” when I solve a little problem. Ahem. The people who hang out in the #rubyonrails channel (irc://irc.freenode.net/#rubyonrails) are also fantastically helpful and enthusiastic, and perhaps one of the best possible advertisements for both Ruby and Rails.

  1. 1

    Hey, I'm very happy to hear that someone found my tutorial useful! Have a nice one!----- The power of a friendly community One thing that surprised me coming to Ruby was how extremely friendly everyone was. On ruby-talk, pretty much everyone doing...

    by Loud Thinking @ 07/11/2004 7:12 pm • Permalink

  2. 2

    This is a very nice blog by the way. I really like the design.

    by Lars @ 08/11/2004 3:12 pm • Permalink

  3. 3

    Cool. Looking forward to see what you end up with.

    by Daniel Von Fange @ 09/11/2004 3:11 am • Permalink

  4. 4

    Vincent: It was really useful and gave me a huge head-start.

    Lars: Thanks!

    Daniel von Fange: So am I! I'm not sure how useful it will be to anyone else, but I've got all sorts of ideas.

    by bsag @ 09/11/2004 11:12 pm • Permalink

  5. 5

    Do you plan on sharing your code? Sounds like a quick way to try the GTD approach...

    by Josh Goebel @ 12/11/2004 9:11 am • Permalink

  6. 6

    Josh Goebel: Yes, I will share it when it's a bit more advanced. However, as it's a web app, you'll need to have Ruby 1.8 (not the version installed with Panther), Rails, and MySQL installed before you can use it. It's not exactly a drag and drop installation. So it's probably only useful if you're learning Rails and want to see an example of usage. If you want a GTD app, you'll probably get to the end of installing everything and wonder why you bothered!

    by bsag @ 12/11/2004 6:11 pm • Permalink

  7. 7

    I just ordered the GTD book after reading about it everwhere and the system sounds pretty logical... I'm already developing other apps in Rails, so getting it all working is no biggy... was just considing making my own implimentation if I like GTD (the book) and wondered what you're looks like...

    Feel free to share the development code if you like... or I suppose those of us interested can wait. smile Most of the rails demos/examples are pretty devel still...

    by Josh Goebel @ 13/11/2004 4:11 pm • Permalink

  8. 8

    Josh Goebel: At the moment, it's a bit of a mess, so I'd like to clean it up a bit before I post it, even if it isn't finished. Being rather new to relational databases, I've got myself into a bit of a tangle trying to relate two tables. I have a table todos which has a field 'context_id'. This relates to the 'id' field of table contexts, which also has a field 'name' containing the name of the context (e.g. office, lab etc.).

    I've been able to get it to work in an ugly way, but I'd like to be able to be able to refer to the .name of a todo directly to get the name of the context. I think I've told Rails about the relations between the tables (Todo belongsto :context and Context hasmany :todos), but I can't seem to do it. :-( I'm sure I'm missing something very obvious. If anyone has any clues, I'd be grateful.

    by bsag @ 14/11/2004 7:12 pm • Permalink

  9. 9

    [...] a girl… GTD on Rails Filed under: Ruby — Haligan @ 7:07 pm

    but she’s a girl… GTD on Rails I’ve seen Rails mentione [...]

    by Put Together Quickly » but she’s a girlâ @ 15/11/2004 11:12 pm • Permalink

  10. 10

    but she's a girl... � GTD on Rails but she's a girl... � GTD on Rails I've seen Rails mentioned before, from the instiki site, but after reading this post I plan on putting some of the little time I have to look into it. She also links to a ToDo tutorial .

    by Put Together Quickly @ 16/11/2004 12:12 am • Permalink

  11. 11

    bsag: It'd be more like (without seeing your tables) todo.context.name... Assumsing the contexts tables has a name field....

    by Josh Goebel @ 17/11/2004 10:12 am • Permalink

blog comments powered by Disqus

Powered by ExpressionEngine :: © www.rousette.org.uk, 2002-2008 :: [XHTML] [CSS] [508]