OneBody

OneBody Demo

Posted by: timmorgan on: July 29, 2008

Jacques Crocker has featured OneBody on the Open Source Rails site, and so graciously put up a live demo of OneBody at onebody.opensourcerails.com. (I had turned off the demo awhile back to free up some resources on my host.)

Thanks Jacques!

OneBody 0.7.0

Posted by: timmorgan on: July 23, 2008

I just merged the Refactor branch into Master and tagged the code as release 0.7.0. This is a big milestone for OneBody; lots of things have changed.

The wiki needs some major love, and I hope to get to that later tonight.

In short, some of the new features are:

  • Content Management System
    Use OneBody as your church website and your online directory.
  • Split Theming
    Use a different theme for your public website than for your directory, all from within the same software.
  • Export of People, Family, and Group data as either XML or CSV.
  • Import of People and Family data from CSV.
  • OneBody plugins allow for added functionality without hacking the core system.
  • Simplification of “Shares” into the “More” tab, along with easier picture uploading.

And tons more, including rewrites of nearly every controller to conform to the RESTful Resource pattern, tons more tests, and overall code cleanups.

And we’re not done yet! The OneBody team is growing and contributions are starting to roll in. Expect more great things in the days and weeks to come.

Auto Expiring Rails Caching

Posted by: timmorgan on: July 21, 2008

Rails has some pretty easy-to-use caching built-in. I don’t know about everyone else, but I know for me, the word “memcache” always scared me. It sounds like some ominous, mysterious, magical thing that takes a Ph.D. to understand.

Rails caching, on the other hand, is just Ruby. And I like Ruby.

But still, it seems to be lacking a useful feature, namely auto expiration of cached items based on a timeframe. Sure, since the cache (in my case at least) is just files on the filesystem, I could set up a cron script to remove files older than X hours or whatever. But that didn’t sound very cool. And I’m all about being cool you know.

So I hacked (and I really mean hacked) together auto expiring action caching for Rails. It works, and it works well for OneBody. But, there are some limitations:

  1. It only works with disk-based cache store.
  2. You must explicitly set the path where you want to store the cached content.
  3. I wrote it, so it’s probably not the “Rails way” of doing things.

But it works. Here is the code.

Using it looks like this:
class PeopleController < ApplicationController
  caches_action :show, :for => 1.hour, \
   :cache_path => "...something here..."
end

I would love to get some feedback. Is this worth anything to anyone?

Tags: ,

Routes

Posted by: timmorgan on: July 18, 2008

RESTful Resources kick butt, even if only for the simplicity of the route generation. Check out the difference between the Master branch and the Refactor branch…

config/routes.rb from Master:

config/routes.rb from Refactor:

Just about half the LOC… and much easier to follow.

Tags: ,

Refactor Branch

Posted by: timmorgan on: July 17, 2008

There hasn’t been much updating on this blog, but that doesn’t mean I haven’t been busy! A ton of work has been going into the “refactor” branch on GitHub. Check it out.

Some highlights:

  • Most controllers are now RESTful.
  • OneBody now has the concept of plugins (beyond Rails plugins) that can add functionality without hacking a lot of OneBody internals.
  • We now have a Content Management System. It needs some work, but soon I’ll be replacing our church’s website running on Plone with one running on OneBody.
  • Tons of tests. That means less breakage in the future.
  • Profile page caching. The heaviest database-hitting page on the site is now cached to speed things up a bit. Expect more caching on other heavy pages, i.e. Groups, soon.

None of these things are in the main OneBody branch yet. I like the freedom to change things drastically without fear of someone latching onto them. Give it a week or so.

That’s it for now. I’ll try to update the blog a bit more to keep you informed. Definitely watch the refactor commit log for the latest details, though.

Tags:

IRC Channel

Posted by: timmorgan on: June 5, 2008

Today I registered an IRC channel on irc.freenode.net called #onebody. Drop in if you’re interested in talking about OneBody development, need help with something, or just want to chat.

Tags: ,

Refactor Branch: REST and TDD

Posted by: timmorgan on: June 5, 2008

RailsConf 2008 was a great experience for this Ruby programmer. You can find all sorts of writeups about the conference in the blogosphere, so I’ll leave the details up to the more articulate.

In short, I came away a bit smarter, and having a better appreciation for two well-established disciplines I had used with little success in the past: RESTful Rails and Test-Driven Development. So much so that I am now convinced OneBody’s readability, maintainability, and potential for growth will be served well by moving the project in that direction.

On GitHub, you’ll see a new branch: refactor. I’m starting mostly with the PeopleController, pulling pieces out into other controllers, writing each one in a RESTful manner. All new controller work is driven by TDD, which should make OneBody a more solid platform for church social networking.

If you’ve been thinking about helping out with the project, now’s the time to jump in and help out. Any amount of help will be apreciated.

Tags: , ,

OneBody on Digg

Posted by: timmorgan on: May 6, 2008

If you get a chance, head over to Digg.com and vote for OneBody. This might help get the word out.

read more | digg story

Highrise & Twitter Integration

Posted by: timmorgan on: April 20, 2008

Some exciting integration work has been going on in OneBody. For the ministers and volunteers contantly working with and contacting people, we’ve implemented some simple contact syncing with the Highrise contact management/CRM product. Hint: click the “Sync” link near the top of any user’s profile page. This feature is only available to admins who have the “view hidden properties” permission, due to the privacy concerns.

For people on the go and/or Twitter lovers, we’ve added the ability to hook your install of OneBody up with a Twitter account for quick phone/address info lookup. Once all setup, users who have associated their Twitter accounts can send an IM or mobile text message like this to your church:

d cedarridge lookup tim morg

…and get in return something like:

9186152391 - Tim Morgan

See TwitterBot on the wiki for more details.

Next, we’re setting our sights on Planning Center Online

Deploy With Capistrano

Posted by: timmorgan on: March 31, 2008

We have a new wiki page up called DeployWithCapistrano.

Honestly, we should probably make deployment via Capistrano the standard way of installing OneBody, and we may very well do so in the future, but there is some learning curve involved. For now, we’ll leave it as an optional component.

Just keep it in mind when you start thinking man, there has to be an easier way to do this…