Topic: Strategy to modularize application into parts (engines, gem?)

Hi All,

I had a question that I wasn't sure where to start with.  I'm developing a large application that has several related parts.  The application is a platform for writing, editing, and reading articles and consists of three parts, which (I believe should) share one database.

1.  Writing platform allows authors to write, save, etc articles.
2.  Editing platform allows editors to review the authors' work and approve / revise
3.  Reading platform allows readers to read the work that has been written and approved

We're looking for a sustainable and scalable way to develop this modularly.  Currently, we are struggling with how to best accomplish this.  We have all three apps running independently now (as proofs-of-concept), but in order to make it all work together, there will be shared models, data, etc.

What is the best way to go about this?  Should we develop a gem that holds all the shared models?  Write the three apps as engines in a larger app?  Use git submodules?

Thanks for your help!
P

Re: Strategy to modularize application into parts (engines, gem?)

I implemented a gem (engines) solution including the models and the business logic because I had a distributed solution (different servers for different parts of my app but I wish I had implemented a sinatra type solution or just including the business logic in modules as a gem.

When I get round to re-writing my apps for Rails 3.1 I will make a decision on either a sinatra type server and have my apps integrating with this or modules containing just the business logic in the form of gems but either way is good and my requirements probably differ greatly from yours

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)