coladarci

coladarci

The future of upgrading phoenix / liveview apps with generated code

I’m really interested in the future of maintaining phoenix apps given the new practice of dumping generated code into a project versus separating things out as packages (something I think I love).

For example the phx.gen.auth (something that should never have to change, as José eloquently explained a while back when he wrote it). But for core_components I got bit pretty bad; all the form function components were re-written and the new generators require the updates to work. So now I have 20 generated routes (mix phx.gen.live) that work but any new generation will fail. My only recourse was to re-generate a brand new project and diff the core_components and carefully bring over the changes (since I modified the tailwind classes; something that feels reasonable). And even then, I had problems because it meant all my existing routes were broken, so I had to go back and re-write all of the live_views to handle things the new way. (I should note, I love the changes, big props to the change).

That said, there was no change log explaining it, upgrade path, etc…

Curious if I missed something or if others have thoughts on how we can improve this moving forward so we can continue to make phoenix + live view the best web development experience out there.

Most Liked

al2o3cr

al2o3cr

I’ve found PhoenixDiff very useful to see what’s changed between releases. It’s basically the diff versus a newly-generated app you described, only automated on a webpage.

15
Post #3
Schultzer

Schultzer

Yeah, there is a delicate balance for generated code vs. a library, where the former requires a higher maintenance cost, in that it’s not as easy for a developer inexperienced or not to increment a version number.

And I like your point about even when some generated code is not meant to change; from my experience, software changes over time.

coladarci

coladarci

Extremely helpful!! Yeah this is amazing and will help an awful lot for future upgrades.

Where Next?

Popular in Discussions Top

jswny
I would like to better understand what the advantages/disadvantages of umbrella applications are compared to structuring your app as as s...
New
Donovan
Hello everyone, I’m so glad to have discovered this awesome community. Thanks for creating it! This is my second post, and apologies for...
New
Jayshua
I recently came across the javascript library htmx. It reminded me a lot of liveview so I thought the community here might be interested....
New
mikl
I wanted to capitalize a string, and tried using String.capitalize(). That generally works well, until you try to capitalize a word like...
New
jeramyRR
This is an interesting article to read. Elixir’s performance, like usual, is excellent. However, it seems like the high CPU usage is co...
New
AngeloChecked
What learn first? Rust or Elixir Hi Elixir community! I’m here because i want learn a new language. I’m a junior developer and mainly i ...
New
lucaong
Hello Elixir and Nerves community, I have been working for a while on an open-source embedded key-value database for Elixir, that I call...
230 13924 124
New
lorenzo
Hey everone! I created a prototype for my app using Nodejs for the api. But the framework I chose wasnt great (in general theresnt any g...
New
tmbb
This is a post to discuss the new Phoenix LiveView functionality. From Chris’s talk, it appears that they generate all HTML on the serve...
342 18146 126
New
slashdotdash
Phoenix Live View is now publicly available on GitHub. Here’s Chris McCord’s tweet announcing making it public.
New

Other popular topics Top

vertexbuffer
Hello, can anybody help here..? I have a list of players and I what to delete an element, but every for loop the list is reverting to ori...
New
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a > b) do {:ok, "a"} end if (a < b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
jay1
Why is it that the mnesia database isn’t the most preferred database for use in Elixir/Phoenix?
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 52341 488
New
Qqwy
Original source of discussion: This topic on the Pragmatic Programmers’ Functional Web Development with Elixir, OTP, and Phoenix forum. ...
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New

We're in Beta

About us Mission Statement