<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" 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/" > <channel><title>Comments on: php &#8216;included&#8217; menu styling</title> <atom:link href="http://cssgallery.info/php-included-menu-styling/feed/" rel="self" type="application/rss+xml" /><link>http://cssgallery.info/php-included-menu-styling/</link> <description>Resources for web and mobile developers</description> <lastBuildDate>Fri, 23 Sep 2011 19:22:26 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <item><title>By: chris</title><link>http://cssgallery.info/php-included-menu-styling/comment-page-1/#comment-19</link> <dc:creator>chris</dc:creator> <pubDate>Thu, 24 Jan 2008 09:23:27 +0000</pubDate> <guid isPermaLink="false">http://cssgallery.info/php-included-menu-styling/#comment-19</guid> <description>You are right: It is easier to have just one menu.php file.So you made the step and refactored the code from multiple files into one file. Now go a step further and look how often your wrote the same code in menu.php.1. DRY up your code (http://en.wikipedia.org/wiki/Don%27t_repeat_yourself) 2. Then move your logic out of the presentation code.</description> <content:encoded><![CDATA[<p>You are right: It is easier to have just one menu.php file.</p><p>So you made the step and refactored the code from multiple files into one file. Now go a step further and look how often your wrote the same code in menu.php.</p><p>1. DRY up your code (<a href="http://en.wikipedia.org/wiki/Don%27t_repeat_yourself" rel="nofollow">http://en.wikipedia.org/wiki/Don%27t_repeat_yourself</a>)<br /> 2. Then move your logic out of the presentation code.</p> ]]></content:encoded> </item> <item><title>By: Lush</title><link>http://cssgallery.info/php-included-menu-styling/comment-page-1/#comment-18</link> <dc:creator>Lush</dc:creator> <pubDate>Mon, 21 Jan 2008 18:08:06 +0000</pubDate> <guid isPermaLink="false">http://cssgallery.info/php-included-menu-styling/#comment-18</guid> <description>For Chris:I do not understand why you say it&#039;s this the hard way. I applied this idea on a site and it seems easier to have just one menu.php file with that code or include it in the header file.It&#039;s so easy that even my client can update the menu all by himself by editing just ONE file instead of X files.If you have another solution, please share it with us.Thank you,</description> <content:encoded><![CDATA[<p>For Chris:</p><p>I do not understand why you say it&#8217;s this the hard way. I applied this idea on a site and it seems easier to have just one menu.php file with that code or include it in the header file.</p><p>It&#8217;s so easy that even my client can update the menu all by himself by editing just ONE file instead of X files.</p><p>If you have another solution, please share it with us.</p><p>Thank you,</p> ]]></content:encoded> </item> <item><title>By: chris</title><link>http://cssgallery.info/php-included-menu-styling/comment-page-1/#comment-17</link> <dc:creator>chris</dc:creator> <pubDate>Sun, 20 Jan 2008 14:44:11 +0000</pubDate> <guid isPermaLink="false">http://cssgallery.info/php-included-menu-styling/#comment-17</guid> <description>&gt; We can do this the hard way - copy [...]Sorry, but your way is the hard way. Look how often you copied the same code. Further you do not seperate logic with view code, which eventually become a maintainance nightmare...You are on the right way, though. &quot;Don&#039;t repeat yourself&quot; is not only valid for CSS/HTML Code, especially you have to apply it to your PHP code.</description> <content:encoded><![CDATA[<p>&gt; We can do this the hard way &#8211; copy [...]</p><p>Sorry, but your way is the hard way. Look how often you copied the same code. Further you do not seperate logic with view code, which eventually become a maintainance nightmare&#8230;</p><p>You are on the right way, though. &#8220;Don&#8217;t repeat yourself&#8221; is not only valid for CSS/HTML Code, especially you have to apply it to your PHP code.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: basic (User agent is rejected)
Database Caching 6/19 queries in 0.072 seconds using disk: basic

Served from: www.cssgallery.info @ 2012-02-09 21:00:58 -->
