Hello,
After coding with ruby on rails 2005-2010 I tried to have fun with web development again by trying to use elixir/phoenix 2016 and again 2018. Both times I lost interest after some time. Not that I switched technology-wise, I completely ditched web development at all, thinking that its still not as advanced as I want it to be.
Recently I realized why (at least the main reason).
First, I really think that phoenix is great. Creating a small web application is done pretty quickly. But maintaining and extending the project is a hard task for me - it gets cumbersome as the project grows.
I want to give you an example: When I need to display the contents of a database table on a web page in a so called data table I create the necessary files and functions and declare all the html+css stuff (and maybe include an additional js framework for some fancy behaviour). That’s simple.
But: In one of the next features I certainly want to display another table that should have exactly the same look & feel. So I am reusing what I created before and do a lot of copy & paste. After a few features I end up having a lot of files that all contain almost the same lines of code, just with small differences. This is the opposite of DRY. And whenever I leave my project for a few days, I have a hard time to recall what happens where and each time I want to change the look & feel I have to change it in several files (of course I always miss some).
While I structure and refactor my elixir code by using functions, my frontend stuff just bloats.
What I need to re-enjoy web development is to be able to create a UI component once and easily be able to reuse it as often as I wish. I just want to drop in a data table and tell it the data source it should display and have some options that determine its behaviour (sortable columns, multi or single selection, paging or infinite scrolling, filters etc.).
Is it just me that this is extremely fatiguing? Or are there already solutions/techniques that I just missed?
[Through the last months I came across many concepts that maybe are what I am looking for, but I just cannot put them in relation and neither appear to be simple to use / have a shallow learning curve:
Web Components
Polymer
VUE/React
Material Components
Phoenix.(Live)Component
Surface
Maybe someone wants to shed some light on these]