{"id":1273,"date":"2012-08-15T15:53:06","date_gmt":"2012-08-15T19:53:06","guid":{"rendered":"http:\/\/antipaucity.com\/?p=1273"},"modified":"2012-08-15T15:53:06","modified_gmt":"2012-08-15T19:53:06","slug":"restful-webservices","status":"publish","type":"post","link":"https:\/\/merikebi.warrenmyers.com\/?p=1273","title":{"rendered":"restful webservices"},"content":{"rendered":"<p>My friend <a href=\"http:\/\/theexceptioncatcher.com\/blog\">Steven<\/a> recently wrote about <a href=\"http:\/\/theexceptioncatcher.com\/blog\/2012\/07\/the-linguistics-of-webservices\">linguistics in webservices<\/a>.<\/p>\n<p>In it he postulates that since all &#8220;good code&#8221; should resemble speech, webservices should use linguistically-tied approaches to their APIs. In short, it&#8217;s an article on RESTful websites being used in a linguistically-understandable way.<\/p>\n<p>For example:<\/p>\n<blockquote><p><code>http:\/\/searchengine.com\/search\/keyword1\/keyword2\/not:keyword3<\/code><\/p><\/blockquote>\n<p>should run your query against the search engine, so you can always tell what it is doing, and how it works.<\/p>\n<p>Personally, I think this is a great idea &#8211; it goes with the concept that all URIs should be truly &#8220;permanent&#8221;, and that the web should be understandable by mere mortals.<\/p>\n<p>I am perennially surprised that companies use horrid URL formats when simple ones can be done. For example, WordPress uses a <code>.htaccess<\/code> file and Apache&#8217;s mod_rewrite to make URLs look nice.<\/p>\n<p>Why can&#8217;t Newegg do the same? Surely &#8220;<code>http:\/\/www.newegg.com\/Product\/ProductList.aspx?Submit=ENE&amp;N=100019151%2050001707&amp;IsNodeId=1&amp;name=Activision&amp;SpeTabStoreType=8<\/code>&#8221; is not friendly to remember, or to query outside of the site itself. And that&#8217;s only a small example &#8211; the more filters added, the worse the URL becomes.<\/p>\n<p>Then consider the URLs that get created when a site uses something like FeedBurner to handle its RSS feeds &#8211; heaven help you those URLs can look <strong><em>ugly<\/em><\/strong>!<\/p>\n<p>Creating a RESTful approach is not all that difficult, and every web developer should be required to do it.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My friend Steven recently wrote about linguistics in webservices. In it he postulates that since all &#8220;good code&#8221; should resemble speech, webservices should use linguistically-tied approaches to their APIs. In short, it&#8217;s an article on RESTful websites being used in a linguistically-understandable way. For example: http:\/\/searchengine.com\/search\/keyword1\/keyword2\/not:keyword3 should run your query against the search engine, so &hellip;<br \/><a href=\"https:\/\/merikebi.warrenmyers.com\/?p=1273\" class=\"more-link pen_button pen_element_default pen_icon_arrow_double\">Continue reading <span class=\"screen-reader-text\">restful webservices<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_hide_featured_image":false,"_jetpack_featured_image_duplicate_dismissed":0,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[41],"tags":[448,631,841],"keyring_services":[],"class_list":["post-1273","post","type-post","status-publish","format-standard","hentry","category-technical","tag-linguistics","tag-restful","tag-webservices"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/1273","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1273"}],"version-history":[{"count":0,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=\/wp\/v2\/posts\/1273\/revisions"}],"wp:attachment":[{"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1273"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1273"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1273"},{"taxonomy":"keyring_services","embeddable":true,"href":"https:\/\/merikebi.warrenmyers.com\/index.php?rest_route=%2Fwp%2Fv2%2Fkeyring_services&post=1273"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}