DEV Community

Discussion on: Who's looking for open source contributors? (April 9 edition)

makiten profile image

Looking through out of curiosity, since I started learning Elixir in February, but is the reason for not using a frontend framework because you're using phoenix_html? I tried porting an app to Phoenix, and it was possible, but not particularly enjoyable using a frontend framework if you're using HTML views with Phoenix.

Thread Thread
suprnova32 profile image
Patricio Cano

Not really. The main reason for not using a frontend framework is that I really dislike Javascript. Unfortunately you cannot have a good looking application without it, so I use it sparingly.

And yes, HTML is rendered in the backend, so I use EEX views, and regular controllers. If AlloyCI were a Rails app, the same approach would have been taken.

In my opinion, the less Javascript code needed, the better. This is also the reason that we use Phoenix Channels to send pre-rendered HTML when needed (this is used when loading your repositories from GitHub, for example). This way I don't need an AJAX call. When the /projects/new page is called, the controller starts a background job to fetch your repositories from GitHub. Once the job has that data, it renders it as HTML and sends it to the "frontend" via a websocket. The JS code needed for this to work is minimal, so 👍