Vue.js: Business logic best practices?
New here? Learn about Bountify and follow @bountify to get notified of new bounties! x

This is not a coding task, but a request for an explanation/examples:

What is the Vue.js "best practice" for the location of business logic?

In AngularJS, we create service/factories to contain business logic and then reference it in components/controllers via dependency injections.

What is the equivalent to this in Vue?


Crowdsource coding tasks.

1 Solution

In Vue.js there is no specific places to put your code part, you can use from single file to modular scructure.
Here is 2 articles to help you with the subject:

  1. How to setup Domain Driven Design (DDD) in a Vue.js app ?

  1. Does DDD Belong on the Frontend? - Domain-Driven Design w/ TypeScript ?

If DDD is too much for your need check this: