Chapter 10. Finishing the application

 

The kids all dream of making it, whatever that means

Arctic Monkeys

In this iteration, we’ll build the remaining features in Pomodo. After we finish this iteration, we’ll have a reasonably complete application.

10.1. Notely

One thing we’ve left totally stubbed out so far is Notely. Let’s fix that now. Essentially, we’ll implement Notepad in Flex. We’ll be extremely simplistic and store one note, instead of having multiple versions and undo/redo support. Additionally, we’ll add Notely using nested resources, using the new simplified RESTful routing[1] for nested resources in Rails 2.

1 Thanks to Ryan Daigle for explaining them well and concisely at http://ryandaigle.com/articles/2007/5/6/what-s-new-in-edge-rails-restful-routing-updates.

Note

For the “first real word processor for the web” in Flex, check out Buzzword. The company that built it was recently acquired by Adobe (they liked it so much, they bought the company).

All disclaimers aside, here we go. We won’t use scaffold_resource this time; instead, we’ll do things manually for variety.

We start by creating a new migration:

c:\peter\flexiblerails\current\pomodo>
ruby script\generate migration create_notes
      exists  db/migrate
      create  db/migrate/005_create_notes.rb

c:\peter\flexiblerails\current\pomodo>

Next, we edit the migration to create user_id, version, and content columns; see listing 10.1.

10.2. Better security with attr_accessible

10.3. GTD semantics, including the Next Action concept and :dependent

10.4. Filtering tasks

10.5. The CommandShell

10.6. Logging out

10.7. Marketing!

10.8. Deleting users

10.9. Exercises for the Reader