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

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
markmark206
simple_feature_flags is a tiny package that lets you turn features on or off based on which environment (e.g. localhost, staging, product...
New
seancribbs
Today I released a new dialyzer Mix task as the dialyzex package! At the time we started writing this task, the existing dialyzer integra...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. Features Unstyled Phoenix components. Storybook that can be added to...
New
treble37
Just looking for a little feedback on a tiny helper library I built - Sometimes I find the need to convert maps with atom keys to maps...
New
aditya7iyengar
Rummage.Ecto and Rummage.Phoenix provide ways to perform Searching, Sorting and Pagination over Ecto queries and Phoenix collections. Fo...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
engineeringdept
I’ve just released the first version of Snap, an Elasticsearch client. It borrows ideas about application structure and process managemen...
New
msaraiva
Surface is an experimental library built on top of Phoenix LiveView and its new LiveComponent API that aims to provide a more declarative...
564 42633 214
New
New

Other popular topics Top

vrod
I am using the Starship cross-shell prompt – it seems pretty nice, but I get some errors: [WARN] - (starship::utils): Executing command ...
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1140 51847 244
New
jononomo
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set? Thanks.
New
malloryerik
Hi, this is for people who, like me, have had some friction using .html.heex templates in VSCode. The solution seems to be, in a hyphena...
New
sacepums
Hey guys. I'm new to elixir and im really stocked about it. But I ran into a bit of problem - I need to convert a date sting, for examp...
New
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
chrismccord
As promised, the first release candidate of Phoenix 1.3.0 is out! This release focuses on code generators with improved project structure...
New
danschultzer
None of the current solutions worked well for me, so I went ahead and built a user management system from scratch. This project took far...
548 27727 240
New
fireproofsocks
Forgive me if this is obvious, but how does one delete a database record WITHOUT selecting it first? https://hexdocs.pm/ecto/Ecto.Repo.h...
New
baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New

Sub Categories:

We're in Beta

About us Mission Statement