Status

Location
Arlington, VA
Subscribe to GeoRSS Subscribe to KML


Rails

Mapufacture

Published in Rails, mapufacture


I’ve gotten more involved with the GeoRSS efforts and various tools to use GeoRSS for aggregating geodata. After Where2.0, I started working on a project with Mikel Maron for consuming and mapping GeoRSS feeds.

The project is Mapufacture. You can subscribe to feeds, create maps as collections of feeds, and share maps with other users. It’s still in very active development (one could call it beta, but I won’t), but is usable. Guilhem Vellut is the person responsible for the very nice mapping via YM4R_Mapstraction library. If you’d like to give it a try and give feedback that would be great.

Here are some examples of useful maps created with Mapufacture:


How does a Framework Scale and not splinter?

Published in Rails, Ruby


One of the discussions that came up at BarCamp Grand Rapids was how can a framework (and language) scale and grow, without splintering too much. There were a disproportionate number of Java developers present, and one of the few complaints they had about Java was the large number of frameworks that were available. None had a market dominance, or clear set of features. Every week new frameworks pop up.

Compare to the few of us that were Rails proponents. Currently, Rails is the only Ruby framework with any market share (are there even any others?). The question was, in the future will more Ruby frameworks show up, steal market/mind-share, and splinter the community. Diversity is good, new ideas help spur innovation. However, large fracturing confuses new developers and makes support and interoperability difficult.

One definite way to address this possible problem is by keeping the core framework simple and effective and having good support for extensions, plugins, and additions by other developers. Rails currently does this very well, and it looks like this will become even more solid in the future.

A Ruby on Rails Plugin Repository is being realized and should be fully supported soon. Luke Redpath has a good discussion on the current progress and future path. To date, the plugin repository has been wiki based, or required knowing the appropriate subversion repository for a plugin. This new effort will centralize plugins, promote proper documentation, annotation, and testing.

Perl has CPAN, an absolutely incredible repository of modules that has probably kept Perl alive and made it a very powerful language. Ruby Gems provide a very similar infrastructure for distributing great enhancements to the language. Hopefully, the Ruby on Rails Plugin Repository will keep the community united and working to support and build on a single framework while still allowing them to bring in their application specific features.


Export to Excel

Published in Rails


Need to quickly export some data to Excel? How about doing it in just a couple of lines of code?

Excel Export Plugin is a Rails plugin to do just that.

Install the plugin:
ruby script/plugin install http://svn.napcsweb.com/public/excel

Here is an example method:


def export_project_to_excel
  e = Excel::Workbook.new
  @project = Project.find(:all)
  e.addWorksheetFromActiveRecord "Project", "project", @project
  headers['Content-Type'] = "application/vnd.ms-excel"
  render_text(e.build)
end

Testing Rails Apps

Published in Programming, Rails


Just this past Monday, I was lamenting to the local Ruby Users Group (RUG?) that there was a dearth of good material on Rails tests.

Yesterday a great, succinct, and accurate article on Rails Test Driven Development showed up. The article even discusses using the Hpricot test helper.

I’ve been very remiss in adding testing to most of my rails projects. Now I really have no excuse.

Technorati Tags: , , ,


Making your Rails project setup easier

Published in Programming, Rails, Ruby


Luke Redpath has come up with a brilliant, and simple solution for having to install a large set of standard Rails plugins with each new Rails project. Rails Plugin Packs™ is a YAML file defined set of plugins that his Plugin will then go through and install.

Therefore, you can build up your set of Location based plugins, such as:

Plugin Packs


about:
  name: Mapping Pack
  description: A set of mapping and geocoding plugins
  author: Andrew Turner
  email: rails@highearthorbit.com
  website: http://www.highearthorbit.com
plugins:
  ym4r_mapstraction:
    source: svn://rubyforge.org/var/svn/ym4r/Plugins/Mapstraction/trunk/ym4r_mapstraction
  GeoRuby:
    source:
  metacarta-geoparser:
    source: http://opensource.agileevolved.com/svn/root/rails_plugins/unobtrusive_javascript/tags/rel-0.1
  yahoo-geocode:
    source: http://opensource.agileevolved.com/svn/root/rails_plugins/navigation_mappings/trunk

about:
  name: User site
  description: Plugins for a standard site with users for authentication and basic cms
  author: Andrew Turner
  email: rails@highearthorbit.com
  website: http://www.highearthorbit.com
plugins:
  acts_as_authenticated:
    source: http://svn.techno-weenie.net/projects/plugins/acts_as_authenticated
  comatose:
    source: http://mattmccray.com/svn/rails/plugins