简体   繁体   中英

How to Create Real-Time CRUD based web app using SocketIO

Please check this answer .

What is suggested flow is good.

Eg Submit data to server: Use POST Submit data from server to browser: Socket are best.

My question when to use sockets in CURD based web app.

I think using Websockets for CRUD is always valid, but it depends on your specific app's needs.

If creation (C) and updates (U) are performed often and require real-time data exchange - ie a stock trading app - you might want to use websockets for the C&U. I think google does that for google-docs, but I might be mistaken.

If reading data is time sensitive, you might use websockets for R&D (read and delete)...

Using websockets for the Read (R) is quite common for realtime updates (news, chat messages etc').

But usually, CRUD apps aren't time sensitive and mostly CRUD will be performed with an HTTP GET/POST request using a RESTful HTTP API.

As much as I love websockets, there are something that work great with simple HTTP ;-)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM