sasajuric

sasajuric

Author of Elixir In Action

Boundary - enforcing boundaries in Elixir projects

I’d like to announce a small library called boundaries.

This is an experimental project which explores the idea of enforcing boundaries in Elixir projects without requiring the extra ceremony of umbrella apps. You can find a brief explanation on the library repo, while a more detailed doc is available here.

Note that this library is still in an exploratory phase, and I haven’t really tried it out myself yet. At this point I’m opening it primarily to collect the community feedback.

Most Liked

sasajuric

sasajuric

Author of Elixir In Action

Folks,

I want to thank you all for providing the encouraging feedback and some great food for thought. Owing to your comments, I’m even more convinced that we can build a solid boundary enforcement tool for Elixir.

As a result of your comments, and the issues reported on the repo, I now realize that some of my original ideas were not on the right track. That’s actually a good thing! While I was a bit reluctant about sharing my work at such an early stage, I’m now happy that your review helped me discover some foundational problems so early on in the process.

So at this point, I’m increasingly leaning towards the following changes:

  • allowing partial coverage (not all modules have to be a part of some boundary)
  • switching to a decentralized solution
  • prioritizing nested boundaries (boundaries within boundaries)

I plan on writing a detailed proposal, but I probably won’t make it this week, so I just wanted to let you know that I’m intensively thinking about this.

sasajuric

sasajuric

Author of Elixir In Action

Now that Elixir 1.10 is released, I pushed the changed internals which rely on new compilation tracers. The new version requires Elixir 1.10, and the usage is slightly changed. See changelog and docs for details. I also decided to push the package to hex. The new version is 0.2.0. Those who are using the library but aren’t on Elixir 1.10 yet can use 0.1.0.

sasajuric

sasajuric

Author of Elixir In Action

I finally found some time to make the proposal for the changes I’d like to do in boundaries. You can find it here. Looking forward to hear your feedback!

sasajuric

sasajuric

Author of Elixir In Action

FYI, I started working on the proposed changes. See this comment for details.

sasajuric

sasajuric

Author of Elixir In Action

Started working on the support for managing external dependencies. The idea is that you can do something like this:

defmodule MySystemWeb do
  use Boundary, externals: [ecto: [Ecto.Changeset]]
end

to restrain ecto modules only to Ecto.Changeset (and Ecto.Changeset.* if such exist). Other external deps are unrestrained.

Demo:

The code is pushed to GH master, but not yet published on hex, since I’d like to get feedback on the interface. Docs for the new feature are available here.

Where Next?

Popular in Libraries Top

sabiwara
Dune is a sandbox for Elixir and aims to safely evaluate user-provided code. You can try it out using this basic Elixir playground made ...
New
wfgilman
I’ve cleaned up and open sourced three financial libraries I was using for my company. They are bindings for the APIs of these three comp...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
martinthenth
Hello everybody :wave: Recently, some of my colleagues talked about database ids and uuids and their problems, and I remembered the pain...
New
bryanjos
Hi, I just published version 0.23.0 of Elixirscript. Most of the changes are around JavaScript interop now that Elixirscript uses the ...
New
gabrielpoca
Hello everyone! I want to share with you something that I’m really proud of: https://stillstatic.io/ Still is a static site builder for...
New
bryanjos
Hi, I wanted share a small library we at Revelry Labs made for rendering react components from the server side. There are instructions fo...
New
Hal9000
Here is my first stab at this. README pasted below. https://github.com/Hal9000/elixir_random Comments and critiques are welcome. Th...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
KallDrexx
For a good number of months I've been working on creating a very basic RTMP live video streaming server. Now that I have a very, very ba...
New

Other popular topics Top

chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 30048 115
New
yurko
Here are few pieces of (common) Linux knowledge that we use for reasonably small one server apps. We use Ubuntu but this should work for ...
New
_russellb
I want to try my hand at web scraping. What tools/libraries do I need to use. I’m hoping to turn this into something professional so don’...
New
stefanchrobot
What’s the safe way to decode a JSON string into a struct? I want to avoid calling String.to_atom. Jason.decode can give me a map with st...
New
vac
Hi, I'm quite new in Elixir and I'm trying to format a string to a PEM format. I have the certificate value like MIIDBTCCAe2...... and ...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shahryarjb
Hello, I have map which I want to convert it to string like this: the map: %{last_name: "tavakkoli", name: "shahryar"} the string I ne...
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
9mm
I am constructing a JSON object (map) and I need to conditionally set a field. I’m trying to write proper elixir-way code… and I’m at a l...
New

Sub Categories:

We're in Beta

About us Mission Statement