Need Resources to Learn Java Web Services from SCRATCH
-
I've bounced around Java and C# the last several years but now want to get up to speed with Web Services (RESTful). I used to be a master of J2EE circa 2003, but have since got side tracked into all kinds of stuff. I've worked through a couple of NetBeans tutorials (my IDE of choice) but they don't seem to expose the nitty gritty. I enjoy seeing how things exactly work, building an app from the byte array up. Although I've touched a couple of frameworks, I've most enjoyed working with Java EE proper to understand the base case before the sugar of Spring/Hibernate is added. Does that make sense? I am looking for a book or tutorial that really builds up your knowledge piece by piece so that you understand everything, not some Rails-like toolkit for rapid development. Thanks-in-advance, Guido
-
Answer:
Have you checked out http://jersey.java.net/ yet? This is the Java reference implementation of JAX-RS. There is a great community around this project, and the main author is available via mailing lists and forums and has personally answered questions of mine for some gnarly situations I ran into. The jersey site has a lot of great links to get you started from a variety of angles, depending on what you're interested in learning.
Guido Anselmi at Stack Overflow Visit the source
Other answers
I'd start by doing a review of HTTP, since in practice this is a fundamental building block of REST web services, and it gets you into the right mindset for what comes next. Next, think about how you'd structure the URIs for various resources. Martin Fowler wrote http://martinfowler.com/articles/richardsonMaturityModel.html on this topic. Various java frameworks for creating web services try to make it easier for you to map requests to specific methods, and even to map parts of requests (including path elements, query parameters, and the entire request body) straight into your object model. But all of this just help with the identification and manipulation of resources through URIs. Next, if your resources are related, then think about http://www.subbu.org/blog/2007/12/hypermedia-and-rest. You're probably used to putting <a href=""> links in web pages, and you certainly wouldn't want people to hardcode or bookmark every single URL in your website. How does the same idea extend to web services? Next, think about actually moving data between client and server. JSON or XML? URI element or query parameter? Again, lots of java frameworks exist just to make this easier -- for example, Jackson and Gson for REST, JAXB for XML, etc. -- but the problem of dealing with HTTP-based requests and responses is very similar to the one that your average servlet container solved years ago. Finally, consider security. For example, username/password or OAuth? HTTP or HTTPS? There are lots of other details, but these topics should keep you busy for a while.
jtoberon
http://bitworking.org/news/201/RESTify-DayTrader has very good details of how to build a RESTFul service. Java implementation can be found at http://sourceforge.net/p/restifiedtrader/home/Restified%20Trader/
kiran.kumar M
http://rads.stackoverflow.com/amzn/click/0321146182 is a good read on learning Web Services.
Piyush
Related Q & A:
- How to load a Java web app in the terminal?Best solution by stackoverflow.com
- What are the best resources to learn about web crawling and scraping?Best solution by Quora
- What programming languages should I learn for Web development?Best solution by Yahoo! Answers
- How to learn Java-android?Best solution by Yahoo! Answers
- Where can I learn more about B2B Marketing for Business services and financial services?Best solution by Quora
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.