Today I wrote my first Refinery CMS plugin.
It’s available here: refinery-geolocation
A very basic PHP to Ruby on Rails to RefineryCMS plugin based on the Google Maps API example. I’m extremely please with how simple plugin creation is for this CMS system. I find plugins to be a bit daunting, generally, so I’ve steered away from creating my own. Often the case is there’s already a fully functional (and well developed) plugin already in common use.
Refinery is a Ruby on Rails based Content Management System. It’s open-source and quite “young” by web technology standards. However, it’s a lot more flexible and very far from bloated compared to other systems I’ve used in the past. It takes the Rails Way as everything is by convention instead of configuration and any functionality you might want to change you can override, whether it’s via a plugin or otherwise.
Here’s what it basically looks like.
It was an interesting challenge in that I still haven’t figured out a database-agnostic way to query the database so for now we’re stuck with using mySQL to store the geo-points.
I also removed much of the google ajax as I’m far more comfortable with how jQuery handles things.
I am sure there’s room for optimizations and improvements, but so far I’m happy with the results.