Agile Development With Hobo

2,636 views

Published on

The next slide in the series gives more details about the wonders of Hobo.

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,636
On SlideShare
0
From Embeds
0
Number of Embeds
51
Actions
Shares
0
Downloads
116
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Agile Development With Hobo

  1. 1. Agile Web Development with Hobo Evarist Lobo [email_address]
  2. 2. Introduction <ul><li>Hobo is a rapid web application builder </li></ul><ul><li>It uses Ruby on rails and several plugins </li></ul><ul><li>Provides default user model and themes </li></ul><ul><li>CRUD and AJAX support </li></ul><ul><li>DRYML tagging language and libraries </li></ul><ul><li>Easily customizable </li></ul>
  3. 3. Prerequisites <ul><li>Assumes basic knowledge of web development, databases, Ruby and Rails </li></ul><ul><li>For Windows: install InstantRails </li></ul><ul><li>For MacOS X: install Locomotive </li></ul><ul><li>Test that you have Ruby and Rails up and running </li></ul>
  4. 4. Getting started <ul><li>Download hobo gem from hobocentral </li></ul><ul><li>Install hobo gem </li></ul>
  5. 5. Create Application Skeleton <ul><li>hobo <appname> </li></ul><ul><li>Runs Rails </li></ul><ul><li>Runs Hobo App generator </li></ul><ul><li>Default theme </li></ul><ul><li>Basic user model </li></ul>
  6. 6. Create MySQL Database <ul><li>Use phpmyadmin </li></ul><ul><li><appname>_development </li></ul>
  7. 7. Create Model and Controller <ul><li>cd <appname>/script/generate hobo_model <model_name> </li></ul><ul><li>creates basic files, unit tests and schema </li></ul><ul><li>cd <appname>/script/generate hobo_model_controller <model_name> </li></ul><ul><li>creates controller and helper classes </li></ul>
  8. 8. Add Fields <ul><li>Add fields to your tables in the migrations scripts </li></ul><ul><li>auto dates foreign keys are Hobo options </li></ul><ul><li>rake db:migrate </li></ul>
  9. 9. Create Object Relationships <ul><li>Advert </li></ul><ul><li>belongs_to :user </li></ul><ul><li>belongs_to :category </li></ul><ul><li>set_creator_attr :user </li></ul>
  10. 10. Start the application <ul><li>Use Instant Rails Console to start application </li></ul><ul><li>Login signup search </li></ul><ul><li>Uses acts_as_authenticated plugin </li></ul><ul><li>Scriptaculous AJAX editor </li></ul>
  11. 11. Customizing Application <ul><li>Using DRYML </li></ul><ul><li>changing the index page </li></ul><ul><li>each DRYML tag calls a Rails helper method </li></ul><ul><li>changing generated page </li></ul><ul><li>creating tags </li></ul>
  12. 12. Hobo Rapid tags <ul><li><index_page> </li></ul><ul><li><show_page> </li></ul><ul><li><new_page> </li></ul><ul><li><edit_page> </li></ul><ul><li><show_collection_page> </li></ul><ul><li><new_in_collection_page> </li></ul>
  13. 13. Core and Common tags <ul><li>repeat </li></ul><ul><li>panel </li></ul><ul><li>show </li></ul><ul><li>section </li></ul><ul><li>maincol </li></ul><ul><li>sidecol </li></ul><ul><li>display_name </li></ul><ul><li>object_link </li></ul><ul><li>new_object_link </li></ul><ul><li>count </li></ul><ul><li>with </li></ul><ul><li>join </li></ul><ul><li>if </li></ul><ul><li>else </li></ul>
  14. 14. Page navigation <ul><li><page_nav> </li></ul><ul><li><first_page_link> </li></ul><ul><li><last_page_link> </li></ul><ul><li><next_page_link> </li></ul><ul><li><previous_page_link> </li></ul><ul><li><page_n_of_count> </li></ul>
  15. 15. CRUD buttons <ul><li><create_button> </li></ul><ul><li><delete_button> </li></ul>
  16. 16. Create your own tag ! <ul><li>def : </li></ul><ul><li>Definition </li></ul><ul><li><def tag=&quot;my_tag&quot;>This is my tag</def> Use </li></ul><ul><li><my_tag/> Output </li></ul><ul><li>This is my tag </li></ul>
  17. 17. Creating tags <ul><li>Tags with attributes </li></ul><ul><li>The attributes become local variables inside the tag. </li></ul><ul><li>Passing arbitrary values </li></ul><ul><li>Implicit context </li></ul>
  18. 18. Creating tag libraries <ul><li>Use <taglib> to load tags from another Dryml file </li></ul><ul><li>Note that app/views/hobolib/application.dryml is implicitly imported into every Dryml template. </li></ul><ul><li>You can load the tags from a directory or a Ruby module </li></ul>
  19. 19. Using Tags from Ruby <ul><li>Tags are just methods, they can be called from ERB scriptlets and from helpers. </li></ul><ul><li>Call with parameters or content </li></ul>
  20. 20. Modifying theme and stylesheet <ul><li>Look at screencast for example </li></ul><ul><li>Many designs available at opendesigns.org </li></ul>
  21. 21. Hosting your Applications <ul><li>Capistrano is a tool to deploy ruby applications </li></ul><ul><li>Lots of plugins and tutorials exist to make your applications scale with memcache </li></ul><ul><li>You can host your application with Amazon S3 and EC2 </li></ul>
  22. 22. Resources <ul><li>http://www.hobocentral.net </li></ul><ul><li>Download plugin </li></ul><ul><li>Look at screencasts for quickstart </li></ul><ul><li>Read the blogs </li></ul><ul><li>Read the forums </li></ul>
  23. 23. Contributing <ul><li>look at code in Trac </li></ul><ul><li>Log bugs </li></ul><ul><li>Send patches/bug fixes to Tom Locke </li></ul><ul><li>Create documentation </li></ul><ul><li>Create sample applications and tutorials </li></ul>
  24. 24. Thank You <ul><li>Thanks to Tom Locke and others for creating Hobo. </li></ul><ul><li>Please email me your feedback at evarist@gmail.com </li></ul>

×