RestfulX, Ruboss and Dima Today
Dima is now doing freelance RestfulX development
and is building a time tracking product using RestfulX.
= Peter Armstrong +
Ruboss is doing
and development and
is working on
Sopobo.com, a site to
books. We’re building
it in Rails, Flex and Peter and Dima are writing a book
RestfulX. Scott’s S3 Flex Development with RestfulX
book is on it today. and will be publishing it on Sopobo.
0. If you have run this before, delete a pomodo.db database from home directory.
1. Create the Rails app, install RestfulX and create the Flex project:
$ sudo gem install restfulx
$ rails -d mysql pomodo
$ cd pomodo
2. Edit conﬁg/environment.rb and add:
3. Run rx_conﬁg with the distributed option:
- name: string
- notes: text
- start_date: date
- end_date: date
$ ./script/generate rx_conﬁg --distributed - completed: boolean
- belongs_to: [user]
4. Create your data model: - has_many: [tasks]
$ emacs db/model.yml
5. Generate the app, recreate the database and run your server: - name: string
$ ./script/generate rx_yaml_scaffold - notes: text
$ rake db:refresh - belongs_to: [user]
$ ./script/server - has_many: [tasks]
6. Import the project into Flex Builder and compile the Flex code.
- name: string
7. Go to http://localhost:3000. - notes: text
- start_time: datetime
8. Convert the app to AIR: - end_time: datetime
a) Stop your server. - completed: boolean
b) Delete the project in Flex Builder. (Don't delete contents.) - next_action: boolean
c) ./script/generate rx_conﬁg -a --distributed - belongs_to: [project, location, user]
d) Import the pomodo project into Flex Builder again.
e) [WORKAROUND] Fix the routes, which got hosed by rx_conﬁg -a --distributed: note:
map.resources :locations - content: text
map.resources :notes - belongs_to: [user]
map.resources :projects user:
map.resources :users - login: string
- ﬁrst_name: string
9. Test online/ofﬂine: - last_name: string
a) Start your server. - email: string
b) Rebuild and run the AIR app. Note that it's empty. - has_many: [tasks, projects, locations]
c) Start your server. Note that online detection works. Do a pull. - has_one: [note]
d) Create tasks, projects, etc.
e) Do a push.