im trying to develop a application ( based on react flow on Ui and spring boot on backend) where each action performed by user on UI eventually gets performed on server and the modified state is given by to UI to render.
Consider following example:- A node based UI where user adding a SQL table on the UI.
- case 1 :- On every column addition on UI -> it gets validated on backend -- >table with some validation errors will be returned.
- case 2:- on marking the column as primary key on ui--> not null constraints gets added after a server trip as only seever know what needs to be added additionally
due to this nature of application, almost all actions are supposed to be triggered on backend.
Should we send the current state as payload on each action and then server modifies it ?
or is there any design pattern which fits this case perfectly
i was exploring CQRS design pattern. but i felt like its too much complex for such applications. another straight forward way which i can think of is sending the UI state back to server .. and then server modifying it as per the need and returning the modified state back.
Aucun commentaire:
Enregistrer un commentaire