<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Yet another blog about PHP, HTML and CSS &#187; OOP</title>
	<atom:link href="http://blog.pepa.info/php-html-css/category/oop/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.pepa.info</link>
	<description>Petr 'PePa' Pavel</description>
	<lastBuildDate>Thu, 19 Aug 2010 18:17:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>A Conversation with Martin Fowler</title>
		<link>http://blog.pepa.info/php-html-css/uncategorized/a-conversation-with-martin-fowler/</link>
		<comments>http://blog.pepa.info/php-html-css/uncategorized/a-conversation-with-martin-fowler/#comments</comments>
		<pubDate>Fri, 03 Nov 2006 18:27:03 +0000</pubDate>
		<dc:creator>Petr 'PePa' Pavel</dc:creator>
				<category><![CDATA[OOP]]></category>
		<category><![CDATA[Refactoring]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.pepa.info/2006/11/uncategorized/a-conversation-with-martin-fowler/</guid>
		<description><![CDATA[Artima Software website seems to contain a lot of interesting materials on design. Here&#8217;s a list of links to all parts of interview with Martin Fowler. Refactoring with Martin Fowler Design Principles and Code Ownership Evolutionary Design Flexibility and Complexity Test-Driven Development Tuning Performance and Process To see what other interviews they have in stock [...]]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://www.artima.com/">Artima Software website</a> seems to contain a lot of interesting materials on design. Here&#8217;s a list of links to all parts of interview with <a href="http://blog.pepa.info/2006/09/literature/refactoring-improving-the-design-of-existing-code/">Martin Fowler</a>.<span id="more-8"></span></p>
<ol>
<li><a target="_blank" href="http://www.artima.com/intv/refactorP.html"><span class="ts">Refactoring with Martin Fowler</span></a></li>
<li><span class="ts"><a target="_blank" href="http://www.artima.com/intv/principlesP.html">Design Principles and Code Ownership</a><br />
</span></li>
<li><a target="_blank" href="http://www.artima.com/intv/evolutionP.html"><span class="ts">Evolutionary Design</span></a></li>
<li><a target="_blank" href="http://www.artima.com/intv/flexplexP.html"><span class="ts">Flexibility and Complexity</span></a></li>
<li><a target="_blank" href="http://www.artima.com/intv/testdrivenP.html"><span class="ts">Test-Driven Development</span></a></li>
<li><a target="_blank" href="http://www.artima.com/intv/tunableP.html"><span class="ts">Tuning Performance and Process</span></a></li>
</ol>
<p>To see what other interviews they have in stock try <a target="_blank" href="http://www.artima.com/intv/">Artima.com Interviews</a> page.</p>
<p>I&#8217;m looking forward to read series with Andy Hunt and Dave Thomas, the authors of The Pragmatic Programmer: From Journeyman to Master (Addison-Wesley, 1999).</p>
<p>Surprisingly enough, you won&#8217;t find there a list of <a href="http://blog.pepa.info/2006/11/design-techniques/a-conversation-with-erich-gamma/">interviews with Erich Gamma</a> even though it&#8217;s on the same site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pepa.info/php-html-css/uncategorized/a-conversation-with-martin-fowler/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Refactoring: Improving the Design of Existing Code</title>
		<link>http://blog.pepa.info/php-html-css/literature/refactoring-improving-the-design-of-existing-code/</link>
		<comments>http://blog.pepa.info/php-html-css/literature/refactoring-improving-the-design-of-existing-code/#comments</comments>
		<pubDate>Tue, 12 Sep 2006 09:10:21 +0000</pubDate>
		<dc:creator>Petr 'PePa' Pavel</dc:creator>
				<category><![CDATA[Design Techniques]]></category>
		<category><![CDATA[Literature]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://blog.pepa.info/2006/09/literature/refactoring-improving-the-design-of-existing-code/</guid>
		<description><![CDATA[When thinking about what makes an effective programmer I realized that as with any advanced skill you learn what are the best techniques to do something and you end up using them together as an atomic procedure. You no longer think of the best way to get information from a form and save it into [...]]]></description>
			<content:encoded><![CDATA[<p>When thinking about what makes an effective programmer I realized that as with any advanced skill you learn what are the best techniques to do something and you end up using them together as an atomic procedure. You no longer think of the best way to get information from a form and save it into database. You&#8217;ve brushed it up already and now you use it without thinking twice. You surely have a set of functions / objects to do it but that&#8217;s not my point. I&#8217;m talking about the patterns, not their implementation.<br />
So how do I take a short cut so that I don&#8217;t have to waste my time with inventing my own patterns. I answered to myself: RTFM :-)</p>
<p><span id="more-3"></span></p>
<p><font class="black">That&#8217;s how I found <a target="_blank" href="http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29">design patterns</a> and <a target="_blank" href="http://en.wikipedia.org/wiki/Design_Patterns"><strong>Design Patterns: Elements of Reusable Object-Oriented Software</strong></a> by Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides (</font><a target="_blank" href="http://www.amazon.com/dp/0201633612">ISBN: 0201633612</a>, Addison-Wesley Professional<font class="black">). </font></p>
<p><font class="black">Surprisingly enough it wasn&#8217;t and is not going to be translated by major Czech publisher of computer related literature Grada. Costs for getting it from Amazon.com are discouraging so what now. <em>(see Update below)</em><br />
</font></p>
<p><font class="black"><strong>Refactoring: Improving the Design of Existing Code</strong> by Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts (</font><font class="black"><a target="_blank" href="http://www.amazon.com/dp/0201485672">ISBN: 0201485672</a>, </font><font class="black">Addison-Wesley Professional).</font></p>
<p><font class="black">This book was </font><font class="black">excellently translated by VladimÃ­r Lahoda as </font><font class="black">Refaktoring: ZlepÅ¡enÃ­ existujÃ­cÃ­ho kÃ³du (<a target="_blank" href="http://www.grada.cz/katalog/kniha/refaktoring/">ISBN: 80-247-0299-1</a>, Grada Publishing a.s.</font>) so I was able to get it from a local library for free. <a target="_blank" href="http://en.wikipedia.org/wiki/Refactoring">Refactoring</a> in general may not be always related to what I set out to look for however, this book is full of design patterns indeed.</p>
<p>You learn here how to proceed when you want to change your code without changing the program&#8217;s behaviour. You actually get a cook book of common design problems and step-by-step instructions how to solve them. Please note that it&#8217;s about design &#8211; not implementation or performance problems.</p>
<p>Here&#8217;s what I think this books brings apart from what&#8217;s its obvious goal.</p>
<p><strong><a target="_blank" href="http://en.wikipedia.org/wiki/Code_smell">Code Smells</a> Hints</strong></p>
<p>Because it lists problematic code and solutions to it you get to learn what a problematic code is and why.</p>
<p><strong>You learn OOP as you read it</strong></p>
<p>My blog is meant to be about PHP and this book uses Java for its examples. I don&#8217;t think it matters. The OOP principles behind it are the same.</p>
<p><strong>Gives you arguments</strong></p>
<p>If you ever had to lead a team you know what it means to know the right way but to miss the arguments to support your point of view. You know it but you&#8217;re unable to convince the rest of the team. Now you can use parts of the book.</p>
<p><strong>Question 1</strong></p>
<p>Do you <strong>re</strong>write your code to make it easier to read? Or do you do your best when you write it at the first time and when you need to add more features you just try to hack it as nicely as possible? What are your criteria for a project that is worth refactoring?</p>
<p><strong>Question 2</strong></p>
<p>How do you deal with refactoring from the project management point of view? If you are the boss then how do you promote refactoring &#8211; or how do you keep it within reasonable bounds? If you are the programmer then how do you persuade your boss that refactoring is crucial for your application in the long run? Maybe you don&#8217;t tell him at all and steal time for it like Robin Hood :-)</p>
<p><em>Update</em>:<br />
I just learnt that Czech translation of Design Patterns exists: <strong>NÃ¡vrh programÅ¯ pomocÃ­ vzorÅ¯</strong> (<a target="_blank" href="http://interval.inshop.cz/inshop/scripts/detail.asp?itemid=289">ISBN: 80-247-0302-5</a>, GRADA Publishing<font class="black"> a.s.)</font>. It is sold out though, and Grada doesn&#8217;t plan any reprints.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pepa.info/php-html-css/literature/refactoring-improving-the-design-of-existing-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://blog.pepa.info/php-html-css/literature/welcome/</link>
		<comments>http://blog.pepa.info/php-html-css/literature/welcome/#comments</comments>
		<pubDate>Sun, 10 Sep 2006 16:34:01 +0000</pubDate>
		<dc:creator>Petr 'PePa' Pavel</dc:creator>
				<category><![CDATA[Design Techniques]]></category>
		<category><![CDATA[Literature]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://blog.pepa.info/2006/09/uncategorized/welcome/</guid>
		<description><![CDATA[The reason why I have ever started this blog was to share good ideas with you, the accidental visitor. And hopefully to learn new things through your comments. I&#8217;m working on a post about a book I read (Refactoring: Improving the Design of Existing Code) so subscribe to my RSS feed to get it fresh. [...]]]></description>
			<content:encoded><![CDATA[<p>The reason why I have ever started this blog was to share good ideas with you, the accidental visitor. And hopefully to learn new things through your comments.</p>
<p>I&#8217;m working on a post about a book I read (<a href="http://blog.pepa.info/2006/09/literature/refactoring-improving-the-design-of-existing-code/">Refactoring: Improving the Design of Existing Code</a>) so subscribe to my RSS feed to get it fresh.</p>
<p>I plan to end all of my posts with a set of questions to stir up the conversation and to guide your comments to topics that I&#8217;m insterested in. Read further to see what I come up with to start.<br />
<strong><span id="more-5"></span></strong></p>
<p><strong>Question 1</strong></p>
<p>As far as I know OOP encourages programmers to use a lot of small-task classes and methods as opposed to a little of big-task methods/functions. I understand the advantages but how do you ensure that all methods and their purpose is known to all programmers so that they actually use them instead of writting their own again?<br />
Do you print a diagram of the whole system each month and post it on the office wall?</p>
<p><strong>Question 2</strong></p>
<p>The only projects I deal with are web pages or intranet/extranet applications. For a simple booking script would you still use OOP or would you not mind using well structured linear programming? By well structured I mean a library with shared functions, associative arrays with definitions, constants for types etc. If you would intentionally use OOP (that means not just because you are used to it) then why?</p>
<p>Well, thanks in advance for your comments. Hopefully we all will benefit.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.pepa.info/php-html-css/literature/welcome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
