Nefcairon

Nefcairon

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]

Showing Posts 15 to 6

wallyfoo

wallyfoo

I would rather pet a live scorpion than style one more login form. I crossed my burnout threshold years ago.

Phoenix makes web development tolerable for me, but I foist off as much front-end stuff as I can these days. Why can’t I just build systems in peace?

TwistingTwists

TwistingTwists

I don’t understand “analysing code” part. What does that mean?

Point me to a good link / book / docs ?

dimitarvp

dimitarvp

Not convinced it can. We need tooling that is able to analyze code. And I am not sure Elixir has that?

TwistingTwists

TwistingTwists

So , macros in Elixir could accomplish what we are trying to achieve in Homoiconic language, right?

Just that macros might be needed to run in iex shell, rather than bash.

Also, mix might come to rescue, if it can run macros as well as tasks from terminal.

I am thinking somewhat correctly?

dimitarvp

dimitarvp

You would need a homoiconic language, i.e. manipulate code as if it’s data (gross simplification). Not many languages are such. For example, Elixir is not, and LISP is.

It’s not easy to have a context-aware program that rewrites another program. Furthermore, Elixir also doesn’t have a standard – but IMO that’s not a problem because the generated AST by the compiler is fairly stable.

I’d love working on something like this but alas, no free time and energy in the last 2 years.

dimitarvp

dimitarvp

Appreciate the diligence, thank you.

LostKobrakai

LostKobrakai

This sounds very much like GitHub - ash-project/ash: A declarative, extensible framework for building Elixir applications. · GitHub might be up your alley, though it seems quite API focused at the moment.

TwistingTwists

TwistingTwists

On above :

  1. I hope more people are thinking this way. Is there something being worked upon on these lines?

  2. What would one need to know to make such a thing? A library ? Extension to Phoenix? Or contributing to original Phoenix project? Any leads / must-reads appreciated.

TwistingTwists

TwistingTwists

So relatable to me as a young dev :rofl:.

Where Next? Top

Trending in Discussions Top

AstonJ
As the title says, please share what you’ve been up to with Elixir. Whether that’s been learning it, looking into it, making stuff with i...
2977 94592 917
New
cblavier
Hey there, It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
heathen
Quite interesting article Google brought me. Didn’t find any mentions about it here. What do you think in general? Would you use togethe...
New
mhanberg
Hi everyone! The first release candidate for the Expert language server project is now available! We’ve published a press release detai...
New
AstonJ
Since we have deprecated our Erlang sections (as we have dedicated Erlang Forums now) let’s add this thread for those who’d like to post ...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New
maennchen
:warning: Security advisory: Decimal DoS vulnerability A vulnerability has been published for decimal where very large exponents can cau...
New

Other Trending Topics Top

JesseHerrick
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
netoum
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews