Phoenix app from scratch?

I’ll try to have a stab at this.

Think about it this way:

You have your business. You sell papers.
You order paper from suppliers and your employees stock them and arrange them in your store and sell them to customers.
You have suppliers, papers, employees, stores. Those are parts of your business.

On the other hand, your customers order paper from you through phone calls, emails, or they stop by your store.

Phone calls and emails are not part of your paper business, they’re tools to help you connect with your customers and receive orders. Phones, obviously, know nothing about your business. They just allow your to receive orders. How do you store and process those orders? Phones don’t care. It’s up to you.

Phones and emails are the myapp_web part of your business. Controllers, views, and templates should just connect the outside world to your business. They know nothing about your business logic. They just take what the customers tell them and deliver it to your business in a nice way.

In your case, the myapp_web part is json only since you’re not using html. It’s like saying, “I don’t want to have a physical store where people come by, I’ll just receive orders through emails”.

3 Likes