mardi 14 avril 2015

Rails : Namespacing vs Engines?

I am just getting started in a Rails project after a long time in the PHP world.


This project is in a very early stage, meaning that is a good time to do major changes, and currently comprises two different rails modules, one for administrators and one for users, both in separate rails instances. What I would like to do is to merge both projects into a single rails instance, which I believe it will improve the manageability of the application in the long run.


Both instances share the same database and each of them has a devise model for authentication. I have been documenting myself about ways of merging both projects and I came up with two alternatives: the first would be to create two namespaces, one for users and another one for admins, and share the model and framework logic. the second one would be to create engines for admins and users, which seems to be cleaner but much more complex.


I have read a lot documentation and I am experimenting with rails, but at this point I am in need of a more experienced opinion.


Thank you in advance, and I appreciate your thoughts on this.


Aucun commentaire:

Enregistrer un commentaire