Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Improve dependency management by splitting into multiple plugins #19

Open
pdeffendol opened this issue Oct 13, 2010 · 2 comments
Open

Comments

@pdeffendol
Copy link
Owner

Back in the old days (before I was involved) the spatial_adapter was actually two plugins, one for PostgreSQL and one for MySQL. Then it was merged a while before I took over maintenance. However, the merged plugin has some serious dependency problems that cause me to question that decision.

  1. I can't add the necessary gem dependencies (the pg or mysql gems) because few (or none) of the plugin's users will want to install both of them.
  2. Adding more database adapters only makes the problem worse.

Despite a little bit of common code, I'm inclined to split into postgresql_spatial_adapter and mysql_spatial_adapter once more. Suggestions for reducing duplication, or alternate solutions, are welcome.

@ps2
Copy link

ps2 commented Oct 15, 2010

I think that probably makes sense for most people. We currently support multiple databases, so we'd have to install more plugins with this setup, but I think you're right that it solves some issues and is cleaner dependency-wise.

I would suggest considering a parent gem that all the adapters are dependent on, not just to reduce code duplication, but also to present a single place where we can document the API, and coordinate API changes.

@pdeffendol
Copy link
Owner Author

Honestly, I would suggest using the RGeo library - it's more current, better maintained, and supports more databases, using separate gems.

http://virtuoso.rubyforge.org/rgeo/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants