pillaiindu
What will be the best practice for doing AHAH in Phoenix?
AHAH means Asynchronous HTML over HTTP.
Replies with code examples will be much appreciated.
Thank you!
Most Liked
benwilson512
Of the top two google hits for me, http://www.openjs.com/articles/ajax/ahah_asynchronous_html_over_http/ is a 7 year old article, and talks about how ajax returns XML, and http://microformats.org/wiki/rest/ahah references stuff from 2005, so maybe the approach is a little dated?
Conceptually though I think live view might be relevant, in that you just have the server push HTML. Can you elaborate about what you’re trying to actually accomplish though?
mindok
WebSockets is the default transport for LiveView, but you can configure it for longpolling (I haven’t tried)
And yes, either LiveView (Phoenix LiveView: Interactive, Real-Time Apps. No Need to Write JavaScript. - DockYard ) or Drab (Drab: Server Side User Interface Access) are what you are looking for. Search elixirforums for LiveView or Drab for more info - there is plenty around, and some great samples
pillaiindu
I was thinking about how to make something in a way that there are partial updates to the pages but the user’s browser isn’t forced to calculate the json into html markup. Ahah is actually easier for the browser than the Ajax and now when there are faster Internet connections, ahah is more relevant than ajax.
I think pjax also uses Ahah under the hood.
in Rails when you’re loading something into a div using pjax, you send only the partial for that div, not the whole web-page. How would you do that (in a pragmatic way) in Phoenix?
Popular in Questions
Other popular topics
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
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance









