{"id":1039,"date":"2017-12-19T18:03:00","date_gmt":"2017-12-20T00:03:00","guid":{"rendered":"https:\/\/2018.albuquerque.wordcamp.org\/?post_type=wcb_session&#038;p=1039"},"modified":"2018-01-03T14:24:55","modified_gmt":"2018-01-03T20:24:55","slug":"help-theres-too-much-spaghetti-apis","status":"publish","type":"wcb_session","link":"https:\/\/albuquerque.wordcamp.org\/2018\/session\/help-theres-too-much-spaghetti-apis\/","title":{"rendered":"Help! There&#8217;s Too Much Spaghetti in My APIs"},"content":{"rendered":"<p>Another topic on REST? Yes! In fact, URLs and JSON is only the beginning of what we can learn about building APIs for use in our web applications.<\/p>\n<p>In this talk we\u2019re specifically going to look at how a combination of REST principles and modeling our processes and dialogs as state machines can dramatically simplify our client applications and API exchanges.<\/p>\n<p>Why would you want to hear more about this subject? As we all start working more in the browser and communicate back to WordPress via API calls it\u2019s easy for the complexity to start stacking up and overwhelming us! In fact, API design isn\u2019t necessarily intuitive and the web is full of noisy advice.<\/p>\n<p>We\u2019ll use an example Gutenberg plugin to walk through a very common scenario dealing with interactive processes and we\u2019ll see how a few design principles can save us the headaches of race conditions, code bloat, and changing requirements. We\u2019ll examine how \u201cstate machines\u201d can guide us and simplify complex business logic and we\u2019ll explore how \u201cHATEOAS\u201d and REST pair with these machines to simplify complex application and UI logic.<\/p>\n<p>Whether you are just starting to write your own APIs and API clients or you have been churning them out for years I invite you to join this design session; we\u2019ll stay away from nitty-gritty code details and instead focus on general principles we can apply in any coding environment.<\/p>\n<p>It\u2019s my hope that after participating in this session you will be able to confidently work with: indicating loading states; testing and debugging forms, processes, and uploads; untangle complicated business rules dealing with things like authentication, limiting, validation, and triggering related activity; and end up with well documented means of doing so.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Another topic on REST? Yes! In fact, URLs and JSON is only the beginning of what we can learn about building APIs for use in our web applications. In this talk we\u2019re specifically going to look at how a combination of REST principles and modeling our processes and dialogs as state machines can dramatically simplify &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/albuquerque.wordcamp.org\/2018\/session\/help-theres-too-much-spaghetti-apis\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Help! There&#8217;s Too Much Spaghetti in My APIs&#8221;<\/span><\/a><\/p>\n","protected":false},"author":14681196,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1516487400,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[972],"footnotes":""},"session_track":[5041,643127],"session_category":[],"class_list":["post-1039","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-developer","wcb_track-track-c"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p8qGgJ-gL","jetpack_likes_enabled":true,"session_date_time":{"date":"January 20, 2018","time":"4:30 pm"},"session_speakers":[{"id":"972","slug":"dennis-snell","name":"Dennis Snell","link":"https:\/\/albuquerque.wordcamp.org\/2018\/speaker\/dennis-snell\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/types\/wcb_session"}],"author":[{"embeddable":true,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/users\/14681196"}],"version-history":[{"count":3,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1039\/revisions"}],"predecessor-version":[{"id":1341,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/1039\/revisions\/1341"}],"speakers":[{"embeddable":true,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/speakers\/972"}],"wp:attachment":[{"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/media?parent=1039"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_track?post=1039"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/albuquerque.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_category?post=1039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}