U
U
Urukhayy2018-02-12 13:59:15
Web development
Urukhayy, 2018-02-12 13:59:15

Is it possible to implement logging of user actions on the front-end?

There is a web application (backend + frontend). You need to log user actions. For example, I changed the avatar, changed some fields in the profile, all this needs to be logged and thrown into the general database of logs by profiles.
On which side is it better to implement it? It is the parsing of profile changes. The fact that the base is on the back-end is self-explanatory, but which side should be notified about the changes? For now, I want to do this on the front end, and send a separate HTTP POST request straight from the front end to a separate back end module to the HTTP POST journals/ journal database. Is it correct? It turns out that if earlier there was one HTTP PUT (update) request, now 2 requests will go from the front-end: updating the profile itself and the second request to add the log to the log. Naturally, the log will be added only if a successful response came from updating the profile (first request)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Entelis, 2018-02-12
@DmitriyEntelis

No, not right.
The front should not contain business logic.
At least for the reason that any front request can be blocked or modified.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question