ElixirTalk / elixirtalk

ElixirTalk Podcast
https://soundcloud.com/elixirtalk
40 stars 2 forks source link

Code organization with something like Phoenix contexts #49

Closed andresgutgon closed 5 years ago

andresgutgon commented 5 years ago

Hi, first thanks for your work. It's inspiring Now my suggestion :) I read all open issues and checked all past episodes and I didn't see anything related with code organization. Yes, I saw umbrella apps but I think I didn't see an alternative to umbrella apps, something like Phoenix contexts. Feel free too close if this topic already was covered

Thanks again for your work

desmondmonster commented 5 years ago

answered! https://soundcloud.com/elixirtalk/episode-143-community-questions-graphql

andresgutgon commented 5 years ago

Wow! appreciate! Also appreciate the effort put into pronounce my username :)

Not necessary to do another podcast to answer this :). During the podcast you put the example of a context for your policies (in the sense of CanCan policies).

I was thinking that putting similar things like policies all together is like putting all your CSS in one place. You end with dead CSS when you deprecate things.

On the other hand we have React components or Vue where you have all your pieces for a thing together javascript and CSS. This way refactoring or deprecating components is just deleting or moving one folder.

Wouldn't make sense to make context with all your necessary pieces for that thing? like for example an Accounts context where you have their Ecto, their policies, their GraphQL schema piece,...?

Other than that great show! Thanks :)