{"id":625,"date":"2017-12-31T07:15:13","date_gmt":"2017-12-31T07:15:13","guid":{"rendered":"https:\/\/2018.phoenix.wordcamp.org\/?post_type=wcb_session&#038;p=625"},"modified":"2018-02-17T12:04:55","modified_gmt":"2018-02-17T19:04:55","slug":"using-proper-object-oriented-programming-in-your-plugins","status":"publish","type":"wcb_session","link":"https:\/\/phoenix.wordcamp.org\/2018\/session\/using-proper-object-oriented-programming-in-your-plugins\/","title":{"rendered":"Workshop &#8211; Using proper Object-Oriented Programming in your Plugins <em>Development<\/em>"},"content":{"rendered":"<p>Many WordPress developers initially got into programming through WordPress. While it is an often undervalued fact how easy WordPress is to start developing for, it is not coded very efficiently, making the realization of bigger development projects much harder on the flipside. But did you know that you can still use proper OOP techniques when developing WordPress plugins?<\/p>\n<p>While WordPress itself is far away from object-oriented, you can still build your own APIs that are abstracted away from the main software&#8217;s core and more straightforward to use than those ones. This would also allow to easily port your project over to another system, as the main concepts are no longer directly intertwined with WordPress.<\/p>\n<p>This workshop will explain some of the core concepts of object-oriented programming with the example of creating an abstraction layer around the WordPress Admin Menu API. It will highlight different approaches, particularly based on using different PHP versions. By the end of the workshop, you should have a reusable admin pages API implementation for any of your projects requiring it.<\/p>\n<div>\u2014\u2014<\/div>\n<p><small>While it is not necessarily required to have a laptop with development environment set up with you, it is strongly recommended to bring one. The workshop will be given using a GitHub repository. If you wanna actually play around with the code and use it, you should furthermore have a development environment on your machine, with the command line tools\u00a0<a href=\"https:\/\/git-scm.com\/\" target=\"_blank\" rel=\"noopener\">&#8220;git&#8221;<\/a>\u00a0and\u00a0<a href=\"https:\/\/getcomposer.org\/\" target=\"_blank\" rel=\"noopener\">&#8220;composer&#8221;<\/a>\u00a0installed.<\/small><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Many WordPress developers initially got into programming through WordPress. While it is an often undervalued fact how easy WordPress is to start developing for, it is not coded very efficiently, making the realization of bigger development projects much harder on the flipside. But did you know that you can still use proper OOP techniques when &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/phoenix.wordcamp.org\/2018\/session\/using-proper-object-oriented-programming-in-your-plugins\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Workshop &#8211; Using proper Object-Oriented Programming in your Plugins <em>Development<\/em>&#8220;<\/span><\/a><\/p>\n","protected":false},"author":10972453,"featured_media":0,"template":"","meta":{"_wcpt_session_time":1518819300,"_wcpt_session_duration":3000,"_wcpt_session_type":"session","_wcpt_speaker_id":[623],"footnotes":""},"session_track":[12343],"session_category":[12343],"class_list":["post-625","wcb_session","type-wcb_session","status-publish","hentry","wcb_track-workshop","wcb_session_category-workshop"],"jetpack_shortlink":"https:\/\/wp.me\/pheLYL-a5","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"session_date_time":{"date":"February 16, 2018","time":"3:15 pm"},"session_speakers":[{"id":"623","slug":"felix-arntz","name":"Felix Arntz","link":"https:\/\/phoenix.wordcamp.org\/2018\/speaker\/felix-arntz\/"}],"session_cats_rendered":"Workshop","_links":{"self":[{"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions"}],"about":[{"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/types\/wcb_session"}],"version-history":[{"count":6,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/625\/revisions"}],"predecessor-version":[{"id":2518,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/sessions\/625\/revisions\/2518"}],"speakers":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/speakers\/623"}],"author":[{"embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wporg\/v1\/users\/flixos90"}],"wp:attachment":[{"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/media?parent=625"}],"wp:term":[{"taxonomy":"wcb_track","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_track?post=625"},{"taxonomy":"wcb_session_category","embeddable":true,"href":"https:\/\/phoenix.wordcamp.org\/2018\/wp-json\/wp\/v2\/session_category?post=625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}