{"id":637,"date":"2017-01-26T08:04:10","date_gmt":"2017-01-26T13:04:10","guid":{"rendered":"https:\/\/2017.atlanta.wordcamp.org\/?post_type=wcb_session&#038;p=637"},"modified":"2017-03-26T11:07:39","modified_gmt":"2017-03-26T15:07:39","slug":"namespaces-autoloading-and-improving-plugin-architecture","status":"publish","type":"wcb_session","link":"https:\/\/atlanta.wordcamp.org\/2017\/session\/namespaces-autoloading-and-improving-plugin-architecture\/","title":{"rendered":"Namespaces, Autoloading, and Improving Plugin Architecture"},"content":{"rendered":"<p>Imagine, for a moment, the ability to add a new class to your WordPress plugin and not have to worry about adding a new include statement and having the ability to organize the class into a pre-defined package structure.<\/p>\n<p>Sounds nice, right?<\/p>\n<p>Unfortunately, one of the problems that WordPress plugins developers face is having to work with older versions of PHP. But it&#8217;s really not as bad as you may think.<\/p>\n<p>Although we sometimes, we sometimes have the ability to use newer versions of PHP (and that&#8217;s great), it doesn&#8217;t mean we have to forgo poor development practices.<\/p>\n<p>See, depending on the paradigm with which we build our projects (namely, object-oriented programming), we have the ability to take a lot of redundant code out of our plugins.<\/p>\n<p>Furthermore, we have the ability to more easily organize our code at both a conceptual level and at a virtual level.<\/p>\n<p>In this presentation, I walk everyone through namespaces and autoloading, explain how they work, why they are beneficial, and then will show sample example code on how it works. I&#8217;ll also provide a downloadable plugin that they can use to study.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Imagine, for a moment, the ability to add a new class to your WordPress plugin and not have to worry about adding a new include statement and having the ability to organize the class into a pre-defined package structure. Sounds &hellip; <a href=\"https:\/\/atlanta.wordcamp.org\/2017\/session\/namespaces-autoloading-and-improving-plugin-architecture\/\">Continue reading <span class=\"assistive-text\">Namespaces, Autoloading, and Improving Plugin Architecture<\/span>  <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":7342218,"featured_media":0,"template":"","meta":{"jetpack_post_was_ever_published":false,"_wcpt_session_time":1489845600,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_session_slides":"https:\/\/speakerdeck.com\/tommcfarlin\/namespaces-and-autoloading-improving-wordpress-plugin-architecture","_wcpt_session_video":"http:\/\/wordpress.tv\/2017\/03\/24\/tom-mcfarlin-namespaces-autoloading-and-improving-plugin-architecture\/","_wcpt_speaker_id":[636],"footnotes":""},"session_track":[269666],"session_category":[],"class_list":["post-637","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-mark-c-pope"],"jetpack_sharing_enabled":true,"session_date_time":{"date":"March 18, 2017","time":"10:00 am"},"session_speakers":[{"id":"636","slug":"tom-mcfarlin","name":"Tom McFarlin","link":"https:\/\/atlanta.wordcamp.org\/2017\/speaker\/tom-mcfarlin\/"}],"session_cats_rendered":null,"_links":{"self":[{"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/637","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":1,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/637\/revisions"}],"predecessor-version":[{"id":1411,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/sessions\/637\/revisions\/1411"}],"speakers":[{"embeddable":true,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/speakers\/636"}],"author":[{"embeddable":true,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wporg\/v1\/users\/tommcfarlin"}],"wp:attachment":[{"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/media?parent=637"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_track?post=637"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/atlanta.wordcamp.org\/2017\/wp-json\/wp\/v2\/session_category?post=637"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}