Friday, 14 April 2017

Best practices for non-persistent Models in Sails.js?

Let's say I want to do some complex logic and I don't want to use the controller for that. I want to have a project structure similar to MVC for desktop apps (old school MVC, or non-web MVC).

So where should I store files like this? For instance files like:

  1. Language transpiler: A class or module that compiles a user input'd code from language to another.
  2. Math calculator: The user inputs 2+(2x)=9 and this class (along with probably some other classes) will decode, calculate, do algebra, and then give the answer.

Should I use the Service folder?

I want to make an application that requires some data that looks like persistent models, but it's actually instance-only (data dies when the server goes down.)



via Felo Vilches

No comments:

Post a Comment