<?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>TechTrouts.com &#187; naturePhp</title>
	<atom:link href="http://techtrouts.com/topics/naturephp/feed/" rel="self" type="application/rss+xml" />
	<link>http://techtrouts.com</link>
	<description>Doin' the dev dance o/</description>
	<lastBuildDate>Thu, 23 Jul 2009 10:42:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>What about backward compatibility modules?</title>
		<link>http://techtrouts.com/what-about-backward-compatibility-modules/</link>
		<comments>http://techtrouts.com/what-about-backward-compatibility-modules/#comments</comments>
		<pubDate>Sat, 21 Jun 2008 18:32:53 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[management]]></category>
		<category><![CDATA[mootools]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[opinion]]></category>

		<guid isPermaLink="false">http://techtrouts.com/what-about-backward-compatibility-modules/</guid>
		<description><![CDATA[Hi again, being working a lot with mootools, dojo, wordpress and some other frameworks and toolkits lately, my question today is this: Why, most of the times, don&#8217;t frameworks and toolkits developers launch any backward compatibility modules at all? It might seem pretty complicated getting old deprecated funcionalities working  on newer, better versions, but, apart [...]]]></description>
			<content:encoded><![CDATA[<p>Hi again,</p>
<p>being working a lot with <a href="http://mootools.net/" title="MooTools - a compact javascript framework">mootools</a>, <a href="http://dojotoolkit.org/" title="The Dojo Toolkit" target="_blank">dojo</a>, <a href="http://wordpress.org/" title="WordPress › Blog Tool and Weblog Platform" target="_blank">wordpress</a> and some other frameworks and toolkits lately, my question today is this:<br />
Why, most of the times, don&#8217;t frameworks and toolkits developers launch any <a href="http://en.wikipedia.org/wiki/Backward_compatibility" title="Backward compatibility - Wikipedia, the free encyclopedia" target="_blank">backward compatibility</a> modules at all?</p>
<p>It might seem pretty complicated getting old deprecated funcionalities working  on newer, better versions, but, apart from some real specific embembed funcionalities, it really shouldn&#8217;t be that hard.</p>
<p>For the following example i&#8217;ll use Mootools as an explanatory example:</p>
<p>All you need is a nicely designed dynamic version transitioning system.<br />
One that allows you to, anytime on the execution, define which version will the following code run on.</p>
<p>Imagine you design a backward compatibility plugin from version B to version A.<br />
On version C you&#8217;ll design a backward compatibility plugin to version B.</p>
<p>So now, on a page running &#8220;mootools-C.js&#8221; you should include the backward compatibility modules &#8220;mootools-back-C-B.js&#8221; and &#8220;mootools-back-B-A.js&#8221;, or a compiled version (having just a copy paste of both previous files content) &#8220;mootools-back-C-to-A.js&#8221;.</p>
<p>So if you run something like &#8220;Mootools.use_version(&#8216;A&#8217;);&#8221; the dynamic version transitioning system would automatically look for it&#8217;s previous version compatilities execution for version B at, let&#8217;s suppose, &#8220;MootoolsBack_C_B();&#8221; and then rerun the same command (&#8220;Mootools.use_version(&#8216;A&#8217;);&#8221;) while already running on version B to travel back to version A (the dynamic version transitioning system, already on version B would run something like &#8220;MootoolsBack_B_A();&#8221;).</p>
<p>This method would, in theory, work for multiple version transitions without having to design a specific plugin for each version to version compatibility. It would save developers hours in trying to put two different tools, based on two different framework/toolkit versions, together on the same execution &#8211; like using both <a href="http://www.e-magine.ro/web-dev-and-design/41/moodalbox_1_3_b2/" title="MOOdalBox 1.3 is now cooking (Beta 2 is here)" target="_blank">MOOdalbox 1.3 beta 2</a> and <a href="http://www.outcut.de/MooFlow/" title="Mooflow (aka Coverflow)" target="_blank">mooflow v0.2</a> in the same page.</p>
<p>The system would work both ways, as you could &#8220;Mootools.version_reset();&#8221; or &#8220;Mootools.use_version(&#8216;C&#8217;);&#8221; to travel back to version C on the rest of the execution, the system would run the consecutive version travel functions eg. &#8220;MootoolsBack_A_B();&#8221; and &#8220;MootoolsBack_B_C();&#8221; and the rest of the code would be running on Mootools version C.</p>
<p>This &#8220;dynamic version transitioning system&#8221; will be used for every release transition on <a href="http://naturephp.org/" title="NaturePhp - An Open Source Natural PHP Toolkit" target="_blank">NaturePhp</a>.<br />
It might not work perfectly at first, but it will certainly relieve many developers&#8217; headaches.</p>
<p>I hope in the future more and more projects start using a system like this.</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/what-about-backward-compatibility-modules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NaturePhp 0.1 now waiting for php 5.3.0 &#8230;</title>
		<link>http://techtrouts.com/naturephp-now-waiting-for-php-530/</link>
		<comments>http://techtrouts.com/naturephp-now-waiting-for-php-530/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 17:43:06 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://techtrouts.com/naturephp-now-waiting-for-php-530/</guid>
		<description><![CDATA[Because it requires a few of the upcoming PHP features, naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230; - ok, so it&#8217;s a biased [...]]]></description>
			<content:encoded><![CDATA[<p>Because it requires a few of the upcoming PHP features,  naturePhp 0.1&#8242;s release is now on standby for PHP 5.3.0&#8242;s release. For now i can only say it is my favorite toolkit ever, and we&#8217;ve been using and improving it quite a lot on it&#8217;s limited PHP 5.2.6 version&#8230;</p>
<p>- ok, so it&#8217;s a biased opinion&#8230; :/</p>
<p>NaturePhp itself is basically a plug-in system for the coolest functionalities  around &#8211; most of the upcoming functionalities are either gathered from <a href="http://wordpress.org" title="WordPress &gt; Blog Tool and Weblog Platform" target="_blank">wordpress</a>, <a href="http://joomla.org" title="Joomla! - Content Management System and Web Application Framework" target="_blank">joomla!</a>, <a href="http://codeigniter.com" title="CodeIgniter - Open source PHP web application framework" target="_blank">CodeIgniter</a> and others, as well as a few of our own &#8211; *and a few <a href="http://rubyonrails.org" title="Ruby on Rails - Web application framework optimized for sustainable programming productivity" target="_blank">RubyOnRails</a> original ideas implemented in php ;)</p>
<p>The functionalities are organized into classes, and the classes are organized into <em>namespaces</em>, providing a great deal of &#8220;space&#8221; for future plug-in developments.<br />
It uses <em>__autoload()</em> for all classes, meaning it is just as fast no matter how many plug-ins you have installed.<br />
NaturePhp does not aim being labeled as a framework, but, being a pluggable toolkit itself, it allows future developers to build their own frameworks as plug-ins. &#8211; The idea is to provide a stable ground for common development and lot&#8217;s of easy to use functionalities for developers &#8211; much like Phyton&#8217;s libraries.</p>
<p>We are currently using <em>Namespace_Class::method()</em> instead of <em>Namespace::Class::method()</em> and <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> instead of <em>Class::func_name([$arg1, $arg2... $argN])</em> to workaround the lack of &#8220;<em>Namespaces&#8221;</em> and method overloading &#8220;<em>__callStatic()&#8221;</em> support on PHP 5.2.6, as these two features are required for most of the toolkit functionalities.<br />
It&#8217;s ugly, but it keeps the toolkit usable and developed while we wait for PHP 5.3.0.</p>
<p>As soon as PHP 5.3.0 comes out we&#8217;ll implement the necessary <em>namespaces</em> and change all the  <em>Class::callStatic($func_name, [$arg1, $arg2... $argN])</em> calls to <em>Class::func_name([$arg1, $arg2... $argN])</em> &#8211; so probably a couple of weeks after PHP 5.3.0&#8242;s release we&#8217;ll have a NaturePhp 0.1 out ;)</p>
<p>While we wait, we&#8217;re also finishing the NaturePhp&#8217;s website at <a href="http://naturephp.org" title="NaturePhp - Open Source Natural PHP Toolkit" target="_blank">http://naturephp.org</a> ;</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/naturephp-now-waiting-for-php-530/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>php cycle through object properties</title>
		<link>http://techtrouts.com/php-cycle-through-object-properties/</link>
		<comments>http://techtrouts.com/php-cycle-through-object-properties/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 10:35:05 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[how-tos]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://techtrouts.com/php-cycle-through-object-properties/</guid>
		<description><![CDATA[for the example object: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 class Test&#123; &#160; //public props public $var1=&#34;Value 1&#34;; public $var2=&#34;Value 2&#34;; public $var3=&#34;Value 3&#34;; &#160; //private props private $var4=&#34;Value 4&#34;; &#160; //public method public function public_function&#40;&#41;&#123; return true; &#125; &#160; [...]]]></description>
			<content:encoded><![CDATA[<p>for the example object:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> Test<span style="color: #009900;">&#123;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public props</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var1</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 1&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var2</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 2&quot;</span><span style="color: #339933;">;</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000088;">$var3</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 3&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private props</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$var4</span><span style="color: #339933;">=</span><span style="color: #0000ff;">&quot;Value 4&quot;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//public method</span>
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> public_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">//private method</span>
    <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> private_function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
         <span style="color: #b1b100;">return</span> <span style="color: #009900; font-weight: bold;">true</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>You can cycle  through the public object properties as you would with an array:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$test</span><span style="color: #339933;">=</span><span style="color: #000000; font-weight: bold;">new</span> Test<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #b1b100;">foreach</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$test</span> <span style="color: #b1b100;">as</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">=&gt;</span><span style="color: #000088;">$prop_value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #000088;">$prop_name</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'=&amp;gt;'</span><span style="color: #339933;">.</span><span style="color: #000088;">$prop_value</span><span style="color: #339933;">;</span>
    <span style="color: #b1b100;">print</span> <span style="color: #0000ff;">&quot;&lt;br&quot;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&gt;&quot;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></td></tr></table></div>

<p>The result will be:</p>
<pre>
var1=&gt;Value 1
var2=&gt;Value 2
var3=&gt;Value 3</pre>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/php-cycle-through-object-properties/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning python</title>
		<link>http://techtrouts.com/learning-python/</link>
		<comments>http://techtrouts.com/learning-python/#comments</comments>
		<pubDate>Wed, 16 Apr 2008 14:26:58 +0000</pubDate>
		<dc:creator>Carlos Ouro</dc:creator>
				<category><![CDATA[IT]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[naturePhp]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://techtrouts.com/learning-python/</guid>
		<description><![CDATA[Yes, it&#8217;s true &#8211; i&#8217;m starting on python. Why? - Autoload libraries ( Modules &#8211; similar to naturePhp&#8217;s toolkit system ) is a default system; - a small core; - namespaces and modules; - indentation is used to mark out block structure rather than curly braces &#8211; much cleaner code; - everything is a reference! [...]]]></description>
			<content:encoded><![CDATA[<p>Yes, it&#8217;s true &#8211; i&#8217;m starting on python.</p>
<p>Why?</p>
<p>- Autoload libraries ( Modules &#8211; similar to naturePhp&#8217;s toolkit system ) is a default system;<br />
- a small core;<br />
- namespaces and modules;<br />
- indentation is used to mark out block structure rather than curly braces &#8211; much cleaner code;<br />
- everything is a reference!<br />
- a simple array slicing syntax;<br />
- lambdas and other built-in functional programming constructs;</p>
<p>I always asked myself why Google uses so much python, now i know.</p>
<p>I&#8217;ll still be working on naturePhp and with PHP in general, i still think PHP is much more easy to setup and learn, as well as more resourceful, and most of the shared server environments use PHP, so <a href="http://naturephp.org" title="NaturePhp PHP Toolkit" target="_blank">naturePhp toolkit</a> is continuing to be a must have &#8211; especially with the oncoming namespaces on PHP 5.2.3 ;)</p>
]]></content:encoded>
			<wfw:commentRss>http://techtrouts.com/learning-python/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
