How would you explain Phoenix Contexts to a newbie?

I would say that context are where you put the functions that transform your internal data into something the web layer use. Like what you need, how to get it, how to order it, etc.

So that the web layer as a nice and known way to use it. Like if you had to define the API you use with your front end dev.

2 Likes