Megatomix
Is it possible to program backend with pure elixir (direct SQL in BD) without frameworks? What are the challenges or problems?
Trending in Questions
I’m working on a project that simulates the bumbl example in the programming phoenix book. It acts almost like an email client. We have a...
New
Hello,
I know there is an approach for handling lists that allows for optimized traversal, but I can’t recall the specific method (somet...
New
Documentation
While reading the Scoped Routes section, I noticed that the documentation currently refers to a problem without explainin...
New
Hi everyone,
I am toying with the idea of building a “match maker” for giving personal help to people that wants to start coding.
I sta...
New
So my question is quite simple and i have found no conclusive answer on forum, google or AI.
Should we use :erlang.float for Integer to ...
New
I recently noticed that Elixir’s Logger defaults its primary log level to :debug when no :logger, :level application configuration is pre...
New
I’m new to elixir and just tried to install the elixirLS extension for VScode(ium) and it is throwing some errors that I would like help ...
New
Other Trending Topics
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
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi there! We created Gust: A task orchestrator inspired by Airflow.
For those who have never heard about Aiflow, it’s a Python-based wor...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
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
- #ecto-query
- #ai
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #api
- #forms
- #elixirconf-eu
- #metaprogramming
- #hex











Showing Posts 1 to 10- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
lpil
Hi Megatomic! Welcome to the forum!
There’s no need for any specific library or framework to make a backend in Elixir, it just means that you have to make more decisions about what conventions and patterns to employ, and you may need to implement some functionality that the frameworks might otherwise offer.
At my previous workplace we had Elixir services that didn’t use the Phoenix framework or the Plug webserver abstraction, instead we just used the Elli web server (which has a very simple interface). We could have also done the same with Cowboy if desired.
The Raxx web server would have also been a good fit, we went for Elli as Raxx didn’t have middleware at the time.
The service that had a postgres database used Ecto, though if writing it again we might have instead opted to use the Postgrex library directly as we didn’t find Ecto offered much in that specific use-case. Our tech stack was quite diverse so we found that keeping things as simple as possible and using as few libraries and macros as possible made maintenance and on-boarding easier.
So yes, it is possible to implement a backend in Elixir without frameworks.
What’s a BD?
sribe
Sure, as another example, I use Phoenix for routing etc, but not ecto: phoenix + postgrex.
Megatomix
PostgreSQL
Megatomix
I intend to use PostgreSQL
tnks
NobbZ
Postgres is a RDBMS, relational database management system. I’ve not yet heard someone classifying it as a BD.
Could you therefore elaborate on that term?
Megatomix
Sorry: a failed act at writing
BD = DB
BD in portuguese, DB in english (DataBase)
joelwallis
Hi @Megatomix,
I don’t see any blocks that would keep you from interacting directly with a database, without using a library. I also don’t see a good reason to not use a library such as Ecto, tho. Why would you like to do such a thing?
By the way, the answer for your question is YES. It’s completely possible to interact with databases directly. You would still have to deal with the issues that libraries like Ecto solve, but assuming you have a good reason to do so, and your preference for Postgres, I would advise you to take a closer look at
postgrex, the package that allows you to interact with Postgres using Elixir.hauleth
Yes.
Less pleasant API and that will probably be it.
dimitarvp
And crying yourself to sleep because you don’t have proper queries, joins and aggregations which you will inevitably need no later than two weeks in the project.
lpil
SQL query builders such as Ecto are just one approach to querying a database, other options are available, and in some other ecosystems these options more popular.
Personally I am a fan of writing plain SQL and have written a small library to make this a bit more convenient in Elixir. GitHub - lpil/yesql: An Elixir library for using SQL. · GitHub