Answer the question
In order to leave comments, you need to log in
Is it true that application logic should not be in Angular but should stay in Node?
There is a web application logic that has functionality that performs calculations related to processing the input data of the web application. Example: A web application returns the first million digits in pi after a random digit. Accordingly, the very process of searching for a million digits in the number pi is the application logic. And is it true that such logic should be strictly on the back-end?
And there is the logic of the interface. And in Angular (on the front-end) there should be only the logic that is responsible for the operation of interfaces (animations, buttons, forms). And is it true that Angular should not know anything about the application logic? It should only take the data that came from the POST request and display it by tags. Well, send data in POST requests by processing forms.
Or which is better in this case? Is the approach in which Angular simply serves as a View + Controller that accesses the Model (back-end) functionality via HTTP correct?
Answer the question
In order to leave comments, you need to log in
WebWorkers (parallel processes) serve exactly for computing purposes for the front end.
As for mobile, APIs are often made different for them, you should not throw them in one bunch by default.
To occupy the server for large calculations seems to me not the best idea. Moreover, if you need to give get, then it is better to immediately write the result of such operations to the database, and update it on demand.
Well, not really necessary. Of course, you should not mix methods for calculating numbers after pi into components. But this logic can be added to another directory intended for similar scripts and called from there.
I don’t understand a little why you need get and post if the back-end is on nodejs - the application can easily work on a client without a server - unless, of course, the database is needed and this is a purely functional application for calculating digits in the number pi, temporary data can be added to json.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question