SumOfUs / sumofus

0 stars 0 forks source link

Champaign as a Rails engine? #16

Closed NealJMD closed 9 years ago

NealJMD commented 9 years ago

This is a long term idea, but it's one that I just wanted to throw at the wall cause it just occurred to me. The awkward thing about Champaign as it stands as an open source project now is that it's actually a Rails app. To use it, you clone the repo and then you start editing to your heart's content.

That's weird cause if we release a new version of Champaign, there's no obvious way for an existing user to get those changes without doing some kind of crazy git voodoo to update their repo from ours. That bites us even more cause it's all the less reason for anybody to ever contribute to Champaign development - instead, they make enhancements they want to their own local repo, which can't be contributed back.

Instead, if Champaign was an engine like Devise, then the functionality wouldn't be copied over into a user's repo. Instead, the user would just include Champaign, and they would get the campaigning software, and then they could override whatever routes they wanted and include whatever static pages or other features they want.

It would also dramatically focus the scope of Champaign. Champaign would exist only to provide the tools for creating campaign pages and sharing tools and reporting signatures to ActionKit. Things like login support could be handled by Devise - but as a an engine on a parallel level with Champaign, not baggage that we bring along. Things like not supporting basic CMS functionality in Champaign makes more sense to me in this context too. It also would be a nifty way of separating SumOfUs.org from Champaign.

The problem I see is that it means to use Champaign, an org still has to build a Rails app. I could see maintaining a starter repo that has things like Devise and a CMS engine already hooked up, perfect for another org to clone, customize, and deploy. That way they would continue to get updated versions of Champaign and might even make PRs.

Tuuleh commented 9 years ago

I think the fact that Champaign is/could end up pretty monolithic has a lot of potential in driving people away from contributing back, even if they are interested in trying it out. I'm totally new to engines as an approach to mitigating this, but I think this is an important topic for conversation if we hope to take the open source aspect seriously.

EricBoersma commented 9 years ago

I'm actually going to step in quickly here and shut this conversation down, because I don't think it's the right time to have it.

To quote from the Getting Started Guide for Rails Engines:

Engines can be considered miniature applications that provide functionality to their host applications. A Rails application is actually just a "supercharged" engine, with the Rails::Application class inheriting a lot of its behavior from Rails::Engine. Therefore, engines and applications can be thought of almost the same thing, just with subtle differences, as you'll see throughout this guide. Engines and applications also share a common structure.

Essentially, the difference between Champaign as an Engine and Champaign as a monolithic application are not significant at this point (and I really want to stress the "this point" of that).

I think this (and to a lesser extent, yesterday's) conversation are pushing pretty far into the realm of hypothetical refactoring, where we're trying to solve problems we don't have yet while (at least for me, with the amount of time I spent on it yesterday) sacrificing the problems we need to solve right now. Put a different way: we can't solve update problems for organizations that don't know we exist until we solve the UX problems for campaigners that work with us every day.

I really don't like having to cut off conversation abruptly like this, but I'd like to do so before we get going on this one, but I really think we need to narrow our focus and stay aligned on solving the problems that we know are right in front of us right now.

Thanks!

NealJMD commented 9 years ago

Reopening so that we can see this again in November / December when it's time to extract Champaign from SumOfUs.org.

NealJMD commented 9 years ago

This issue was moved to SumOfUs/Champaign#126