{"id":17409,"date":"2013-09-21T16:47:33","date_gmt":"2013-09-21T13:47:33","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=17409"},"modified":"2013-09-21T16:47:33","modified_gmt":"2013-09-21T13:47:33","slug":"rest-101-for-developers","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html","title":{"rendered":"REST 101 For Developers"},"content":{"rendered":"<h2>Local Code Execution<\/h2>\n<p>Functions in high-level languages like C are <a title=\"Compiling a Program\" href=\"http:\/\/www.informit.com\/articles\/article.aspx?p=101169&amp;seqNum=3\" target=\"_blank\" rel=\"nofollow\">compiled<\/a> into <a title=\"Art of Assembly Language - Procedures\" href=\"http:\/\/cs.smith.edu\/~thiebaut\/ArtOfAssembly\/CH11\/CH11-1.html\" target=\"_blank\" rel=\"nofollow\">procedures in assembly<\/a>. They add a level of <a href=\"http:\/\/en.wikipedia.org\/wiki\/Indirection\" target=\"_blank\" rel=\"nofollow\">indirection<\/a> that frees us from having to think about memory addresses.<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy.png\"><img decoding=\"async\" class=\"alignright size-thumbnail wp-image-17477\" alt=\"rest-easy\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-150x150.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-150x150.png 150w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-100x100.png 100w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-42x42.png 42w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>Methods and polymorphism in object-oriented languages like Java add <a title=\"The virtual method table\" href=\"http:\/\/www.learncpp.com\/cpp-tutorial\/125-the-virtual-table\/\" target=\"_blank\">another level of indirection<\/a> that frees us from having to think about the specific variant of a set of similar functions.<\/p>\n<p>Despite these indirections, methods are basically still procedure calls, telling the computer to switch execution flow from one memory location to another. All of this happens in the same process running on the same computer.<\/p>\n<h3>Remote Code Execution<\/h3>\n<p>This is fundamentally different from switching execution to another process or another computer. Especially the latter is very different, as the other computer may not even have the same operating system through which programs access memory.<\/p>\n<p>It is therefore no surprise that mechanisms of remote code execution that try to hide this difference as much as possible, like <a title=\"Remote Method Invocation\" href=\"http:\/\/www.oracle.com\/technetwork\/java\/javase\/tech\/index-jsp-136424.html\" target=\"_blank\" rel=\"nofollow\">RMI<\/a> or <a title=\"Simple Object Access Protocol\" href=\"http:\/\/www.w3.org\/TR\/soap\/\" target=\"_blank\" rel=\"nofollow\">SOAP<\/a>, have largely failed. Such technologies employ what is known as <a href=\"http:\/\/en.wikipedia.org\/wiki\/Remote_procedure_call\" target=\"_blank\" rel=\"nofollow\">Remote Procedure Calls<\/a> (RPCs).<\/p>\n<p>One reason we must distinguish between local and remote procedure calls is that RPCs are a lot slower.<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc.png\"><img decoding=\"async\" class=\"alignleft size-thumbnail wp-image-17478\" alt=\"rpc\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc-150x150.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc-150x150.png 150w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc-200x200.png 200w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc-100x100.png 100w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rpc-42x42.png 42w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><\/p>\n<p>For most practical applications, this changes the nature of the calls you make: you\u2019ll want to make less remote calls that are more coarsely grained.<\/p>\n<p>Another reason is more organizational than technical in nature.<\/p>\n<p>When the code you\u2019re calling lives in another process on another computer, chances are that the other process is written and deployed by someone else. For the two pieces of code to cooperate well, some form of coordination is required. That\u2019s the price we pay for <a href=\"http:\/\/en.wikipedia.org\/wiki\/Coupling_%28computer_programming%29\" target=\"_blank\" rel=\"nofollow\">coupling<\/a>.<\/p>\n<h3>Coordinating Change With Interfaces<\/h3>\n<p>We can also see this problem in a single process, for instance when code is deployed in different jar files. If you upgrade a third party jar file that your code depends on, you may need to change your code to keep everything working.<\/p>\n<p>Such coordination is annoying. It would be much nicer if we could simply deploy the latest security patch of that jar without having to worry about breaking our code. Fortunately, we can if we\u2019re careful.<\/p>\n<p><a href=\"http:\/\/docs.oracle.com\/javase\/tutorial\/java\/concepts\/interface.html\" target=\"_blank\" rel=\"nofollow\">Interfaces<\/a> in languages like Java separate the public and private parts of code.<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/interface.jpg\"><img decoding=\"async\" class=\"alignright size-thumbnail wp-image-17479\" alt=\"interface\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/interface-150x120.jpg\" width=\"150\" height=\"120\" \/><\/a><div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>The public part is what clients depend on, so <a href=\"http:\/\/wiki.eclipse.org\/Evolving_Java-based_APIs_2#Evolving_API_Interfaces\" target=\"_blank\" rel=\"nofollow\">you must evolve interfaces in careful ways<\/a> to avoid breaking clients.<\/p>\n<p>The private part, in contrast, can be changed at will.<\/p>\n<h3>From Interfaces to Services<\/h3>\n<p>In <a title=\"Open Services Gateway Initiative\" href=\"http:\/\/www.osgi.org\/Technology\/WhatIsOSGi\" target=\"_blank\" rel=\"nofollow\">OSGi<\/a>, interfaces are the basis for what are called <a href=\"http:\/\/blog.osgi.org\/2010\/03\/services.html\" target=\"_blank\">micro-services<\/a>. By publishing services in a registry, we can remove the need for clients to know what object implements a given interface. In other words, clients can discover the identity of the object that provides the service. The service registry becomes our entry point for accessing functionality.<\/p>\n<p>There is a reason these interfaces are referred to as micro-services: they are miniature versions of the services that make up a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Service-oriented_architecture\" target=\"_blank\" rel=\"nofollow\">Service Oriented Architecture<\/a> (SOA).<\/p>\n<p>A straightforward extrapolation of micro-services to \u201cSOA services\u201d leads to RPC-style implementations, for instance with SOAP. However, we\u2019ve established earlier that RPCs are not the best way to invoke remote code.<\/p>\n<p>Enter REST.<\/p>\n<h3>RESTful Services<\/h3>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy.png\"><img decoding=\"async\" class=\"alignleft size-thumbnail wp-image-17477\" alt=\"rest-easy\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-150x150.png\" width=\"150\" height=\"150\" srcset=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-150x150.png 150w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-100x100.png 100w, https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/rest-easy-42x42.png 42w\" sizes=\"(max-width: 150px) 100vw, 150px\" \/><\/a><a href=\"http:\/\/en.wikipedia.org\/wiki\/Representational_state_transfer\" target=\"_blank\" rel=\"nofollow\">Representational State Transfer<\/a> (REST) is an architectural style that brings the advantages of the Web to the world of programs.<\/p>\n<p>There is no denying the scalability of the Web, so this is an interesting angle.<\/p>\n<p>Instead of explaining REST as it\u2019s usually done by exploring its <a href=\"http:\/\/www.ics.uci.edu\/~fielding\/pubs\/dissertation\/rest_arch_style.htm\" target=\"_blank\" rel=\"nofollow\">architectural constraints<\/a>, let\u2019s compare it to micro-services.<\/p>\n<p>A well-designed RESTful service has a single entry point, like the micro-services registry. This entry point may take the form of a <a title=\"Home Documents for HTTP APIs\" href=\"http:\/\/tools.ietf.org\/html\/draft-nottingham-json-home-03\" target=\"_blank\" rel=\"nofollow\">home resource<\/a>.<\/p>\n<p>We access the home resource like any other resource: through a representation. A representation is a series of bytes that we need to interpret. The rules for this interpretation are given by the <a href=\"http:\/\/en.wikipedia.org\/wiki\/Internet_media_type\" target=\"_blank\" rel=\"nofollow\">media type<\/a>.<\/p>\n<p>Most RESTful services these days serve representations based on JSON or XML. The media type of a resource compares to the interface of an object.<\/p>\n<p>Some interfaces contain methods that give us access to other interfaces. Similarly, a representation of a resource may contain <a href=\"http:\/\/en.wikipedia.org\/wiki\/Hyperlink\" target=\"_blank\" rel=\"nofollow\">hyperlinks<\/a> to other resources.<\/p>\n<h3>Code-Based vs Data-Based Services<\/h3>\n<p>The difference between REST and SOAP is now becoming apparent.<\/p>\n<p>In SOAP, like in micro-services, the interface is made up of methods. In other words, it\u2019s code based.<a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/soap.jpg\"><img decoding=\"async\" class=\"alignright size-thumbnail wp-image-17480\" alt=\"soap\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/soap-150x90.jpg\" width=\"150\" height=\"90\" \/><\/a><\/p>\n<p>In REST, on the other hand, the interface is made up of code and data. We\u2019ve already seen the data: the representation described by the media type. The code is the <a href=\"http:\/\/www.ics.uci.edu\/~fielding\/pubs\/dissertation\/rest_arch_style.htm#sec_5_1_5\" target=\"_blank\" rel=\"nofollow\">uniform interface<\/a>, which means that it\u2019s the same (uniform) for all resources.<\/p>\n<p>In practice, the uniform interface consists of the <a title=\"RFC 2616\" href=\"http:\/\/tools.ietf.org\/html\/rfc2616#section-9\" target=\"_blank\">HTTP methods<\/a> GET, POST, PUT, and DELETE.<\/p>\n<p>Since the uniform interface is fixed for all resources, <a title=\"REST APIs must be hypertext-driven\" href=\"http:\/\/roy.gbiv.com\/untangled\/2008\/rest-apis-must-be-hypertext-driven\" target=\"_blank\" rel=\"nofollow\">the real juice in any RESTful service is not in the code, but in the data: the media type<\/a>.<\/p>\n<p>Just as there are rules for evolving a Java interface, there are rules for evolving a media type, for example for <a title=\"Versioning XML Schemas\" href=\"http:\/\/www.subbu.org\/blog\/2005\/03\/versioning-xml-schemas\" target=\"_blank\" rel=\"nofollow\">XML-based media types<\/a>. (From this it follows that <a title=\"How To Implement Input Validation For REST Resources\" href=\"http:\/\/securesoftwaredev.com\/2013\/08\/19\/how-to-implement-input-validation-for-rest-resources\/\" target=\"_blank\">you can\u2019t use XML Schema validation for XML-based media types<\/a>.)<\/p>\n<h3>Uniform Resource Identifiers<\/h3>\n<p>So far I haven\u2019t mentioned <a title=\"RFC 3986\" href=\"http:\/\/tools.ietf.org\/html\/rfc3986\" target=\"_blank\">Uniform Resource Identifiers<\/a> (URIs). The documentation of many <a title=\"Classification of HTTP-based APIs\" href=\"http:\/\/www.nordsc.com\/ext\/classification_of_http_based_apis.html\" target=\"_blank\" rel=\"nofollow\">so-called RESTful <\/a>services may give you the impression that they are important.<\/p>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/identity.jpg\"><img decoding=\"async\" class=\"alignleft size-thumbnail wp-image-17481\" alt=\"identity\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/identity-108x150.jpg\" width=\"108\" height=\"150\" \/><\/a>However, since URIs identify resources, their equivalent in micro-services are the identities of the objects implementing the interfaces.<\/p>\n<p>Hopefully this shows that clients shouldn\u2019t care about URIs. Only the URI of the home resource is important.<\/p>\n<p>The representation of the home resource contains links to other resources. The meaning of those links is indicated by <a title=\"RFC 5988\" href=\"http:\/\/tools.ietf.org\/html\/rfc5988#section-4\" target=\"_blank\" rel=\"nofollow\">link relations<\/a>.<\/p>\n<p>Through its understanding of link relations, a client can decide which links it wants to follow and discover their URIs from the representation.<\/p>\n<h3>Versions of Services<\/h3>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/evolution.jpg\"><img decoding=\"async\" class=\"alignright size-thumbnail wp-image-17482\" alt=\"evolution\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/evolution-150x66.jpg\" width=\"150\" height=\"66\" \/><\/a>As much as possible, we should follow the rules for evolving media types and not introduce any breaking changes.<\/p>\n<p>However, sometimes that might be unavoidable. We should then create a new version of the service.<\/p>\n<p>Since URIs are not part of the public interface of a RESTful API, they are not the right vehicle for <a title=\"Versioning RESTful Web Resources - A Survey\" href=\"http:\/\/www.stucharlton.com\/blog\/archives\/2010\/03\/versioning-restful-web-resources---a-survey.html\" target=\"_blank\" rel=\"nofollow\">relaying version information<\/a>. The correct way to indicate major (i.e. non-compatible) versions of an API can be derived by comparison with micro-services.<\/p>\n<p>Whenever a service introduces a breaking change, it should change its interface. In a RESTful API, this means changing the media type. The client can then use <a title=\"RFC 2616\" href=\"http:\/\/tools.ietf.org\/html\/rfc2616#section-12\" target=\"_blank\" rel=\"nofollow\">content negotiation<\/a> to request a media type it understands.<\/p>\n<h3>What Do You Think?<\/h3>\n<p><a href=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/what-do-you-think.jpg\"><img decoding=\"async\" class=\"alignleft size-thumbnail wp-image-17483\" alt=\"what-do-you-think\" src=\"http:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2013\/09\/what-do-you-think-120x150.jpg\" width=\"120\" height=\"150\" \/><\/a>Literature explaining how to design and document code-based interfaces is readily available.<\/p>\n<p>This is not the case for data-based interfaces like media types.<\/p>\n<p>With RESTful services becoming ever more popular, that is a gap that needs filling. I\u2019ll get back to this topic in the future.<\/p>\n<p>How do you design your services? How do you document them?<br \/>\n&nbsp;<\/p>\n<div style=\"border: 1px solid #D8D8D8; background: #FAFAFA; width: 100%; padding-left: 5px;\"><b><i>Reference: <\/i><\/b><a href=\"http:\/\/securesoftwaredev.com\/2013\/09\/16\/rest-101-for-developers\/\">REST 101 For Developers<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/jcg\">JCG partner<\/a> Remon Sinnema at the <a href=\"http:\/\/securesoftwaredev.com\/\">Secure Software Development<\/a> blog.<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from having to think about memory addresses. Methods and polymorphism in object-oriented languages like Java add another level of indirection that frees us from having to think about the specific variant &hellip;<\/p>\n","protected":false},"author":280,"featured_media":112,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[54],"class_list":["post-17409","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-restful-web-services"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>REST 101 For Developers<\/title>\n<meta name=\"description\" content=\"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"REST 101 For Developers\" \/>\n<meta property=\"og:description\" content=\"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-09-21T13:47:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Remon Sinnema\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Remon Sinnema\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html\"},\"author\":{\"name\":\"Remon Sinnema\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2be19454dea628d08c8d74390e39aa1f\"},\"headline\":\"REST 101 For Developers\",\"datePublished\":\"2013-09-21T13:47:33+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html\"},\"wordCount\":1158,\"commentCount\":7,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"keywords\":[\"RESTful Web Services\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html\",\"name\":\"REST 101 For Developers\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"datePublished\":\"2013-09-21T13:47:33+00:00\",\"description\":\"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/enterprise-java-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"java-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/09\\\/rest-101-for-developers.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"REST 101 For Developers\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/2be19454dea628d08c8d74390e39aa1f\",\"name\":\"Remon Sinnema\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g\",\"caption\":\"Remon Sinnema\"},\"sameAs\":[\"http:\\\/\\\/securesoftwaredev.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/Remon-Sinnema\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"REST 101 For Developers","description":"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html","og_locale":"en_US","og_type":"article","og_title":"REST 101 For Developers","og_description":"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from","og_url":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-09-21T13:47:33+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","type":"image\/jpeg"}],"author":"Remon Sinnema","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Remon Sinnema","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html"},"author":{"name":"Remon Sinnema","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2be19454dea628d08c8d74390e39aa1f"},"headline":"REST 101 For Developers","datePublished":"2013-09-21T13:47:33+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html"},"wordCount":1158,"commentCount":7,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","keywords":["RESTful Web Services"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html","url":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html","name":"REST 101 For Developers","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","datePublished":"2013-09-21T13:47:33+00:00","description":"Local Code Execution Functions in high-level languages like C are compiled into procedures in assembly. They add a level of indirection that frees us from","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/enterprise-java-logo.jpg","width":150,"height":150,"caption":"java-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/09\/rest-101-for-developers.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"REST 101 For Developers"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/2be19454dea628d08c8d74390e39aa1f","name":"Remon Sinnema","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c1c904b7cd0db78ca7fc1f5f60f05a86efe698d67f440bfbba705956d18c02d3?s=96&d=mm&r=g","caption":"Remon Sinnema"},"sameAs":["http:\/\/securesoftwaredev.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/Remon-Sinnema"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/17409","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/280"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=17409"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/17409\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/112"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=17409"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=17409"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=17409"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}