Hi guys I am new in Elixir programming. I bought some books and started to learn Elixir development. I have couple questions. First how can I use html form element id in elixir ? I mean how can I manage frontend stuffs with elixir? My second question is which databases supported by elixir?
What you are looking for is the Phoenix Web Framework.
There are good beginner guides on their Website: www.phoenixframework.org
Somebody else needs to answer the database question. But I see that Postgres is used in a lot of elixir projects and thats an excellent choice.
Thank you so much for response. To be honest I am looking for the way to use DOM elements in phoenix.
You might get better replies if you clearly define what you mean by “use” and “manage”. As it is now, your question is too vague for anyone to give accurate answer
If you’re using Phoenix, Ecto has a table of supported database. If you’re not using Ecto, there are many clients for any kind of DB out there, such as:
- Riak: riak-elixir-client
- Redis: redix, exredis
- Postgres: postgrex
- MySQL/MariaDB: mariaex
- Elasticsearch: tirexs, elastix
- and many more.
You should try searching for “elixir [your_database_name]” on Google; if the database is widely adopted, there’s a high chance that there’s a client for that.
That being said Phoenix doesn’t restrict you to using EEx templates - you can use frontend libraries, frameworks or systems like React, Angular 2, Elm, etc. as well.
Elixir applies for the most part to the backend and server-side templating.
There is ElixirScript as well but as far as I can tell for the time being that is even more niche than Elixir.
Are you looking to do rendering on the client on the server or both?
server side rendering than as people have already pointed out you can take a look at phoenix and eex templates.
client side rendering you can use whatever front end framework you find most appropriate the 3 biggest being React, Ember, Angular 2 (there are many other valid options like Elm etc.)
Server side and client side rendering well welcome to a world of pain you will need to select an appropriate solution based on your choice of front end framework e.g. Ember -> Fastboot, Angural 2-> Angular Universial, React -> there are a ton of options pick one you dislike the least.