▲ | bartblast 4 days ago | |||||||
Yes, absolutely! Hologram can work on top of Phoenix and coexist peacefully with LiveView in the same app. You can have some routes handled by LiveView for server-rendered interactions, and other routes handled by Hologram for client-side interactions that need to work offline or on low bandwidth. The session data is shared between them, so users can seamlessly move between LiveView and Hologram pages while maintaining their authentication state and other session information. This is actually a really nice migration path - you don't have to rewrite your entire app. You can gradually move specific features to Hologram where offline support or instant responsiveness matters most, while keeping LiveView for parts where server-side rendering is enough. For your offline/low bandwidth requirements specifically, Hologram is perfect because once the JavaScript is loaded, all the UI logic runs locally. No more waiting for server roundtrips on every interaction, and the app continues working even when connectivity is spotty. | ||||||||
▲ | bdunks 3 days ago | parent | next [-] | |||||||
I've just read through the entire documentation end-to-end. It's very clear and well written, thank you for the time and love. One thing that's unclear to me in how I might manage this "side-by-side coexistence": how you manage potential route conflicts, e.g., You have a Hologram "page" that defines `route "/hello-world"`, and the Phoenix application router.ex also defines a route, `live "/hello-world', MyApp.HellowWorld, :index`. I could imagine the lack of a central router may be offset through conventions of how you organize pages (perhaps a directory-based-routing convention). I saw in the Installation section that it's common to organize under `app/`, and `app/pages`. Maybe an expansion on best practices for larger project organization, and how you keep Hologram routes straight, would be interesting to other people as well. Regardless, I've just started dipping my toes in the elixir and phoenix ecosystem about 3 months ago, and it's been a real joy. I'm throwing every hobby project I can think of at it to learn more. I'll give hologram a spin -- thanks again for such clear documentation. | ||||||||
| ||||||||
▲ | dsiegel2275 4 days ago | parent | prev [-] | |||||||
Thank you for the reply! I will be looking into this for sure. |