Phoenix New App Naming

When we create a new application - what is the meaning behind naming the naming convention? Specifically, I could not understand the rationale behind naming the namespace to be MyApp and MyAppWeb. Can we not call them Domain and Web? My observation has been - by using the application name in namespace - and using it at many places - it is getting difficult to develop and reuse application starter templates. Even when we clone an application starter - we need to run a rename script to make the application our own.
I agree that all serious application developers here would like to develop application from scratch. But, my question is - by making it easier for using templates - is there a possibility of entry barrier getting lower for new entrants?
May be tI asked question in a bit round about way. The simple way to ask probably is - Should the Application Name be prepended for directories, all namespaces etc. - Or will they be better without it.

I guess a benefit is that if you ever need to move them into an umbrella or separate the app, your not left with a project called Web. MyAppWeb on its own or in a with a bunch of mixed apps is clear what it does.

1 Like

For module names there is a guideline: Library Guidelines — Elixir v1.12.2. This is for library but I think the same apply to other cases.
This way you avoid name conflicts and have a clear difference when using the code from a module of your app or a module from a library.

3 Likes

There can be one, and only one, module with the given name within each instance of the VM. Sometimes it is feasible to run more than one Phoenix application within the same VM instance. In such case there would be module name conflicts.

4 Likes