dimitarvp

dimitarvp

It’s probably worth looking into compiling to WASM at one point – it’s a huge task, I know, but it would be more in line with where things seem to be going.

4
Post #21
bartblast

bartblast OP

Creator of Hologram

Yeah, definitely, I agree.

1
Post #22
bryanjos

bryanjos

That’s true and I think there’s room for a hybrid approach. Something that starts out mostly as JS and transitions more and more to WASM as it matures.

6
Post #23
gregjohnson

gregjohnson

Thanks @bartblast … Suggest using this forum for discussions/suggestions and reserve GitHub issues for “demonstrable Issues” and/or enhancement requests as per Phoenix framework · GitHub?

Understand you’re pressed for time … happy to help with add/edit/enhance docs and examples once a standalone project bare bones structure is in place.

Thanks again for 0.1.0!

3
Post #24
josevalim

josevalim

Creator of Elixir

I want to clarify this section a bit. This sentence only applies if you try to use LiveView for client-only interactions, but the docs are very clear that you should not use LiveView for that.

I am aware that you know this, I am commenting to avoid confusion in other threads. :slight_smile:

Assuming you have to hit the server, for example to talk to a database, LiveView response time is actually better than regular HTTP requests because it works over an existing authenticated web socket connection. So the work of parsing headers, authenticate users, etc is not done on every server interaction. Hologram and LiveView should be similar here, as both are WebSockets based.

Similarly, Fly.io gets you closer to your users, which means any server-based application could benefit from Fly.io.

In other words, LiveView is for server based interactions and it excels at that, with or without Fly.io. Indeed, for more complex cases on the client, then you need custom JS (or something that aims to fully cover both server and client, like Hologram).

20
Post #25
bartblast

bartblast OP

Creator of Hologram

Thanks for the clarification @josevalim. I can see how some folks could get confused by this section.

1
Post #26
Sebb

Sebb

You just posted about this in the Client-side rendering, server-side state thread.

There are some nice developments there how you can ease the pain of request/response and syncing state. (which is already perfect with LV, but there are use cases that can’t be done with LV). It’s not clear how Hologram handes this. Sure, the state is on the client, but what if I need (parts of) it on the server. I see there is command, but in the example its not used (or by some magic). Will we have completely separate states on server and client with Hologram?

And also some good news for you:

Until someone manages to create quantum internet (e.g. by taking advantage of entanglement), there are no workarounds for this problem. Not sure if this is even technically possible, though

No, you’ll be safe from that.

1
Post #27
bartblast

bartblast OP

Creator of Hologram

Yes, you’re correct - commands are for running backend or async code, e.g. database access, filesystem, etc., commands are not transpiled automatically (only actions are). Commands receive params and may return action, but there is no state kept on the server.

0
Post #28
Eiji

Eiji

I’m curious on how do you plan auth working with it. Server should be able to handle both guest and logged in users and it should be aware of which one has submitted data in login form. :thinking:

How does offline SPA would work with for example routing? Would it be possible to render other template (here named page like MyPage) when app would be disconnected, but offline application cached data locally in some storage? :file_cabinet:

Also it would be worth to have:

  1. A fallback action which is called when SPA application is disconnected as it would allow the application to fail, call said fallback action and therefore notify user that x feature requires connection to internet. :arrow_backward:

  2. server states for current page (like count) and all pages (like current_user) :brain:

Also I saw 0.2.0 in Projects tab, but there is only information that ~half tasks are done. Do you have some “lazy” estimates (like this month/summer/year)? :clock:

Your roadmap is interesting. Do you plan to use Github releases? I saw you don’t have any even for version 0.1.0 and I would like to subscribe it in my RSS reader. :smiling_imp:

Anyway, I’m waiting for more news, documentation and examples. :+1:

0
Post #30
bartblast

bartblast OP

Creator of Hologram

Auth will use session data. I haven’t gotten to work on session yet, but I’ve got a few ideas:

  • session will be accessible through commands at all times and on page init (so only through the server for security reasons)
  • stored in HTTP-only cookie or database

It would be possible to implement offline SPA if all pages are downloaded in a bundle and client storage is used. But I’m not targeting this behaviour in the initial phases. In the beginning, redirecting to a new page will require a connection with the server. But at least once the page is loaded it can work offline provided the client doesn’t load new data from the server through commands. Eventually, client storage (such as IndexedDB or local storage) could be used to improve this. It could work similarly to mobile apps - once there is a connection the app syncs the data with the server backend.

As for the Projects tab it’s not up to date, at one point I decided that it creates too much overhead at the moment since I work on this myself, and right now I’m using plain old OmniFocus for project management (this will change when there are contributors).

Note also that the roadmap is not up to date. For the past few months, I’ve been working on a rewrite full time, which fixed all pressing issues and actually, most of the syntax is already done. Sorry for the confusion! I’ll get back to the roadmap once I get to rewriting the browser tests of the features listed on the roadmap.

Yeah, I’ll probably use GitHub releases eventually.

Version 0.2.0 with full Elixir syntax support (except the stuff related to parallelism), with a demo app and with a basic “getting started guide” will be done this summer.

1
Post #31