Top Banner
RestfulX “The RESTful Way to develop Adobe Flex and AIR applications” or “Flex on Rails” Peter Armstrong [email protected] www.ruboss.com twitter: @peterarmstrong
16

RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Jul 03, 2015

Download

Technology

elliando dias
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

RestfulX“The RESTful Way to develop

Adobe Flex and AIR applications”or

“Flex on Rails”

Peter [email protected] www.ruboss.com

twitter: @peterarmstrong

Page 2: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

why?

Page 3: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Flex + Rails, before RestfulX

Page 4: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Flex + Rails + AIR, before RestfulX

Page 6: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

What arewe doing80%

of the time?

Page 7: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

RESTful CRUD

Page 8: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Flex + Rails, with RestfulX

Page 9: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Flex + Rails + AIR, with RestfulX

Page 10: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

RestfulXFeatures!

Page 12: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

Ruboss FrameworkRuboss Company Project (Dima lead)Dima was Ruboss CTO© RubossGPL v3 & Commercial License

RestfulX Framework(“RESTful X” / “REST Flex”)Community Project© Dima Berastauand ContributorsMIT License

2008

2009

shocking news: you can’t sell verymany framework licenses in 2008!

RestfulX History

Page 13: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

RestfulX, Ruboss and Dima Today

= Peter Armstrong +Scott Patten

Dima is now doing freelance RestfulX development and is building a time tracking product using RestfulX.

Peter and Dima are writing a bookFlex Development with RestfulX

and will be publishing it on Sopobo.

Ruboss is doing RestfulX consulting

and development and is working on

Sopobo.com, a site to self-publish PDF

books. We’re building it in Rails, Flex and RestfulX. Scott’s S3 book is on it today.

Page 14: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

DEMO

Page 15: RestfulX “The RESTful Way to develop Adobe Flex and AIR applications”

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 config/environment.rb and add: config.gem "restfulx"

3. Run rx_config with the distributed option:$ ./script/generate rx_config --distributed

4. Create your data model:$ emacs db/model.yml

5. Generate the app, recreate the database and run your server:$ ./script/generate rx_yaml_scaffold$ rake db:refresh$ ./script/server

6. Import the project into Flex Builder and compile the Flex code.

7. Go to http://localhost:3000.

8. Convert the app to AIR:a) Stop your server.b) Delete the project in Flex Builder. (Don't delete contents.)c) ./script/generate rx_config -a --distributedd) Import the pomodo project into Flex Builder again.e) [WORKAROUND] Fix the routes, which got hosed by rx_config -a --distributed: map.resources :locations map.resources :notes map.resources :tasks map.resources :projects map.resources :users

9. Test online/offline:a) Start your server.b) Rebuild and run the AIR app. Note that it's empty.c) Start your server. Note that online detection works. Do a pull.d) Create tasks, projects, etc.e) Do a push.

project: - name: string - notes: text - start_date: date - end_date: date - completed: boolean - belongs_to: [user] - has_many: [tasks]

location: - name: string - notes: text - belongs_to: [user] - has_many: [tasks]

task: - name: string - notes: text - start_time: datetime - end_time: datetime - completed: boolean - next_action: boolean - belongs_to: [project, location, user]

note: - content: text - belongs_to: [user]

user: - login: string - first_name: string - last_name: string - email: string - has_many: [tasks, projects, locations] - has_one: [note]

db/model.yml:

It’sjustthat

easy.