Hacker News new | ask | show | jobs
by josevalim 1265 days ago
> - still evolving and releases are breaking (no backward compatibility)

To clarify, this is only true for LiveView which has not reached v1.0 yet. Even then, we have been careful with deprecations while exploring a new programming model with several new ideas.

In fact, Phoenix v1.7 is precisely the consolidation of those ideas. I’d say Phoenix v1.7 would be tagged as v2.0 in most web frameworks, but we kept it as v1.x exactly because it is still backwards compatible (and it has been so for 7.5 years!).

The last steps before LiveView v1.0 are likely forms (which you mentioned) and perhaps a better mechanism to stream with appending/prepending/replacing data.

Once it is out, we hope the remaining cons will be quickly addressed, except the boilerplate bits. The boilerplate is always a trade-off: if we hide too much, then the pieces become more coupled and it is harder to understand how they fit together. So I’d say Phoenix strikes the right balance here and if you have a highly formulaic application, projects like Ash may be to your taste. :)

2 comments

All web frameworks fail with forms one way or the other :)

I think one point would be the docs, to outline the basic cases, best practices. Maybe something tying the form helpers and changeset together.

I have a side project [0] with a form which have inputs dependant of others and a dynamic section (assoc).

I struggled a bit with the data, checking what I would get inside a changeset struct, until I "discovered" get_field and put_change.

For the assoc I was also a bit lost until I read an article using a delete virtual field. In the end I made it work but I still not sure I used all the right changeset functions.

To LiveView credits this app has been used all over the world and got very good feedback, nobody mentioned any lag issue etc (well, someone with a crappy connexion in Istanbul once got an incomplete uploaded file without getting an error).

[0] https://github.com/conradfr/FunkyABX

> but we kept it as v1.x exactly because it is still backwards compatible

I would say a big philosophical change like dropping Views is backward incompatible. You can’t use old tutorials now.

That’s one aspect. But I would say the fact that existing Phoenix apps can migrate to v1.7 and use other features such as verified routes without going through a major migration is an important aspect that should not be downplayed, especially when other frameworks may have gone through more than one major version in those 7.5 years and broke existing code more than once.