apoorv-2204
Design patterns for Hexagonal / Clean Architecture in Elixir (beyond Behaviour + Impl)
I’m experimenting with Hexagonal / Clean Architecture in Elixir. The classic Behaviour + Impl split works great for mocking and isolating IO—here’s a trimmed-down example from our SFTP adapter:
elixir
# Port (Behaviour)
defmodule Core.SFTP.Port do
@callback connect(map()) :: {:ok, term()} | {:error, term()}
@callback write(Path.t(), iodata()) :: :ok | {:error, term()}
@callback disconnect(term()) :: :ok | {:error, term()}
end
# Adapter (Impl)
defmodule Core.SFTP.Live do
@behaviour Core.SFTP.Port
@impl true
def connect(conf), do: SFTPClient.connect(conf)
@impl true
def write(path, data), do: SFTPClient.write_file(path, data)
@impl true
def disconnect(conn), do: SFTPClient.disconnect(conn)
end
I wanted to know what are architectural patterns in elixir , apart from behaviour and impl pattern
Popular Backend topics
C++: The Good Parts .
Jordan DeLong overviews the past, current and near future “good parts” of C++'s functional side through the colore...
New
If we remove syntax from the equation.
New
New
Just discovered Fika - looks pretty neat!
fn sum(a: Int, b: Int) : Float do
a + b
end
I quite like the syntax, though would probably ...
New
I’ve recently become interested in Elixir and all it’s neat perks. And since I’m currently working on a messaging platform; elixir seems ...
New
https://twitter.com/briandfoy_perl/status/1354535622069919748
This thread was posted by one of our members via one of our news source tr...
New
Intensively researching Erlang books and additional resources on it, I have found that the topic of using Regular Expressions is either c...
New
Hi all!, anybody tried this Elixir quiz from @Tetiana? She’s the one who made Elixircards.
New
We always have fun in this forum around this time of the year, discussing the days’ (or yesterdays’) challenges and talking through solut...
New
I’ve been diving into Bridgetown (a Jekyll successor) and learning about writing a more maintainable CSS.
New
Other popular topics
A thread that every forum needs!
Simply post a link to a track on YouTube (or SoundCloud or Vimeo amongst others!) on a separate line an...
New
Which, if any, games do you play? On what platform?
I just bought (and completed) Minecraft Dungeons for my Nintendo Switch. Other than ...
New
New
We have a thread about the keyboards we have, but what about nice keyboards we come across that we want? If you have seen any that look n...
New
Tailwind CSS is an exciting new CSS framework that allows you to design your site by composing simple utility classes to create complex e...
New
API 4
Path:
/user/following/
Method:
GET
Description:
Returns the list of all names of people whom the user follows
Response
[
{ ...
New
Saw this on TikTok of all places! :lol:
Anyone heard of them before?
Lite:
New
Author Spotlight
Jamis Buck
@jamis
This month, we have the pleasure of spotlighting author Jamis Buck, who has written Mazes for Prog...
New
This is cool!
DEEPSEEK-V3 ON M4 MAC: BLAZING FAST INFERENCE ON APPLE SILICON
We just witnessed something incredible: the largest open-s...
New
Background
Lately I am in a quest to find a good quality TTS ai generation tool to run locally in order to create audio for some videos I...
New
Categories:
Sub Categories:
Popular Portals
- /elixir
- /rust
- /ruby
- /wasm
- /erlang
- /phoenix
- /keyboards
- /rails
- /python
- /js
- /security
- /go
- /swift
- /vim
- /clojure
- /emacs
- /haskell
- /java
- /svelte
- /onivim
- /typescript
- /kotlin
- /crystal
- /c-plus-plus
- /tailwind
- /react
- /gleam
- /ocaml
- /flutter
- /elm
- /vscode
- /ash
- /opensuse
- /html
- /centos
- /php
- /deepseek
- /zig
- /scala
- /textmate
- /sublime-text
- /lisp
- /react-native
- /nixos
- /debian
- /agda
- /kubuntu
- /arch-linux
- /django
- /revery
- /ubuntu
- /deno
- /manjaro
- /spring
- /nodejs
- /diversity
- /lua
- /julia
- /slackware
- /c






