A
A
Andrey Plax2018-09-20 09:15:17
ASP.NET
Andrey Plax, 2018-09-20 09:15:17

What technologies, methodologies or tools are available to simplify validation and data processing at the Front-end and Back-end?

What technologies, techniques or tools are there to simplify data validation and processing on the Front-end and Back-end in the case of an ASP.NET MVC application?
When there are many different parameters sent from the Front to the Back and back + they periodically change or are supplemented with new ones, it is easy to forget about some kind of check on one of the sides or not correctly convert the data and then look for a long time in which place, AutoMapper crashes, to example... :) Tell me
, who knows, some Best Practice for Fullstack development.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
�
âš¡ Kotobotov âš¡, 2018-09-20
@Hereigo

One approach (quite successful) is to use a single code base with static typing.
In which the same code base (data model for example) is reused both on the back and on the front.
To do this, either the backend on the LS is typed (node), or the Frontend (FS) is generated from the language on the backend.
This approach allows you to create a prototype very quickly and quickly redo it, while you can make a seamless connection between the backend and the frontend without the need to describe the api.
Of course, in the end, you get a highly connected code, which in a good way then still needs to be rewritten, but for prototyping, that’s it.

E
Evgeny, 2018-09-20
Maltsev @maltsever

Since we are in the ASP.NET section, I will talk about it. I don’t know how we can synchronize validation on the frontend and backend, it even seems to me that this is technically unrealizable, but I could be wrong. If we are talking about validation in general, then we first of all need to provide 100% validation on the server side, because we do not want data integrity to be violated, etc. Here we must be guided by the fail fast principle - we check the validity of the data from the request as quickly as possible. To bring validation to some organized form, you can use, for example, the FluentValidation library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question