Applications are Components (AKA Microservices in Elixir)

Well it seems what he was talking about is indeed something more ike Microservices.

I’m currently working my way through his new online course (which is awesome btw) and he says he likes to build his apps as lots and lots of smaller components… and at the end of the video says that if he were ‘buzzword compliant’ he’d have said they were microservices.

I guess I am surprised at how small these components are - one of them is tiny, it’s a very small program that fetches a random word from a .txt file after a series of transformations! Dictionary.random_word

I suppose you could say the clue is in the name Microservices :lol: but I guess I wasn’t expecting them to be this small!

Each component/microservice is included as a dependency in the mix file of the main app (or I guess the bigger ‘component’) with a local path or GitHub url:

  defp deps do
    [
			{ :dictionary, path: "../dictionary" },
		]
  end

He mentions that if what you’re working on can be used elsewhere, it makes sense to make it a separate mix app/componant like this.


This is really interesting, particularly how they all connect to each other in an Elixir app (a very simple dependency).

I’m quite excited about this :lol:

How does this fit in with how you all are writing apps?

4 Likes