PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/02_web/03_webby/README.md

https://github.com/Ronovan/ruby-rails-jumpstart
Markdown | 42 lines | 29 code | 13 blank | 0 comment | 0 complexity | 087ab0e996f5b03f7d573d8d1ff4d711 MD5 | raw file
  1. # Building Web Applications using Sinatra & AJAX
  2. * Install dependencies using "ruby -S bundle install"
  3. * Run the script using "ruby -S bundle exec ruby application.rb"
  4. You should study the code for application.rb and get to know it well.
  5. Test out the service by visiting http://localhost:4567/ in your browser.
  6. Next Steps:
  7. * Add an "about" page as static HAML containing some witty prose and link it into the nav bar of the app
  8. * Read http://www.padrinorb.com/guides/application-helpers : especially the part about error_messages
  9. * Add model validation for location name (must be present), latitude and longitude (must be present & valid floating-point numbers)
  10. * When model validation fails, display an error message in the form
  11. * Implement a list of duckduckgo queries via RUBY, similar to locations:
  12. * DuckDuckGo : Model should include query name & query text
  13. * DuckDuckGo : Use the search api from 01_ruby/03_web/duck.rb (the duckduckgo part)
  14. * DuckDuckGo : The 'show.haml' page for DuckDuckGo should display search results retrieved from the remote web service *in the ruby code*
  15. * Implement a list of twitter queries via AJAX, similar to locations:
  16. * Read these links to get some ideas:
  17. http://net.tutsplus.com/tutorials/javascript-ajax/5-ways-to-make-ajax-calls-with-jquery/
  18. http://webhole.net/2009/11/28/how-to-read-json-with-javascript/
  19. http://www.chazzuka.com/twitter-api-jquery-jsonp-how-to-229/
  20. * Twitter : Model should include query name & query text
  21. * Twitter : Use the search api from 01_ruby/03_web/duck.rb (the twitter part)
  22. * Twitter : The 'show.haml' page for Twitter should display search results retrieved from the remote web service *as AJAX using JSONP*
  23. Advanced:
  24. * For Twitter, format tweet HTML using the JS library from https://github.com/twitter/twitter-text-js
  25. * Add a 'nuke' interface that deletes all data in the app
  26. * Add a User model (with name, email, and password) and a 'create new user' and 'list users' interface in the app
  27. Extra Advanced:
  28. * Add a login form to the app, and protect all page views using a scheme similar to this:
  29. http://stackoverflow.com/questions/3559824/what-is-a-very-simple-authentication-scheme-for-sinatra-rack