Forum: Ruby on Rails Maintaining Multiple Versions of App

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Scott B. (Guest)
on 2007-06-26 22:47
(Received via mailing list)
I'm working on a major Rails project who's code base continues to grow.
The
client wants to have two different versions of the software, with some
features in common between the two, and some features diverging. I'm
trying
to figure out the best strategy for easily maintaining the features the
two
have in common, while allowing for differences as well.

Ideas:
 - Subversion "branches", doing diffs and merging to maintain
commonality
between both. (Seems like a nightmare.)

 - One codebase, w/ configuration settings and if/else statements
depending
on which version is running. (Also seems like a nightmare.) For example,
the
following type statements littered throughout the code:

   if version == "A"
     # do version "A" logic
   elsif version == "B"
     # do version "B" logic
   end

 - Rails plugins and modules. Seems like the best way, but I'm not sure
the
best way to structure it. Differences will be mostly minor, but at all
levels (views, controllers, models emails)

Any feedback or shared experiences would be great.

Thanks,

--
Scott B.
Electro Interactive, Inc.
Blog: http://synthesis.sbecker.net
Brian H. (Guest)
on 2007-06-27 01:50
(Received via mailing list)
SVN branches is one way...

another way is to use SVN Externals  to manage the common code between
many
apps.

Another option is to move common models, etc into plugins which can be
shared.
Nicholas H. (Guest)
on 2007-06-27 16:16
(Received via mailing list)
Another option is Engines: http://rails-engines.org/
This topic is locked and can not be replied to.