学习如何在 Java 中创建 RESTful API 的最佳来源是什么?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2840275/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What's the best source for learning how to create RESTful APIs in Java?
提问by Marius Butuc
I'm looking for a book or any other resource that will help me learn how to create RESTful APIs in Java. Looking on Amazon, I saw that there are several solutions for RESTful Java, but I'm looking for the one that is tailored to a novice.
我正在寻找一本书或任何其他资源来帮助我学习如何在 Java 中创建 RESTful API。在亚马逊上看,我看到RESTful Java有几种解决方案,但我正在寻找适合新手的解决方案。
Looking forward to getting your advices/opinions, thanks!
期待得到您的建议/意见,谢谢!
采纳答案by Surya Suravarapu
I don't think I can point to only one resource but I would take a path (which you can customize based on your level of understanding of REST). I'm somebody who would like to get my concepts real clear first and then think about the tools to implement the concepts.
我不认为我只能指向一个资源,但我会选择一条路径(您可以根据您对 REST 的理解水平对其进行自定义)。我是一个想先弄清楚我的概念,然后再考虑实现这些概念的工具的人。
If you haven't read chapter 5 of Roy Fielding's dissertation, I'd start from there. It's an excellent piece of writing, and what better source to learn from than the master himself.
Infoq is an excellent source for REST articles, helped me significantly, here is a compilation of REST resources. Also on Infoq read this excellent articleby Allamaraju.
If you are looking at books, the two that I liked so far: RESTful Web Services Cookbookand RESTful Web Services
As you are looking for Java-based services -- I'd get familiar with Jerseyand/or RESTEasy. Write as many small programs as you can, what's the best way to get familiarized.
When you are at a point to try an exciting RESTful framework that's based on Hypermedia constraint I'd explore Restfulie.
如果你还没有读过Roy Fielding 的论文的第 5 章,我会从那里开始。这是一篇优秀的文章,还有什么比大师本人更好的学习来源。
Infoq 是 REST 文章的绝佳来源,对我帮助很大,这里是REST 资源的汇编。同样在 Infoq 上阅读了 Allamaraju 的这篇优秀文章。
如果你在看书,我目前最喜欢的两本:RESTful Web Services Cookbook和RESTful Web Services
当您正在寻找基于 Java 的服务时——我会熟悉Jersey和/或RESTEasy。尽可能多地编写小程序,熟悉的最好方法是什么。
当您要尝试基于超媒体约束的令人兴奋的 RESTful 框架时,我会探索Restfulie。
Obviously, I haven't provided a single resource, but something in the lines I've provided would serve well, IMO.
显然,我没有提供单一资源,但我提供的内容会很好,IMO。
回答by Bozhidar Batsov
I'd recommend this extensive NetBeans tutorial, this Sun tutorialand maybe having at look at the Restletframework.
我会推荐这个广泛的NetBeans 教程,这个 Sun 教程,也许还可以看看Restlet框架。
回答by dafmetal
I have used RESTlet in Actionto learn about REST concepts. It's an early access book so only the first few chapters are currently available, but I found the writing to be very clear.
我已经使用RESTlet in Action来了解 REST 概念。这是一本抢先体验的书,所以目前只有前几章可用,但我发现文字非常清晰。
回答by Will Sargent
I found REST in Practiceto be the best book covering different styles of REST architectures. It's also far more practical in its advice than many other books (I wasn't impressed by RESTful Web Services as I think it lacks focus).
我发现REST in Practice是涵盖不同风格的 REST 架构的最好的书。它的建议也比许多其他书籍更实用(我对 RESTful Web 服务没有印象,因为我认为它缺乏重点)。