Java Rest API

Can Anyone Explain is it really necessary to make a Rest Api while Storing the user's in the db from registering page ? And when do we actually use a Rest Api in our web application ?
7 Replies
JavaBot
JavaBot6mo ago
This post has been reserved for your question.
Hey @Danix! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Danix
DanixOP6mo ago
Yehh I understand but should I have to use Rest Api or make rest api for storing users in my db or I can directly store them ?
Unknown User
Unknown User6mo ago
Message Not Public
Sign In & Join Server To View
Danix
DanixOP6mo ago
hmm i understand
Kyo-chan
Kyo-chan6mo ago
That's not really how it works. With an oldschool web flow application, where only webpages are served by the server and there is nothing like a REST API, the database will be an externalised problem and it can or cannot be on the same computer. Protocols such as REST and database drivers aren't so much inter-computer as they are inter-process. Sure, when you can do inter-computer then you can do inter-process on the same computer... But there is barely such a thing as an application that runs its own database within its own process. And a web application is inherently an inter-computer communication, that's the entire point of the web. Rather, whether a REST API is helpful comes down to this: - Is it desirable that other programs, like mobile apps or other websites, and not just the website itself, are able to use the website's features? Like on Google Drive, in addition to the Google Drive website, we can use it through the mobile apps, the desktop companion and various websites. If this is desirable, then yes a REST API is what you want. - Even if the above doesn't apply, if your website is organized as a react-like page that changes the webpage's content based on data given by the server, rather than have the server serve the pages as HTML as they're supposed to be displayed, then a REST API is most likely to be an easier design than something else.
JavaBot
JavaBot6mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server