kingdomcoder
Hello.
- Is offline support for LiveView features anywhere in the pipeline for the Pheonix core team?
- Is there somewhere discussions around this are ongoing? I’d love to be part of it.
Thanks.
Trending in Discussions
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...
New
@chrismccord : I just saw the Extract AGENTS.md from Phoenix.new into phx.new generator commit to the phoenix project.
My initial shotgu...
New
I was working on an Ecto migration and I needed a timestamp. So, for the nth time, I looked up the different data types for timestamps, a...
New
Just a general thread to post chat/news/info relating to AI/ML stuff that may be relevant for Nx now or in the future. Got anything to sh...
New
I just stumbled on a newly redesigned elixir-lang.org. :tada: It looks like @Software_Mansion did the work, and I think it is generally a...
New
There has been a thread to discuss the Stack Overflow Developer Survey on this forum every year since 2018, so here’s yet another one for...
New
Fly’s CEO posted this recently - Turn And Face The Strange · The Fly Blog
It says that Fly is going all-in on sprites, which is a worry ...
New
Other Trending Topics
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
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Hello everyone. After busy few months I am happy to announce v0.1.0 of Emerge & Solve.
They are GUI (Emerge) and State management (S...
New
Corex is an accessible, unstyled UI component library for Phoenix that integrates Zag.js state machines using Vanilla JavaScript and Live...
New
Emily is an Elixir library that runs Nx computations on Apple’s MLX. Install it as the default Nx backend and Nx, defn, Axon, Nx.Serving,...
New
While I am working on the Language Agnostic Code Audit SaaS, which uses MetaAST (spoiler: I am expecting it to be in a good shape for ann...
New
Latest Phoenix Threads
Chat & Discussions>Discussions
Latest on Elixir Forum
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #blog-post
- #phoenix_html
- #iex
- #graphql
- #genstage
- #ai
- #elixirconf-us
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #metaprogramming
- #security
- #hex










First 10 of 26 Posts
wanton7
LiveView will never have offline support. It’s not because no one wants to do it, it’s because way LiveView works supporting offline is impossible. If you need to have offline support you need to use different technology.
benwilson512
Yeah as @wanton7 notes, LiveView is a serverside rendering technology. If the server isn’t available, rendering can’t happen.
kingdomcoder
Thank you for your responses.
I understand that at the moment, that’s the case- LiveView is strictly a serverside rendering technology.
Whether or not it plans to stay that way is what I wish to know.
Prior to LiveView, taking advantage of Channels with your favourite client-side technology seemed to be how far we could push the edge. Then LiveView happened. Now we don’t need a separate technology for that anymore.
I can imagine a path where the client-side state is maintained by the framework (Phoenix/LiveView) just like reinitiating the stateful connection is. It might be some baked-in JS functionality, but that’s up for discussion.
So, the question is whether that’s currently in consideration or it was and has been discarded.
wanton7
It’s not strictly server side. You can’t just do offline LiveView web apps. There is this new project GitHub - elixir-desktop/desktop: Building Local-First apps for Windows, MacOS, Linux, iOS and Android using Phoenix LiveView & Elixir! · GitHub that allows you to use LiveView to create mobile and desktop apps. But for strictly web browser based UI you need to have WebSocket connection connected to server for everything to work.
Qqwy
LiveView itself will probably never support client-only directly.
However, there are two developments in this space which might open up interesting possibilities in the future:
kingdomcoder
Thank you for clearing about being strictly server-side. You’re right about that.
But my question is still not answered.
I’m aware of Elixir-desktop and I follow its progress constantly. In fact, its example todo app illustrates what I’m curious about, albeit in a slightly different domain.
The todo app runs offline (desktop/mobile in this case) and manages its local state successfully.
Imagine the fictitious app developer adding a Phoenix backend to allow users to synchronize their todos across devices.
Can the server-side state be accessible to the app via WebSockets while the local copy takes over when there’s no connection, with both syncing when the connection is restored?
Returning to the web-browser based UI, the features I think are missing for LiveView to support the behaviour I described are:
These are the things that I’m wondering if they’re in the pipeline.
kingdomcoder
I have checked out lumen more than I have elixir_script but I think both offer up interesting possibilities.
The decision on which tool to use is of course up for discussion.
If the concept is being considered actively in the first place is what I don’t know.
Thank you for your response.
stefanchrobot
I think the answer is: yes, it plans to stay that way. The premise of LiveView is that you can cover most of the use cases for a web app without writing JavaScript. The basic interactions (navigation, form validation, etc.), require talking to the server. Theoretically I think one could imagine LiveView providing the frontend library that would keep the app working and sync the changes back on reconnect, but I don’t think it’s feasible in a generic way that would address most use cases.
If you need offline support, you need to write JavaScript. If you need to do that, then LiveView is not really what you’re looking for, though it may still be powered by Phoenix.
kingdomcoder
A very clear answer.
Thank you!
kingdomcoder
Front-end capabilities being “batteries-included” with Phoenix would be great though if it happens in the future.
It would transit Phoenix from being an “Elixir Web Framework” to simply being a “Web Framework”