Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
227 views
in Technique[技术] by (71.8m points)

rest - Is a CRUD application always an API in the web world?

Since in about 99.9% of tutorials, posts and forums, whenever the word CRUD gets in stage, the word "API" immediately follows it, I wasn't able to find the answer to my doubt: Is every web application with full CRUD functionality an API? or can I actually code a CRUD web application that's not considered an API?

All these doubts make me wonder of the early days of web development, where people would use the front end to send requests to a server, then the server would create/query/modify/delete DBs/files based on a specific (let's say) button being clicked...were those still called "CRUD APIs"?

Or is a CRUD only an API when there's no direct calling of the model's methods? (it needs, let's say, a controller code that'll ensure that the correct input and request have been made before sending the instructions to the model that'll actually do the CRUD work)

question from:https://stackoverflow.com/questions/65861498/is-a-crud-application-always-an-api-in-the-web-world

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

CRUD refers very generically to Create, Read, Update, and Delete patterns and any application architecture can implement CRUD. API is also a very generic acronym and doesn't imply anything about what functionalities must be present. You could have an API that only provides home addresses (read-only) by state, zip, street, etc. and thus enable developers to use it for address verification. Even without a way to delete, update, or create, it's still an API.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

Just Browsing Browsing

[3] html - How to create even cell spacing within a

2.1m questions

2.1m answers

60 comments

57.0k users

...