+ 4

How do I create/use a RESTful web service to retrieve data from my MySQL database in Java SE?

I've long learnt that it's bad practice to directly access a database over an internet connection. I've read a little about using web services as an alternative, but the jargon is just too 'web dev-y' for me—I literally am going nowhere. Thus the question is how do I implement these web services in a basic Java SE client application, where do I store them (somewhere on my server I presume), and what are the benefits of using them? Any links to relevant resources would also be appreciated.

24th Jul 2018, 9:09 PM
Garikai
Garikai - avatar
2 odpowiedzi
+ 1
Hi. I think this article is quite good as an introduction to API design. But it won't be enough. https://www.theserverside.com/video/A-RESTful-APIs-tutorial-Learn-key-web-service-design-principles The web service will need to sit at the back end, not in your Java client application. The API does not even need to be strictly in Java, although that is an option too. Eg: https://www.tutorialspoint.com/spring/spring_web_mvc_framework.htm Ultimately you can't avoid to get your hands dirty with the techie devvy stuff you're trying to avoid, if you really want to get to the bottom of this.
4th Feb 2019, 1:19 PM
Tibor Santa
Tibor Santa - avatar
+ 4
Woah 7 months ago, it almost seems like over a year. Man, I was so naïve back then 😂. Great links by the way
20th Feb 2019, 10:55 PM
Garikai
Garikai - avatar