<div dir="ltr">I have used engines and I think they're great for separating unrelated code as well as sharing common code. I did struggle a bit at the beginning (lots of googling) with setting up the app, creating database models in the engine and then installing them in the main app, engine versions, etc. But once I got it all working, everything was a breeze. <div><br></div><div>Best,</div><div>Artan<br><div><div><br></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><br></div><div><br></div><a href="http://lugolabs.com" target="_blank">LugoLabs.com</a><br></div></div></div>
<br><div class="gmail_quote">On 19 May 2015 at 10:37, Graham Ashton <span dir="ltr"><<a href="mailto:graham@effectif.com" target="_blank">graham@effectif.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Are there any relationships (in the business domain) between the data that the two apps deal with? I'm wondering whether it would (user interface and code-complexity issues aside) make sense to store them together. It could provide another useful angle on whether keeping things separate makes sense.<br>
<br>
If putting it all in one database sounds good (or at least, doesn't feel uncomfortable) I'd favour the cheapest approach approach to maintain that delivered a good end-user experience.<br>
<br>
I suspect that means I'd favour a single app, organising the code in namespaces, and sharing all the stuff that's common. It's easy to over engineer stuff like this, and force yourself to jump through costly hoops.<br>
<br>
Namespaces are great. In my experience, we Rails developers don't use them enough.<br>
<br>
If you're reluctant to use namespaces, is there a specific problem you'd be trying to avoid?<br>
<br>
Cheers,<br>
Graham<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
On Tuesday 19 May, Kerry Buckley wrote:<br>
<br>
> Hi LRUG,<br>
><br>
> I have a small Rails app used by a closed set of internal users, and am<br>
> about to create another, for the same users (or at least an overlapping<br>
> group). They've asked that the two apps (and potentially more over time)<br>
> are presented as one integrated front end, rather than users having to<br>
> visit multiple URLs, log in separately etc.<br>
><br>
> I'm wondering what the best approach to this is. I don't want to go to the<br>
> extreme of a JS front end with the Rails apps just presenting JSON APIs, so<br>
> the main options seem to be:<br>
><br>
> * Separate apps with matching layouts, and headers, with some kind of<br>
> single sign-on<br>
> * One big app with namespaced routes, controllers etc to try and keep<br>
> things vaguely separated<br>
> * Separate apps into Rails engines, mounted in a master app that manages<br>
> sessions etc<br>
><br>
> I'm kind of leaning towards the third option, but I've never used Rails<br>
> engines before, and I'm not 100% sure how that approach would work out. My<br>
> main concern is acceptance/integration tests – it seems to me like they'd<br>
> have to live in the wrapper app as most of them would rely on users,<br>
> sessions etc.<br>
><br>
> Has anyone had experience of this kind of thing, and if so, which of the<br>
> above approaches would you recommend (or discourage)? Is there a better<br>
> solution I've missed? I'm about to start spiking something with engines to<br>
> see how things fall together, but some opinions from someone who's done it<br>
> in anger would be great!<br>
><br>
> Thanks,<br>
><br>
> Kerry<br>
<br>
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<br>
> Chat mailing list<br>
> <a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
> Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
> Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
> List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
<br>
_______________________________________________<br>
Chat mailing list<br>
<a href="mailto:Chat@lists.lrug.org">Chat@lists.lrug.org</a><br>
Archives: <a href="http://lists.lrug.org/pipermail/chat-lrug.org" target="_blank">http://lists.lrug.org/pipermail/chat-lrug.org</a><br>
Manage your subscription: <a href="http://lists.lrug.org/options.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/options.cgi/chat-lrug.org</a><br>
List info: <a href="http://lists.lrug.org/listinfo.cgi/chat-lrug.org" target="_blank">http://lists.lrug.org/listinfo.cgi/chat-lrug.org</a><br>
</div></div></blockquote></div><br></div>