{"id":835639,"date":"2014-04-17T12:16:44","date_gmt":"2014-04-17T17:16:44","guid":{"rendered":"https:\/\/2014.chicago.wordcamp.org\/?post_type=wcb_session&#038;p=835639"},"modified":"2014-04-30T08:17:45","modified_gmt":"2014-04-30T13:17:45","slug":"modular-javascript","status":"publish","type":"wcb_session","link":"https:\/\/chicago.wordcamp.org\/2014\/session\/modular-javascript\/","title":{"rendered":"Modular JavaScript"},"content":{"rendered":"<p>We\u2019re long past the days where a few lines of JavaScript in a single .js file cut the mustard\u2014modern web applications can involve thousands of lines over hundreds of files, and WordPress themes and plugins are heading in that direction fast. You can make your codebase much easier to maintain and expand by breaking your scripts up into modules, encapsulating different logical units in their own files. We will learn several ways to modularize your code, with a focus on AMD and Require.js. All these files can take a while to load, so we\u2019ll also look at how to use a build tool to author your code in dozens of files without compromising performance for your end users. To close, we\u2019ll take a quick peek into the future to discover the native module syntax coming in the next version of JavaScript!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We\u2019re long past the days where a few lines of JavaScript in a single .js file cut the mustard\u2014modern web applications can involve thousands of lines over hundreds of files, and WordPress themes and plugins are heading in that direction fast. You can make your codebase much easier to maintain and expand by breaking your &hellip; <a href=\"https:\/\/chicago.wordcamp.org\/2014\/session\/modular-javascript\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Modular JavaScript<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":5896197,"featured_media":0,"template":"","meta":{"_crdt_document":"","jetpack_post_was_ever_published":false,"_wcpt_session_time":1402776000,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"","_wcpt_session_video":"","_wcpt_speaker_id":[829718],"footnotes":""},"session_track":[296669,155858],"session_category":[],"class_list":["post-835639","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-advanced-developers","wcb_track-engineer"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"June 14, 2014","time":"3:00 pm"},"session_speakers":[{"id":"829718","slug":"k-adam-white","name":"K.Adam White","link":"https:\/\/chicago.wordcamp.org\/2014\/speaker\/k-adam-white\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/835639","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":1,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/835639\/revisions"}],"predecessor-version":[{"id":835640,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/sessions\/835639\/revisions\/835640"}],"speakers":[{"embeddable":true,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/speakers\/829718"}],"author":[{"embeddable":true,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wporg\/v1\/users\/kadamwhite"}],"wp:attachment":[{"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/media?parent=835639"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_track?post=835639"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/chicago.wordcamp.org\/2014\/wp-json\/wp\/v2\/session_category?post=835639"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}