<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dw="https://www.dreamwidth.org">
  <id>tag:dreamwidth.org,2009-04-10:30813</id>
  <title>Dreamwidth Development Training</title>
  <subtitle>Dreamwidth Development Training</subtitle>
  <author>
    <name>Dreamwidth Development Training</name>
  </author>
  <link rel="alternate" type="text/html" href="https://dw-dev-training.dreamwidth.org/"/>
  <link rel="self" type="text/xml" href="https://dw-dev-training.dreamwidth.org/data/atom"/>
  <updated>2012-05-01T22:28:12Z</updated>
  <dw:journal username="dw_dev_training" type="community"/>
  <entry>
    <id>tag:dreamwidth.org,2009-04-10:30813:34384</id>
    <author>
      <name>Sophie</name>
    </author>
    <dw:poster user="sophie"/>
    <link rel="alternate" type="text/html" href="https://dw-dev-training.dreamwidth.org/34384.html"/>
    <link rel="self" type="text/xml" href="https://dw-dev-training.dreamwidth.org/data/atom/?itemid=34384"/>
    <title>DW object-oriented programming explained (Part 3) - using classes</title>
    <published>2012-05-01T22:16:31Z</published>
    <updated>2012-05-01T22:28:12Z</updated>
    <category term="object-oriented programming"/>
    <category term="beginner guide"/>
    <category term="perl"/>
    <dw:security>public</dw:security>
    <dw:reply-count>0</dw:reply-count>
    <content type="html">Posted by: &lt;span lj:user='sophie' style='white-space: nowrap;' class='ljuser'&gt;&lt;a href='https://sophie.dreamwidth.org/profile'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://sophie.dreamwidth.org/'&gt;&lt;b&gt;sophie&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It's been a while since I posted anything in &lt;a href="http://dw-dev-training.dreamwidth.org/tag/object-oriented+programming"&gt;this series of entries&lt;/a&gt;, and I apologise for that! Today, though, I'll be explaining how to actually use classes in Perl and the Dreamwidth code and constructing new objects.&lt;br /&gt;&lt;br /&gt;&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___1" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://dw-dev-training.dreamwidth.org/34384.html#cutid1"&gt;How do you use classes?&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___1" aria-live="assertive"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;That's a lot to take in, so I'll leave off for now! I hope I've explained things well, but I'm sure that there are bits that are going to be incomprehensible. If you need me to explain anything further, please ask in the comments - I'll be happy to try to explain it.&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=34384" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2009-04-10:30813:32468</id>
    <author>
      <name>Sophie</name>
    </author>
    <dw:poster user="sophie"/>
    <link rel="alternate" type="text/html" href="https://dw-dev-training.dreamwidth.org/32468.html"/>
    <link rel="self" type="text/xml" href="https://dw-dev-training.dreamwidth.org/data/atom/?itemid=32468"/>
    <title>DW object-oriented programming explained (Part 2)</title>
    <published>2012-02-17T23:27:28Z</published>
    <updated>2012-05-01T22:01:23Z</updated>
    <category term="perl"/>
    <category term="beginner guide"/>
    <category term="object-oriented programming"/>
    <dw:security>public</dw:security>
    <dw:reply-count>18</dw:reply-count>
    <content type="html">Posted by: &lt;span lj:user='sophie' style='white-space: nowrap;' class='ljuser'&gt;&lt;a href='https://sophie.dreamwidth.org/profile'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://sophie.dreamwidth.org/'&gt;&lt;b&gt;sophie&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Welcome to the second part of the series on object-oriented programming - or OO - as it applies to the Dreamwidth codebase. :)&lt;br /&gt;&lt;br /&gt;If you haven't already read the &lt;a href="http://dw-dev-training.dreamwidth.org/31843.html"&gt;first part&lt;/a&gt;, you'll want to do that before reading this part. I also realise that I never got around to explaining what 'methods' are in the first post, so I'm going to do that right now before delving into the main part of this post:&lt;br /&gt;&lt;br /&gt;&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___1" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://dw-dev-training.dreamwidth.org/32468.html#cutid1"&gt;What are methods?&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___1" aria-live="assertive"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As with the last post, if you have any questions on this, feel free to let me know in the comments!&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;So, with that explanation of methods out of the way, it's time to move onto our next topic - how it applies to the DW codebase.&lt;br /&gt;&lt;br /&gt;I'm going to do this as a few posts, each dealing with their own topic, because I've got a fair amount to say about them. I'm still not entirely sure how many there'll be, but I'm writing them one at a time so there may be some time (a few days to a week) between each one.&lt;br /&gt;&lt;br /&gt;A couple of things to note before I begin:&lt;ul&gt;&lt;li&gt;This post may require some basic knowledge of Perl and/or programming in general. Not much, I promise! (Things such as what a 'string' is, etc.) But all the same, if anybody finds themselves confused by anything I write, feel free to ask for clarification in the comments. I won't bite!&lt;/li&gt;&lt;br /&gt;&lt;li&gt;Secondly, if you're used to OO from another language, you'll find some things about Perl's implementation of OO to be strange and baffling. That's because Perl wasn't actually designed with OO in mind; OO support came later, and to be honest, it shows. Still, it's what we use, so I hope I can at least help with understanding it.&lt;sup&gt;&lt;a href="#dw-oo2-perl6"&gt;(**)&lt;/a&gt;&lt;/sup&gt;&lt;br /&gt;&lt;br /&gt;&lt;div&gt;&lt;small&gt;&lt;sup&gt;(**)&lt;/sup&gt; There &lt;em&gt;is&lt;/em&gt; a version of Perl in the works which does a much better job of not only OO but a lot of other things - &lt;a href="http://dev.perl.org/perl6/"&gt;Perl 6&lt;/a&gt; - but at the cost of revamping a lot of the language such that you probably wouldn't be able to use it without spending some time making sure your code conformed to it. For this series, therefore, I'll be concentrating on Perl 5, which is what most Perl developers - including DW and LJ - use.&lt;/small&gt;&lt;/div&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;br /&gt;With all that said, let's move onto our first topic!&lt;br /&gt;&lt;br /&gt;&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___2" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://dw-dev-training.dreamwidth.org/32468.html#cutid2"&gt;What is an 'object' in Perl?&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___2" aria-live="assertive"&gt;&lt;/div&gt;&lt;br /&gt;&lt;hr&gt;&lt;br /&gt;That's about it for this post. There's a lot of stuff here so feel free to ask questions if there's anything you don't understand! My next post will probably talk about how you can create and use an object, as well as some example of existing classes in the codebase.&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=32468" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
  <entry>
    <id>tag:dreamwidth.org,2009-04-10:30813:31843</id>
    <author>
      <name>Sophie</name>
    </author>
    <dw:poster user="sophie"/>
    <link rel="alternate" type="text/html" href="https://dw-dev-training.dreamwidth.org/31843.html"/>
    <link rel="self" type="text/xml" href="https://dw-dev-training.dreamwidth.org/data/atom/?itemid=31843"/>
    <title>DW object-oriented programming explained (Part 1)</title>
    <published>2012-02-13T21:11:48Z</published>
    <updated>2012-02-13T21:11:48Z</updated>
    <category term="object-oriented programming"/>
    <category term="beginner guide"/>
    <dw:security>public</dw:security>
    <dw:reply-count>8</dw:reply-count>
    <content type="html">Posted by: &lt;span lj:user='sophie' style='white-space: nowrap;' class='ljuser'&gt;&lt;a href='https://sophie.dreamwidth.org/profile'&gt;&lt;img src='https://www.dreamwidth.org/img/silk/identity/user.png' alt='[personal profile] ' width='17' height='17' style='vertical-align: text-bottom; border: 0; padding-right: 1px;' /&gt;&lt;/a&gt;&lt;a href='https://sophie.dreamwidth.org/'&gt;&lt;b&gt;sophie&lt;/b&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The Dreamwidth codebase uses object-oriented programming a lot, or "OO" as it's known. But what exactly &lt;em&gt;is&lt;/em&gt; OO? In this post I'm going to explain the concepts of OO. I plan this to be the first in a series; in later posts I'll explain how OO programming relates to the DW codebase, some gotchas that might arise, and other such things.&lt;br /&gt;&lt;br /&gt;For now though, an introduction to the basic concepts of OO!&lt;br /&gt;&lt;br /&gt;&lt;span class="cut-wrapper"&gt;&lt;span style="display: none;" id="span-cuttag___1" class="cuttag"&gt;&lt;/span&gt;&lt;b class="cut-open"&gt;(&amp;nbsp;&lt;/b&gt;&lt;b class="cut-text"&gt;&lt;a href="https://dw-dev-training.dreamwidth.org/31843.html#cutid1"&gt;So, what is OO exactly?&lt;/a&gt;&lt;/b&gt;&lt;b class="cut-close"&gt;&amp;nbsp;)&lt;/b&gt;&lt;/span&gt;&lt;div style="display: none;" id="div-cuttag___1" aria-live="assertive"&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And that, in a nutshell, is what OO is all about. In the next post on this subject - which may be in a few days or a week, I don't know yet - I'll be talking about how this applies to the Dreamwidth codebase. :)&lt;br /&gt;&lt;br /&gt;If anybody has any questions so far about what I've said in this post, please feel free to comment!&lt;br /&gt;&lt;br /&gt;&lt;img src="https://www.dreamwidth.org/tools/commentcount?user=dw_dev_training&amp;ditemid=31843" width="30" height="12" alt="comment count unavailable" style="vertical-align: middle;"/&gt; comments</content>
  </entry>
</feed>
