![]() The author chooses to deal with this problem by simply getting through the required information quickly and sticking to the defined scope of the book. The result is that the sample code is practically identical to the earlier Jersey example. The RESTEasy framework presents the author with a dilemma because it implements the same JAX-RS specification as the Jersey framework covered earlier. The reuse of the sample code does help, and the author’s highlighting of the relevant bits ensures you don’t miss something important. For me, the code samples now started to get a bit repetitive, and experienced readers may find themselves skipping forwards as they start to grasp the basics of each framework. Version 1.1 of RESTlet appears fairly old-school in its approach, requiring the overriding of methods, while version 2 adopts a more modern annotation based approach. As the same sample Twitter-like service is being implemented each time, the common code is re-used allowing the focus to remain on the specifics of the RESTlet framework. RESTlet is next to be used, with version 1.1 and version 2.0 both being covered at the same time. The sample service is developed using the JAX-RS annotations implemented by Jersey, with the HTTP GET, PUT, DELETE and POST methods all being adequately documented and explained.īecause of the distance covered, this first section is quite meaty, but you are left with a sense of just how easy implementing RESTul services can be, especially when you acknowledge that the majority of the code samples given are for the supporting application tiers rather than the RESTful service implementation. Representation formats are also covered, with the author opting for the commonplace XML/JSON over HTTP. Techniques for RESTful API analysis and design are illustrated, demystifying how to correctly select the ‘resources’ that the service API will manipulate and the format of the service’s endpoints that clients will call to communicate with the service. The service API and classes are re-used later on with all the other frameworks in order to keep coding to a minimum and to allow the reader to focus on the salient points of RESTful service development with each framework. ![]() The Jersey JAX-RS framework is first up, and the author uses this opportunity to create a simple 3-tier RESTful web service (a Twitter like Application Programming Interface or API) that’s based on a bunch of reusable Java classes for business logic and data storage. Download locations for each of the open source components are also provided at the start of each technical chapter. Full source code is provided on the Packt website to support the text, and this allows the reader to get involved without too much effort. The books core chapters cover the coding of RESTful services using four freely available Java based implementation frameworks Jersey, RESTEasy, RESTlet and the Struts Rest plugin. ![]() It’s a useful introduction but unfortunately no TDD related RESTful client API’s or SOA testing tools are offered for consideration - an omission that you should be aware of if you buy the book. This combination of existing technologies, flexible formats and fixed interaction types is attractive because of its simplicity and flexibility - something you don’t often hear when evaluating other SOA technologies.īefore moving on to discuss the details of RESTful service implementation with Java, the book first deals with how to successfully access a RESTful resource using a number of different HTTP client API’s such as Commons HTTP. These resources are presented to users via ‘representations’ in the users chosen format (often with multiple format’s available for the same resource). The core concept at the heart of REST is the provision of web-accessible ‘resources’ or entities that can be created, edited and deleted by users issuing standard HTTP requests. RESTful Java Web Services begins with a discussion on the principals of RESTful applications and how RESTful Web Services can play a part in a well designed Service Oriented Architecture (SOA). Packt Publishing have teamed up with Jose Sandoval to publish their offering: “ RESTful Java Web Services” - a short-format & developer-focused book that attempts to quickly tutor the reader on the RESTful standard and illustrate how to code RESTful services with a number of popular REST frameworks. However, a number of books are now available that attempt to guide the way by documenting the RESTful standard, its principals, and the Java implementation frameworks available to help. ![]() RESTful web services have been with us for a while now, and initially I, like many others, was put-off by the general lack of information on how to design and implement a RESTful web services correctly. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |