Hey, I’ve already written few apps in Phoenix, but I started thinking about one special file which is generated after creating new project,
<project_name>.ex . What’s it’s purpose?
<project_name>_web.ex contains macros helping setting up views, templates, controllers and so on. But I don’t see analogy in
<project_name>.ex, description also isn’t helping much:
<project_name> keeps the contexts that define your domain
and business logic.
Contexts are also responsible for managing your data, regardless
if it comes from the database, an external API or others.
If I want to access accounts context I use
AppName.Accounts, if I want to use context connected with web I use
AppNameWeb.ContextName. But how should I use plain