Makes little difference to me, it has been few years now that I create API backends consumed by separated frontends, them being either CLI or JS etc. If anything for me this approach has done wonders for e2e tests using api mockservers But probably for simpler projects and new starters makes sense But I would really suggest anyone out there just to avoid backend-frameworks-based view/templating (guess json responses…
> But I would really suggest anyone out there just to avoid backend-frameworks-based view/templating (guess json responses are view layers) layers Are there client-side rendered frameworks that can match the developer productivity of Phoenix or Rails for early stage, small team products? It seems they are still the best for small teams moving quickly in the early phases of a project.
Phoenix 1.7 is View-less
181–190 of 224 posts
Re: Phoenix 1.7 is View-less
#182Re: Phoenix 1.7 is View-less
#183Earlier quoted context omitted.
> Elixir is a very nice language to write distributed systems in. Functional in all the right places plus it has OTP. This is the biggest blocker for introducing Elixir to any company I work at. I don't want to become / hire experts in the OTP and the Erlang VM. I'm ignorant about it in general, but my feeling is it's not only a new language, it's built on abstractions that I'm not sure I'm comfortable owning or oper…
The abstractions you need to critically know are map and reduce. It's not functional like Haskell, the limit at which you need to "think about it being functional" is that a value inside a variable can't change from underneath you when you pass it to a function. It pretty quickly changes from "I have think about values not chamging" to "I don't have to worry about values changing"
Re: Phoenix 1.7 is View-less
#184Re: Phoenix 1.7 is View-less
#185Earlier quoted context omitted.
Correct. You could rig something up in probably 2-3 days if that was super important for you. I did manual typing at the edges and that sufficed for me.
Well yes, not sure why I got downvoted, if I use a language called TypeScript it may be because I think type checking is important. Having to call tsc separately from my dev/watch process is not a good developer experience. Same as with ... dialyzer :) But for sure, that would decimate esbuild performances.
My comment on value is mainly one of "all or nothing". I think a manual typing at the edge is probably sufficient for most people.
That said, you could implement all of your forms and events as structs or schemas and rig up a piece of the dev process to convert them into types. I think many in Elixir would view it as overkill so it hasn't been done afaik. But I also think it could be implemented very easily and then you'd have end to end typing.
Re: Phoenix 1.7 is View-less
#186Earlier quoted context omitted.
I'm hoping to see more patterns in the forms space. I spent 18 months building a product in LiveView (didn't work out in the end) and complex forms were one of the most difficult things. I got really good at creating them in the end, but it was all homegrown patterns that I don't think I'd want to push on others. My favorite (and fairly simple) pattern was emitting an event from server to client to get the client to…
What kind of forms were you creating? How to handle forms ergonomically has been a central interest of mine since 2003 and I like hearing about what people try and how it works for them.
Re: Phoenix 1.7 is View-less
#187Earlier quoted context omitted.
The integration is still there and it is mentioned in our assets guide: https://hexdocs.pm/phoenix/asset_management.html#third-party... Regarding import maps, I am still slightly skeptical. First they don’t solve all needs of npm (for example, what if you need to precompile your FE code?). Second, I have feeling that every import map management tool will eventually become a package manager through slowly creep in of…
Is the plan to keep esbuild (and npm integration) for the long term, or would that be deprecated in a few years?
But also keep in mind that Phoenix is not tied to any of these. The esbuild bits are only part of the generated app, which you can stick to or change altogether.
So when we moved to esbuild, we broke zero of the existing apps and no deprecations were emitted. The same would happen if we move away from esbuild.
As an example, I moved most of my apps to esbuild (and I have been very happy with it), but one still uses webpack because it uses the Monaco editor and we rely on certain plugins. So our approach has always been “sane defaults” but not getting in the way if you know better or prefer something else.
Re: Phoenix 1.7 is View-less
#188Earlier quoted context omitted.
I hear this about big JS codebases but the 7 year old Elixir app I work on is many 10s of thousands of lines of code and we just don’t have that problem.
It's not nothing but it's rare. After about two years I finally had a type error. It wasn't horrible, though, just caused extra log lines.
Re: Phoenix 1.7 is View-less
#189Earlier quoted context omitted.
Could even switch over to Bandit which was on a recent Thinking Elixir podcast > In recent performance tests, Bandit's HTTP/1.x engine is up to 5x faster than Cowboy depending on the number of concurrent requests. When comparing HTTP/2 performance, Bandit is up to 2.3x faster than Cowboy https://github.com/mtrudel/bandit
I don't think that 1.7 is going to really have bandit fully supported on launch: https://github.com/phoenixframework/phoenix/pull/5071 Once it is supported though, I will be on that for sure.
Re: Phoenix 1.7 is View-less
#190Earlier quoted context omitted.
Could even switch over to Bandit which was on a recent Thinking Elixir podcast > In recent performance tests, Bandit's HTTP/1.x engine is up to 5x faster than Cowboy depending on the number of concurrent requests. When comparing HTTP/2 performance, Bandit is up to 2.3x faster than Cowboy https://github.com/mtrudel/bandit
I don't think that 1.7 is going to really have bandit fully supported on launch: https://github.com/phoenixframework/phoenix/pull/5071 Once it is supported though, I will be on that for sure.