SlideShare a Scribd company logo
What is Hobo ? Evarist Lobo [email_address]
Introduction Hobo is an Open Source extension to Ruby on Rails which helps you build full blown web applications incredibly quickly and easily. Available as a Gem or Rails plugin. Builds on other available plugins  Hobo provides a simple, clean and elegant development framework which allows for rapid prototyping or production of the most sophisticated web applications.  Created by Tom Locke
Main Features Rapid implementation of dynamic Ajax interfaces in your application with no extra programming.  Switchable themes. Customise and tweak your application structure and layout to meet any design goals.  Powerful mark-up language, DRYML, combines rapid development with ultimate design flexibility. The end of the cookie cutter blues!  Rails extends Ruby Hobo extends Rails !
Audience Hobo is a powerful tool for professional web developers who want to speed up the creation of rich, complex applications, as well as simple ‘off the cuff’ prototypes.  Hobo is great for designers too because the concise and elegant DRYML code makes design changes a snap to implement.  Newcomers to Ruby on Rails can use Hobo as a fast and easy way to learn and practice agile, iterative application development.
What can Hobo do? Hobo is nothing but extensions to Rails!  There’s nothing that Rails can do that Hobo can’t.  DRYML Ajax Rendering  Hobo Rapid Tag Library  ActiveRecord Permission System
What can Hobo do ? Cross-Model Search  Switchable Themes  User Management (Acts As Authenticated)  ActiveRecord Composable Query Mechanism  Generic Model Controller (CRUD Support) Migration Enhancements ID Names
What is DRYML? A powerful tag and template language Tags can be composed of other tags Contains anything you can put in an XHTML page Simpler to use than Erb Comes with a large number of helpful tags Looks like HTML
Ajax Rendering  Integrated with Scriptaculous  Comes with an editor integrated Very simple to use Ability to mark a section of your page as a “part”. Having done this, Hobo will track the object that was in context when the part was rendered, and can re-render the part using the new state of that object when requested.
Hobo Rapid Tag Library  A tag library is basically just like a load of Rails helpers, but as DRYML tags instead of methods. Hobo Rapid contains the Hobo equivalent of link helpers, form helpers, ajax helpers, and pagination helpers. There’s also some “scaffold-like” tags for default pages, and support for navigation bars.
ActiveRecord Permission System  Just a simple convention for declaring who’s allowed to do what to your models (create, update, delete and view). The permissions come into effect in two places: in customizing the views, and in validating http requests.  View customization is provided in the tag library. The output of various tags is dependent on permissions.
Cross-Model Search  Fairly simple but useful. Models can declare which columns are searchable (there are sensible defaults of course!) and Hobo provides both server and client-side support for a nice ajaxified search that finds many types of model from a single search page.
Switchable Themes  A Hobo theme consists of public assets such as a stylesheet and images, and some tag definitions.  The tags define the basic HTML structure of the various theme elements - the overall page, header and footer, navigation bar, sidebars, panels (boxed sections within the page) etc.  Themes are switchable by changing a configuration variable.
User Management (Acts As Authenticated) In order for the permission system to work, a user model must be present.  For that reason we decided to go ahead and include AAA in Hobo.  The  user model has been merged with Front controller  The user model methods that are not commonly changed have been moved out into a module to keep your user model clean. Hobo also adds the concept of a guest user, this is a pseudo model that is not stored in the database.  It’s just a place to define the permissions for someone who has not logged in.
Front controller Hobo’s “front” controller gives you your front page and related pages like search, login and signup for FREE ! Also creates associated pages in the view You can customize them using DRYML
ActiveRecord Composable Query Mechanism It’s common practice with ActiveRecord to write query methods to capture standard queries your application needs beyond the magic find_by_* methods.  You are to be able to  compose  queries: find everything that matches this query  or  that one; find the first record that matches some query  and  some other one.
CRUD Support  generate hobo_model_controller <model-name>  Hobo derives the model class from the controller class name  The basic CRUD methods are created: index, show, new, create, edit and update  also has support for your has_many and belongs_to associations
CRUD support Support for your associations when creating / updating models.  When you post (create) or put (update), you can set both has_many associations and belongs_to associations.  You can either pass the id of an existing record, or pass entirely new records in nested parameter hashes.  There’s support for all this in DRYML and Hobo Rapid
Data filters   Data filters allow you to expose composable query mechanism to the web A page with all the people not in the group with id 7 would then be available at /people?where_not_in=group_17
Enhanced autocomplete   Rails supports Scriptaculous auto-completer through the helper auto_complete_for  Hobo’s version is enhanced to work with the data filter mechanism.  Hobo Rapid has an auto-completer tag
Remote procedure calls   Write an action in your controller as normal. Add web_method <method-name>.  Hobo will add a route for your method, and apply a before filter so the object in question is already available in @this.  Hobo’s AJAX mechanism supports updating the page with results from your method, and there’s integration into the permission system too.
Alternative show methods   Alternatives to the standard view show_method :profile  create app/views/users/profile.dryml.  You also get a named route person_profile so you can call person_profile_url(fred) and get the URL back.
Migration Enhancements  This is a little one, but very useful. In create_table calls, you can add columns like this t.string :name, :subject, :limit => 50 instead of t.column :name, :string, :limit => 50 t.column :subject, :string, :limit => 50 There’s also t.auto_dates that gives you updated_at and created_at, and t.fkey :zip, :zap That will give you integer columns zip id and zap id Has been used in latest version of Rails
ID Names  In ActiveRecord everything has a numeric ID. It’s common however, that models also have an identifying name (e.g. a name column where every row is unique).  If a model has an ID name like this, it’s nice to be able to sometimes use it instead of the numeric ID, for example in readable URLs.  If your model declares hobo_model, you can also declare id_name <column-name> If you don’t specify a column it defaults to name.  This gives you a read/write attribute id_name which is just an alias for the column in question. You also get find_by_id_name on the class.
ID Names If you are using Hobo’s model_controller you can then use names instead of IDs in your URLs, e.g. (using ID names in combination with the associations support): /categories/News/posts  The helper object_url will generate this kind of URL too - if the object you pass supports ID names.
DRYML Details DRYML: The Dont-Repeat-Yourself Markup Language. In case you hadn’t guessed, we’re intending to bring a higher level of re-use to Rails’ views. Why? Rails already has a bunch of mechanisms for re-use within views. Namely: layouts, partials and helpers. Each serves a different purpose, and yet, IMHO, there’s still a gap. I find that small fragments of mark-up tend to crop up over and over in my views. Yes I could extract them into paritals or helpers, but I find myself disinclined to do so. Helpers are good for small bits of dynamic content, but not so convenient for re-use of HTML fragments - I don’t really want to embed loads of HTML in strings in Ruby source. Nor do I want to make excessive use of the tag helper. I want to put mark-up in mark-up files. .
DRYML Details So partials would be appropriate. But each partial needs it’s own file, which again discourages me from making heavy use of them. If you ever needed to call a helper passing in HTML mark-up in the parameters, that’s HTML within Ruby within HTML — not pretty.  ERB doesn’t need fixing. DRYML supports ERB scriptlets, but allows you to hide them away behind nice clean custom tags, leaving you with beautiful clean templates [swoon] where you can see what’s going on at a glance
DRYML Details Defining a tag essentially just creates a new helper method for you, and a use of that tag is nothing more than a call to that helper. This is just syntax. Witness: hello_world.dryml <def tag=&quot;hello&quot;>Hello World!</def> <p>Here it is: <hello/></p> <p>And here it is again: <%= hello %></p> Groovy baby :-) (check out the  Hello World  post to see how to get set up so you can try this) And just as you can call a tag from Ruby instead of mark-up, you can define them in Ruby if you wish. You can do so in your helpers. Try this app/helpers/application_helper.rb module ApplicationHelper include Hobo::DefineTags def_tag :from_ruby do &quot;As easy as that eh?&quot; end end
DRYML Details That will give you a <from_ruby/> tag in all of your DRYML templates. If your tag contains more code than mark-up, it’s cleaner to define it in a module like this. You could even define the tag in a helper module and call it from an ERB scriptlet, but that would be kinda strange… Hey — knock yourself out, it’s all good :-) I’m trying not to get ahead of myself because there’s a  Quick Guide to DRYML  coming right up. I just want to show you that this is just a thin layer on top of your regular Rails template. They’re just purdier is all.  Actually there’s a lot more under the hood in DRYML — it’s not just syntax. We’ll get there.
CRUD Details The generic controller. A standard implementation of the CRUD actions that can be used out-of-the-box in a large majority of cases. The idea is that the concrete controllers that make up an application will need no custom code at all — just a few declarations: I need an auto-completer for this attribute, an ajax-setter for that one… I don’t see why this can’t be done. Of course if an application needs to do something unusual, then sure you might want a custom action or two. But a huge number of apps are really nothing more than a web-interface to a database, and nearly all apps have at least some parts that fit this description. There are a couple of challenges though. Firstly, what should these standard actions render? It’s all very well to have a single URL that you hit to, say, create a new event in your calendar, but depending on where in your app you’re coming from, you’re likely to want a different page (or ajax update) to follow.
CRUD Details Simple answer - parameterize it. Have the browser request “create me a new event, then refresh parts a, b, and c of my page”. That functionality is now part of Hobo and seems to work great. As well as getting us closer to a fully generic controller, this idea has also yielded a very simple approach to ajax. Another problem I’ve hit is that sometimes an application feature requires a whole graph of related models be created in one go. The solution to that one has been to extend the way ActiveRecord handles the hash you pass to MyModel.new. With Hobo’s ActiveRecord extensions, that single call to new can set up arbitrary relationships with other models, either existing or new. Hobo’s approach will make ajax programming easier than with anything else out there.
Getting started http://www.hobocentral.net Download plugin Look at screencasts for quickstart Read the blogs Read the forums
Contributing Upload code to SVN Create documentation Create sample applications and tutorials
Thank You Thanks to Tom Locke and others for creating Hobo. Please email me your feedback at evarist@gmail.com

More Related Content

PPTX
Laravel ppt
PPTX
Getting started with laravel
PPTX
Laravel overview
PPTX
Laravel Tutorial PPT
PPTX
Laravel Eloquent ORM
PPTX
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
PPTX
Introduction to laravel framework
PDF
Laravel presentation
Laravel ppt
Getting started with laravel
Laravel overview
Laravel Tutorial PPT
Laravel Eloquent ORM
Laravel development (Laravel History, Environment Setup & Laravel Installatio...
Introduction to laravel framework
Laravel presentation

What's hot (20)

PDF
Laravel tutorial
PPTX
API Development with Laravel
PDF
Laravel - The PHP Framework for Web Artisans
PPTX
Laravel introduction
PDF
Web Development with Laravel 5
PDF
Laravel Introduction
PPTX
A introduction to Laravel framework
PPTX
Introduction to Laravel Framework (5.2)
PPTX
Laravel 5
PDF
Why Laravel?
PDF
Getting to know Laravel 5
PPTX
Intro to Laravel
PDF
Laravel 5 Annotations: RESTful API routing
PDF
Laravel 5.4
PDF
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
PDF
Laravel
PDF
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
PDF
Laravel and CodeIgniter: pros & cons
PDF
Laravel Restful API and AngularJS
ODP
Projects In Laravel : Learn Laravel Building 10 Projects
Laravel tutorial
API Development with Laravel
Laravel - The PHP Framework for Web Artisans
Laravel introduction
Web Development with Laravel 5
Laravel Introduction
A introduction to Laravel framework
Introduction to Laravel Framework (5.2)
Laravel 5
Why Laravel?
Getting to know Laravel 5
Intro to Laravel
Laravel 5 Annotations: RESTful API routing
Laravel 5.4
Adventures in Laravel 5 SunshinePHP 2016 Tutorial
Laravel
An Introduction to the Laravel Framework (AFUP Forum PHP 2014)
Laravel and CodeIgniter: pros & cons
Laravel Restful API and AngularJS
Projects In Laravel : Learn Laravel Building 10 Projects
Ad

Similar to What Is Hobo ? (20)

PDF
Html5 deciphered - designing concepts part 1
PPTX
Introduction to whats new in css3
PDF
Html5 tutorial
PDF
Html5 - Tutorial
PPT
Ruby On Rails Tutorial
PDF
Html5 tutorial
PDF
Html5 tutorial
PDF
Html5 tutorial
PDF
Html5 tutorial
PDF
Html5 tutorial
PPT
Ruby On Rails Siddhesh
PDF
html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf
PDF
HTML Tutorial
ODP
Drupal: blog and beyond
PDF
Frontend Interview Questions PDF By ScholarHat
PPT
Drupal - Introduction to Drupal Creating Modules
PPTX
Website development-osgl
PPT
Agile Development With Hobo
PDF
An Seo’s Intro to Web Dev, HTML, CSS and JavaScript
PPT
Html & CSS - Best practices 2-hour-workshop
Html5 deciphered - designing concepts part 1
Introduction to whats new in css3
Html5 tutorial
Html5 - Tutorial
Ruby On Rails Tutorial
Html5 tutorial
Html5 tutorial
Html5 tutorial
Html5 tutorial
Html5 tutorial
Ruby On Rails Siddhesh
html5 _ Fundamentals a Basic Concepts of Understanding HTML.pdf
HTML Tutorial
Drupal: blog and beyond
Frontend Interview Questions PDF By ScholarHat
Drupal - Introduction to Drupal Creating Modules
Website development-osgl
Agile Development With Hobo
An Seo’s Intro to Web Dev, HTML, CSS and JavaScript
Html & CSS - Best practices 2-hour-workshop
Ad

Recently uploaded (20)

PDF
Nante Industrial Plug Factory: Engineering Quality for Modern Power Applications
PDF
Tata consultancy services case study shri Sharda college, basrur
PPTX
Project Management_ SMART Projects Class.pptx
DOCX
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
PDF
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
PDF
Introduction to Generative Engine Optimization (GEO)
PDF
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
PDF
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
PPTX
Slide gioi thieu VietinBank Quy 2 - 2025
PDF
Booking.com The Global AI Sentiment Report 2025
PPTX
Negotiation and Persuasion Skills: A Shrewd Person's Perspective
PDF
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
PDF
Digital Marketing & E-commerce Certificate Glossary.pdf.................
PPTX
TRAINNING, DEVELOPMENT AND APPRAISAL.pptx
PPTX
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
PPTX
2025 Product Deck V1.0.pptxCATALOGTCLCIA
PPTX
basic introduction to research chapter 1.pptx
PPTX
interschool scomp.pptxzdkjhdjvdjvdjdhjhieij
PDF
Cours de Système d'information about ERP.pdf
PDF
Tortilla Mexican Grill 发射点犯得上发射点发生发射点犯得上发生
Nante Industrial Plug Factory: Engineering Quality for Modern Power Applications
Tata consultancy services case study shri Sharda college, basrur
Project Management_ SMART Projects Class.pptx
Handbook of Entrepreneurship- Chapter 5: Identifying business opportunity.docx
Family Law: The Role of Communication in Mediation (www.kiu.ac.ug)
Introduction to Generative Engine Optimization (GEO)
Robin Fischer: A Visionary Leader Making a Difference in Healthcare, One Day ...
THE COMPLETE GUIDE TO BUILDING PASSIVE INCOME ONLINE
Slide gioi thieu VietinBank Quy 2 - 2025
Booking.com The Global AI Sentiment Report 2025
Negotiation and Persuasion Skills: A Shrewd Person's Perspective
Satish NS: Fostering Innovation and Sustainability: Haier India’s Customer-Ce...
Digital Marketing & E-commerce Certificate Glossary.pdf.................
TRAINNING, DEVELOPMENT AND APPRAISAL.pptx
svnfcksanfskjcsnvvjknsnvsdscnsncxasxa saccacxsax
2025 Product Deck V1.0.pptxCATALOGTCLCIA
basic introduction to research chapter 1.pptx
interschool scomp.pptxzdkjhdjvdjvdjdhjhieij
Cours de Système d'information about ERP.pdf
Tortilla Mexican Grill 发射点犯得上发射点发生发射点犯得上发生

What Is Hobo ?

  • 1. What is Hobo ? Evarist Lobo [email_address]
  • 2. Introduction Hobo is an Open Source extension to Ruby on Rails which helps you build full blown web applications incredibly quickly and easily. Available as a Gem or Rails plugin. Builds on other available plugins Hobo provides a simple, clean and elegant development framework which allows for rapid prototyping or production of the most sophisticated web applications. Created by Tom Locke
  • 3. Main Features Rapid implementation of dynamic Ajax interfaces in your application with no extra programming. Switchable themes. Customise and tweak your application structure and layout to meet any design goals. Powerful mark-up language, DRYML, combines rapid development with ultimate design flexibility. The end of the cookie cutter blues! Rails extends Ruby Hobo extends Rails !
  • 4. Audience Hobo is a powerful tool for professional web developers who want to speed up the creation of rich, complex applications, as well as simple ‘off the cuff’ prototypes. Hobo is great for designers too because the concise and elegant DRYML code makes design changes a snap to implement. Newcomers to Ruby on Rails can use Hobo as a fast and easy way to learn and practice agile, iterative application development.
  • 5. What can Hobo do? Hobo is nothing but extensions to Rails! There’s nothing that Rails can do that Hobo can’t. DRYML Ajax Rendering Hobo Rapid Tag Library ActiveRecord Permission System
  • 6. What can Hobo do ? Cross-Model Search Switchable Themes User Management (Acts As Authenticated) ActiveRecord Composable Query Mechanism Generic Model Controller (CRUD Support) Migration Enhancements ID Names
  • 7. What is DRYML? A powerful tag and template language Tags can be composed of other tags Contains anything you can put in an XHTML page Simpler to use than Erb Comes with a large number of helpful tags Looks like HTML
  • 8. Ajax Rendering Integrated with Scriptaculous Comes with an editor integrated Very simple to use Ability to mark a section of your page as a “part”. Having done this, Hobo will track the object that was in context when the part was rendered, and can re-render the part using the new state of that object when requested.
  • 9. Hobo Rapid Tag Library A tag library is basically just like a load of Rails helpers, but as DRYML tags instead of methods. Hobo Rapid contains the Hobo equivalent of link helpers, form helpers, ajax helpers, and pagination helpers. There’s also some “scaffold-like” tags for default pages, and support for navigation bars.
  • 10. ActiveRecord Permission System Just a simple convention for declaring who’s allowed to do what to your models (create, update, delete and view). The permissions come into effect in two places: in customizing the views, and in validating http requests. View customization is provided in the tag library. The output of various tags is dependent on permissions.
  • 11. Cross-Model Search Fairly simple but useful. Models can declare which columns are searchable (there are sensible defaults of course!) and Hobo provides both server and client-side support for a nice ajaxified search that finds many types of model from a single search page.
  • 12. Switchable Themes A Hobo theme consists of public assets such as a stylesheet and images, and some tag definitions. The tags define the basic HTML structure of the various theme elements - the overall page, header and footer, navigation bar, sidebars, panels (boxed sections within the page) etc. Themes are switchable by changing a configuration variable.
  • 13. User Management (Acts As Authenticated) In order for the permission system to work, a user model must be present. For that reason we decided to go ahead and include AAA in Hobo. The user model has been merged with Front controller The user model methods that are not commonly changed have been moved out into a module to keep your user model clean. Hobo also adds the concept of a guest user, this is a pseudo model that is not stored in the database. It’s just a place to define the permissions for someone who has not logged in.
  • 14. Front controller Hobo’s “front” controller gives you your front page and related pages like search, login and signup for FREE ! Also creates associated pages in the view You can customize them using DRYML
  • 15. ActiveRecord Composable Query Mechanism It’s common practice with ActiveRecord to write query methods to capture standard queries your application needs beyond the magic find_by_* methods. You are to be able to compose queries: find everything that matches this query or that one; find the first record that matches some query and some other one.
  • 16. CRUD Support generate hobo_model_controller <model-name> Hobo derives the model class from the controller class name The basic CRUD methods are created: index, show, new, create, edit and update also has support for your has_many and belongs_to associations
  • 17. CRUD support Support for your associations when creating / updating models. When you post (create) or put (update), you can set both has_many associations and belongs_to associations. You can either pass the id of an existing record, or pass entirely new records in nested parameter hashes. There’s support for all this in DRYML and Hobo Rapid
  • 18. Data filters Data filters allow you to expose composable query mechanism to the web A page with all the people not in the group with id 7 would then be available at /people?where_not_in=group_17
  • 19. Enhanced autocomplete Rails supports Scriptaculous auto-completer through the helper auto_complete_for Hobo’s version is enhanced to work with the data filter mechanism. Hobo Rapid has an auto-completer tag
  • 20. Remote procedure calls Write an action in your controller as normal. Add web_method <method-name>. Hobo will add a route for your method, and apply a before filter so the object in question is already available in @this. Hobo’s AJAX mechanism supports updating the page with results from your method, and there’s integration into the permission system too.
  • 21. Alternative show methods Alternatives to the standard view show_method :profile create app/views/users/profile.dryml. You also get a named route person_profile so you can call person_profile_url(fred) and get the URL back.
  • 22. Migration Enhancements This is a little one, but very useful. In create_table calls, you can add columns like this t.string :name, :subject, :limit => 50 instead of t.column :name, :string, :limit => 50 t.column :subject, :string, :limit => 50 There’s also t.auto_dates that gives you updated_at and created_at, and t.fkey :zip, :zap That will give you integer columns zip id and zap id Has been used in latest version of Rails
  • 23. ID Names In ActiveRecord everything has a numeric ID. It’s common however, that models also have an identifying name (e.g. a name column where every row is unique). If a model has an ID name like this, it’s nice to be able to sometimes use it instead of the numeric ID, for example in readable URLs. If your model declares hobo_model, you can also declare id_name <column-name> If you don’t specify a column it defaults to name. This gives you a read/write attribute id_name which is just an alias for the column in question. You also get find_by_id_name on the class.
  • 24. ID Names If you are using Hobo’s model_controller you can then use names instead of IDs in your URLs, e.g. (using ID names in combination with the associations support): /categories/News/posts The helper object_url will generate this kind of URL too - if the object you pass supports ID names.
  • 25. DRYML Details DRYML: The Dont-Repeat-Yourself Markup Language. In case you hadn’t guessed, we’re intending to bring a higher level of re-use to Rails’ views. Why? Rails already has a bunch of mechanisms for re-use within views. Namely: layouts, partials and helpers. Each serves a different purpose, and yet, IMHO, there’s still a gap. I find that small fragments of mark-up tend to crop up over and over in my views. Yes I could extract them into paritals or helpers, but I find myself disinclined to do so. Helpers are good for small bits of dynamic content, but not so convenient for re-use of HTML fragments - I don’t really want to embed loads of HTML in strings in Ruby source. Nor do I want to make excessive use of the tag helper. I want to put mark-up in mark-up files. .
  • 26. DRYML Details So partials would be appropriate. But each partial needs it’s own file, which again discourages me from making heavy use of them. If you ever needed to call a helper passing in HTML mark-up in the parameters, that’s HTML within Ruby within HTML — not pretty. ERB doesn’t need fixing. DRYML supports ERB scriptlets, but allows you to hide them away behind nice clean custom tags, leaving you with beautiful clean templates [swoon] where you can see what’s going on at a glance
  • 27. DRYML Details Defining a tag essentially just creates a new helper method for you, and a use of that tag is nothing more than a call to that helper. This is just syntax. Witness: hello_world.dryml <def tag=&quot;hello&quot;>Hello World!</def> <p>Here it is: <hello/></p> <p>And here it is again: <%= hello %></p> Groovy baby :-) (check out the Hello World post to see how to get set up so you can try this) And just as you can call a tag from Ruby instead of mark-up, you can define them in Ruby if you wish. You can do so in your helpers. Try this app/helpers/application_helper.rb module ApplicationHelper include Hobo::DefineTags def_tag :from_ruby do &quot;As easy as that eh?&quot; end end
  • 28. DRYML Details That will give you a <from_ruby/> tag in all of your DRYML templates. If your tag contains more code than mark-up, it’s cleaner to define it in a module like this. You could even define the tag in a helper module and call it from an ERB scriptlet, but that would be kinda strange… Hey — knock yourself out, it’s all good :-) I’m trying not to get ahead of myself because there’s a Quick Guide to DRYML coming right up. I just want to show you that this is just a thin layer on top of your regular Rails template. They’re just purdier is all. Actually there’s a lot more under the hood in DRYML — it’s not just syntax. We’ll get there.
  • 29. CRUD Details The generic controller. A standard implementation of the CRUD actions that can be used out-of-the-box in a large majority of cases. The idea is that the concrete controllers that make up an application will need no custom code at all — just a few declarations: I need an auto-completer for this attribute, an ajax-setter for that one… I don’t see why this can’t be done. Of course if an application needs to do something unusual, then sure you might want a custom action or two. But a huge number of apps are really nothing more than a web-interface to a database, and nearly all apps have at least some parts that fit this description. There are a couple of challenges though. Firstly, what should these standard actions render? It’s all very well to have a single URL that you hit to, say, create a new event in your calendar, but depending on where in your app you’re coming from, you’re likely to want a different page (or ajax update) to follow.
  • 30. CRUD Details Simple answer - parameterize it. Have the browser request “create me a new event, then refresh parts a, b, and c of my page”. That functionality is now part of Hobo and seems to work great. As well as getting us closer to a fully generic controller, this idea has also yielded a very simple approach to ajax. Another problem I’ve hit is that sometimes an application feature requires a whole graph of related models be created in one go. The solution to that one has been to extend the way ActiveRecord handles the hash you pass to MyModel.new. With Hobo’s ActiveRecord extensions, that single call to new can set up arbitrary relationships with other models, either existing or new. Hobo’s approach will make ajax programming easier than with anything else out there.
  • 31. Getting started http://www.hobocentral.net Download plugin Look at screencasts for quickstart Read the blogs Read the forums
  • 32. Contributing Upload code to SVN Create documentation Create sample applications and tutorials
  • 33. Thank You Thanks to Tom Locke and others for creating Hobo. Please email me your feedback at evarist@gmail.com