4
votes

I'm quite new with Elixir / Phoenix and I'm wondering how to bring Rails engines features-like in Phoenix.

What I want is simple, I want to be able to create a core app, let's say a tiny crud application.

I want to be able to import the features (controllers, views, models) of that app in a new fresh phoenix app (a clone), so basically everything is extented from my core app. I can run the fresh new app and everything will work as the core app. I want to be able to hook / extend the core features with the new app created (make a new migration / model, tweak some views and so on ...).

I heard about umbrella projects, but I'm not sure it's the right way. Do you have some articles / tutorials / leads to implement what I'm trying to do ?

1
This might be of interest to you (doesn't answer everything, but could be a start if you didn't already know about it): hexdocs.pm/phoenix/Phoenix.Router.html#forward/4Dogbert

1 Answers

1
votes

Umbrella Apps are fine, but as Chris presented - the real use case for them is to have another storage.

If you do have a rails app and you want to use its features on Phoenix - go and check out reverse proxy apps.

If you want to do it in opposite direction - use rails app with Phoenix features - read this great article about it.