Hobo and Rails 3
Posted by
Tom | August 6, 2010 12 Responses comments

If you’re paying attention, you’ll know Domizio Demichelis as the contributor of some big improvements to Hobo’s internationalisation. Well Domizio has jumped in and is now taking over from where Bryan left off in the push to Rails 3 compatibility. Welcome aboard Domizio!

Domizio is going to let us know how he’s getting on via some short posts here on the blog. He just sent me his first thoughts, so over to Domizio:

Porting Hobo to Rails 3

The new Rails 3 compatible version of Hobo is on the go. It has been 15 days now that I am involved in the project, and it looks very challenging. Rails 3 introduces a lot of improvements, but also a lot of changes that inevitably break the legacy code. Hobo is not an exception: it is deeply interacting with the Rails internals, so the last version got deeply broken as well.

I can only guess the huge amount of work that it will take to make it work, but the result will absolutely be worth the effort: thanks to Rails 3 the new Hobo will have less code, less monkey patching and more efficiency and flexibility.

Hobo becomes a Rails 3 engine.

Thanks to rails 3 engine capability a lot of code has moved to better places and will be loaded at a better time. All the patches to the frameworks are loaded right after the framework with ActiveSupport.on_load hooks. All the code that needs reloading in developer mode has its own place to live in the config.to_prepare blocks. The programmer will have more choices to configure Hobo internals with the config.hobo.* configuration variables, the code will be more organized and easier to maintain.

New routes system for Hobo 1.3

The old ModelRouter has gone: it was drawing routes directly. The new system generates its own roues file and adds it to the routes_reloader.paths, so no monkey patching is needed anymore. The hobo_routes.rb file may be analized by the programmer that can eventually override any route in the regular routes.rb file.

Reader Comments Add your comment »

Awesome news. Would be great if you can extract hobo_fields into it’s own standalone, Rails 3 compatible engine (i.e. the model field declarations and the migration generation tool), so that it can be used outside of a Hobo app, as this is what I find the most useful!

Yes, the plan is to allow hobo_fields to be used standalone as part of the migration to Rails 3.

Thanks, Domizio!

Hobo is awesome! I’m using Rails 3 for everything now, but wondering if it’s a good idea to build a new app in Hobo 1.0, with the eminent Rails 3 version coming. Will there be a smooth upgrade path for Hobo 1.0 code, or will everything need to be re-coded? Will it be similar to the process of upgrading a Rails 2 app?

I would just like to say I admire your (Tom et al) work on Hobo a lot and have been tracking your development since the begining.

I’ve played a little with Hobo but couldn’t do any “real work” with it yet (I work mostly on a pretty big project which is not a very good candidate for Hobo as it is now). But I think it is how “the future” for web app frameworks is going to be. I think most of the underlying ideas of Hobo are brilliant and elegant (yet simple), I’ve studied some and used in my own “Hoboless” solution (ie: the permission mechanism).

I would really love to see Hobo reach the mainstream and gain momentum, I think releasing separate plugins is a great way to reduce the barrier of entry and learning curve (yet I am waiting for years for that DRYML sweetness…).

Better yet, some of Hobo needs to go into Rails core. Hobofields specially and urgently, if “fixes” AR migrations and makes them really simpler and easier to maintain. I think the Rails core team is getting a lot more open to new ideas and the Rails 3 release shows that. Isn’t it time you start working together?

Keep up the great work!

It would be great to get hobo fields into Rails core, but the politics of that is unknown territory. Any help would be appreciated…

However, getting hobofields into a Rails 3 generator form is almost there…

It would be great to get hobo fields into Rails core, but the politics of that is unknown territory. Any help would be appreciated…

However, getting hobofields into a Rails 3 generator form is almost there…

@railsfanatic – there will be some work to do to get your Rails2/Hobo app to work with Rails3/Hobo, but it won’t be anything like “everything needs to be re-coded”.

We are planning to publish an upgrade guide that should make it easier.

This is great guys — is there any timeline for when we will start to see beta drops of your Rails 3 work ?

I am just starting rebuilding a very comprehensive rails 2.0 website which is getting along in years. This will be a major revision: two generations delta in OS, Ruby 1.9.2, Rails 3.0, Hobo ?.?. I would be willing to work with “Hobo edge” if such a thing existed since the website needs considerable work so this won’t be a quick project.

Is there any estimate on when the version of Hobo that is compatible with Rails 3.0 – even a preliminary alpha version – will be available?

Thanks,

Don

Don. Rails 3 work is getting close. We’re hoping to have a beta out in the next couple of weeks.

I’m starting a project with it :)

Loving the look of Hobo and starting from scratch having only learnt Rails 3. I notice that the documents provided are for prior versions and do not detail changes to things like Viewhints.

Is there any updated docco for 1.3 and Rails 3?


Write a Comment

Please do not use blog comments for support or reporting bugs.

Please use the hobousers google group for help and support.

Comments are formatted using markdown. To include code, either quote it in `backticks` or indent a code-block by 4 spaces.