Markusxmr
Since Drab has been developed for a while in the open, introducing the Liveview functionality in a way it happend appears to undermine the Drab efforts and in a way contradicts the ElixirConf 2018 moto that the future is in the hand of the community.
Am I missing something obvious with their differences?
Trending in Discussions
Hey there,
It’s been more than a year since we started using LiveView as our main UI library and building a whole library of UI componen...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Hi there! :wave:
@frigidcode and I (but mostly him) have been running an Elixir Book club, we’re almost done with Designing Elixir Syste...
New
I’ve been using Emacs as my main code editor for more than a two years. It’s a custom build version although I’ve tried doom emacs and sp...
New
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with.
But I don’t use it anymore.
Serverless was the promis...
New
Other Trending Topics
Backend Developer for Elixir (F/M/D) - Shape the Future of Sports Photography with Us!(German Version below)
About us
We are athletes –...
New
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
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
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
Just published claude-code-elixir, a plugin marketplace for Claude Code with Elixir support. These are the plugins I’ve been using for my...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
josevalim
The fact two things tackle the same problem do not mean they are the same. I believe Drab put the focus on events, as they say, it is about accessing the browser User Interface from the Server Side. I believe LiveView put the focus on the state and re-rendering the same template when the state changes, sending diffs to the client instead of events. It could be seen as React on the server.
The two approaches are very distinct on how they solve the problem. The closest to LiveView is Texas VDOM, which was also announced at ElixirConf 2018.
Regarding the future is on your hands, there are two things to observe. First of all, the fact we have now three tools tackling the same problem shows the power of the platform. Once you make solving hard problems trivial, different solutions exploring different trade-offs will show up. The other part is that LiveView is equally part of the community as Drab.
We should not be worried about people exploring different solutions in the same space, regardless of what comes first and what comes last. Sometimes those experiments fail, other times multiple suceed. For example, if anybody stopped working on a type system because I was working on one, then it would have been a mistake, since my approach to the problem completely failed. If Chris did not create Phoenix because I was working on Dynamo at the time, it would have been a mistake. Even if LiveView already existed, we should have equally welcomed Drab too. Etc, etc. Let people experiment.
Markusxmr
Got it. Thank you for your reply
grych
LiveViewis actually very similar to Drab withDrab.Live, as I understood.In the first clock example, the difference is that when you return:
from the msg handler, and Drab.Live uses function
pokewith side effect. In this case, with Drab, Chris would write:The advantage of Drab.Live is that it is not sending the whole page, just a changed part, but as Chris said, it will change in the future.
Also, the
phx-event bindings are similar todrab-bindings, the difference is just a semantics - I am using named functions as the event handlers, Chris uses generalhandle_event, so for his plus/minus example in drab it would look like:Thus, there is no point to develop Drab anymore, as most of its functionality will be built in the Phoenix.
I might take the part with direct manipulation on the DOM (Drab.Element, Drab.Query), and develop a small library with this functionality.
l00ker
I just watched the video of Chris’s talk last night and he indicated that
LiveViewwould be developed independently from Phoenix and therefore wouldn’t ship as a dependency or as part of Phoenix itself.But I do see your point though. The focus will probably shift to developing
LiveView.I think I speak for many of us in this community when I say THANK YOU! @grych for all of your hard work and effort in developing Drab and paving the way. You proved that the idea was a solid one. Great work!
josevalim
Thanks, I actually forgot about Drab.Live - you mentioned it to me in our conversation a couple months ago.
I believe it also renders a template then? Is the template rendering happening on the server or client?
I think my original point still stands though: there are three different approaches right now and I would suggest the cross pollination of ideas to continue. You probably won’t all agree on the APIs and trade-offs and you probably want to try different ideas out (for example, how much data to keep on the client vs the server, which template engine to use, etc). If you want to take a break until the other tools get more mileage for a more in-depth discussion, that is totally fine too, especially because LiveView is completely vaporware at this point. And I already said this earlier but it doesn’t hurt to repeat: thanks for Drab.
Zesky665
There is just one little thing that bugs me about this. Is the drab page or an equivalent going to be ported to Phoenix.LiveView once that hits the ground. It would be an incredibly useful piece of documentation.
Also thank you for Drab, It’s easily been the best phoenix library I’ve ever used
grych
Yes, exactly. It just do not sent the whole html back, but rather the small portion and modifies only the required element. Elements to be changed are analyzed and marked during the compilation process (this is why I introduced custom eex engine), so Drab exactly knows which assign is in which element (and where in the element: in body, in attribute or even in property).
There are probably few things LiveView may borrow from Drab, as it was a lot of discussion on API and features in this forum. For example, element properites. I did it with @ mark before attribute name:
this preserves type, so you may assign any jsonable stuff.
Let’s be realistic: it will grow in a moment because of the characters behind
. I was doing Drab mostly myself, I can’t compete with you guys. I hope some Drab ideas will live in the LiveView!
cnck1387
It sounds like you have a ton of real world experience with this problem area. I can’t speak for everyone but I would definitely appreciate if you put your knowledge towards making LiveView better once it’s been open sourced.
At the end of the day, having a bunch of library choices is cool but really, having a library that most people are on board with (such as Phoenix when it comes to being a web framework) really makes the development experience and community better in the long run.
When undertaking a new project, no one really wants to sit around for 4 days bikeshedding and researching whether to use intercoolerjs, drab, unpoly or stimulus. We just want to make kick-ass apps.
grych
Sure I am willing to help.
AstonJ
Thank you Tomek for all your hard work and continual effort in helping push the boundaries - I can’t wait to see how your experience will help LiveView and what groundbreaking project you’ll be working on next!