I'm trying to get an initial understanding of what a full Elm application looks like. In particular what the "stack" looks like. As a concrete example, let's say I have a website that allows users to register/login and then upload pictures and comment on others' pictures and comments. It delivers HTML, JavaScript, and CSS, and uses PHP and/or Perl on the server, The PHP/Perl interacts with MySQL or Oracle. If I were to re-develop this site with Elm, what parts does Elm handle and what are the common/recommended choices for the rest of the stack?
Elm handles the frontend responsibilities. You can use it instead of javascript and use its libraries to generate the needed html & css.
For backend you can use whatever technology you want. Since Elm is a functional language, some people chose a functional language for the backend too. Most frequent I've seen are Elixir (Phoenix Framework) and Haskell.
Take a look at Tour of an Open-Source Elm SPA for a real world example of implementing an Elm frontend for an already available backend.
Elm is purely the front-end, so you won't need any php to create html code.
It provides broad coverage of standard HTML, but excludes service workers and some other modern web APIs - you can use javascript through Elm's foreign function interface (called Ports).
Elm has out of the box support for json from a REST environment, and powerful parsers if you need to use something else (e.g. xml). As Peter suggest, you might want to use a functional backend, but there is absolutely no necessity (I've Elixir and Node with success to date).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With