M3rl1n-init

M3rl1n-init

Phoenix.liveview, CDN and elm

I would like to know if anyone knows how live view will effect the CDN and other caching mechanisms. I know and understand that the changes will be treated as dynamic in nature. This means that we will update the cache each time there is a change. If your CDN supports it then only the diff will be sent to the browser.

How does live view work with elm is another cquestion. I like the concept but I need to ensure I have elm components within my application as this simlified things. The problem is how these should be embeded and what is the best strangey.

I know that elm attached a runtime to the JS file. The runtime is delivared each and every time. The runtime is small but does this mean it will be sent for each and every compiler. I also know that we can not interact with the dom from with elm soI suspect issue with the UI system.

To sumurise:

LiveView when it comes to caching and rendering ?

Elm and working with liveview ?

Most Liked

easco

easco

LiveView would, by in large, be delivering HTML. That HTML might include hyperlinks (e.g. a link to an image) and the browser would have to fetch the associated content. If that content lived on a CDN (if the image was stored on a CDN) then the browser would fetch it from there.

Elm is a client-side framework for calculating and working with client-side generated HTML. If your HTML is generated client side then it would not be delivered via LiveView.

easco

easco

Webpack has tools called ‘loaders’. A loader tells it what to do when it encounters a particular file. Usually you tell it to recognize files by regular expression patterns in the config. Your config would says something like “if you see an include for a file that ends in .elm, then use the elm loader”. The elm loader would compile the file and susbstitute the JavaScript.

Where Next?

Popular in Questions Top

electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
Lily
In templates/appointment/index.html.eex: <%= for appointment <- @appointments do %> <tr> <td><%= appoi...
New
stefanluptak
Hello everybody, usually, I use a 29" ultra-wide monitor for VSCode which can easily accomodate explorer (files panel) + file with code ...
New
vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
romenigld
I am trying to run a deploy with docker and I successfully runned with this command: docker build -t romenigld/blog-prod . but when I t...
New

Other popular topics Top

KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
Brian
What is the proper way to load a module from a file in to IEX? In the python world, doing something like this pretty standard: from ....
New
dokuzbir
I want to highlight html closing tags when i click a html tag. That works in .html files but doesnt work for html.eex templates. How can...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 44265 214
New
AstonJ
Posting this to see if we can make things easier for people to get into Neovim. If you use Neovim and have a favourite distro please let ...
New

We're in Beta

About us Mission Statement