Phoenix Contexts - learning resources

Wonder if we can compile a list of learning resources, blog posts, talks, threads etc to help those who are just learning about Contexts.

This is a wiki - so please add anything you feel is missing…

What are Phoenix Contexts?

In short:

Phoenix Contexts are just dedicated modules that expose and group functionality.

In depth:

Books

Programming Phoenix - due to be updated for Phoenix 1.3.

Screencasts

Talks

Blog Posts

https://panache.nu/blog/giving-phoenix-contexts-some-context

https://blog.jakewilkins.com/2017/06/23/working-with-phoenix-1-3-directory-structure-a-love-story/?utm_content=buffer4c74b&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer

http://www.resurgens.io/2017/06/26/phoenix-1-3.html by @dlively (thread)

Understanding the concept of a context in Phoenix (2017-08-16)

Threads

And more:

https://elixirforum.com/search?q=contexts

Misc

16 Likes

Added a blog post by @michalmuskala

1 Like

There is an example phoenix 1.3 application, with contexts and absinthe here

https://seanclayton.me/post/phoenix-1-3-and-graphql-with-absinthe/?utm_source=hashnode.com

Which obviously is inspired by this one

It is a full example, easy to follow on how contexts can interact.

2 Likes

I added a link to your post in the wiki :023:

Added a blog post by @Qqwy :023:

2 Likes

Added @chrismccord’s ElixirConf EU Keynote talk :023:

1 Like

All explanations from this thread worth mention:

2 Likes

http://www.resurgens.io/2017/06/26/phoenix-1-3.html

by @dlively (EF thread)

Since this is an app I built in order to further my education, I opted to venture out on the bleeding edge and use Phoenix 1.3.0-rc. Don’t let the what seems like a minor version change fool you. While there are no real breaking changes or significant new features being introduced in 1.3, alterations to the directory structure and new code generators introduce a seismic shift in how a developer approaches a Phoenix project. Chris McCord provides an overview of these changes in the Lonestar Elixir keynote address, his Elixir Forum post, and his more recent ElixirConf EU keynote. Those were all essential for me to getting started, but I found the concepts easier to grasp once I began building my project…

1 Like

With the recent Phoenix 1.3 release, Phoenix introduced Contexts, which are dedicated modules that expose and group related functionality. One frequent question that has come up is where to handle authorization for domain operations. Should authorization be handled in the Web layer at the controller, or within the context? Both are valid approaches, so let’s find out which approach is better and when…

Building beautiful systems with Phoenix contexts. Andrew Hao - ElixirDaze 2018 (March 1,2)

Worth watching. 'nuff said.

8 Likes

thanks @peerreynders really nice video. I was feeling overwhelming about modules, functions… Looking a app from big picture really opened my mind. I feel like i found missing puzzle. Especially User in different contexts section. Since long time i was searching informations for designing apps.

Great article by @devonestes suggesting some rules to guide the design of Contexts:

http://devonestes.herokuapp.com/a-proposal-for-context-rules

Recommended to me by João Brito of @Plataformatec.

3 Likes