<?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>The Piranha Method &#187; development</title>
	<atom:link href="http://www.piranhamethod.com/tag/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.piranhamethod.com</link>
	<description>Web Development &#38; Graphic Design Firm - Charlotte, Greenville, Charleston</description>
	<lastBuildDate>Wed, 14 Apr 2010 02:18:08 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>QCodo/QCubed</title>
		<link>http://www.piranhamethod.com/2009/04/qcodo-qcubed/</link>
		<comments>http://www.piranhamethod.com/2009/04/qcodo-qcubed/#comments</comments>
		<pubDate>Thu, 09 Apr 2009 12:51:07 +0000</pubDate>
		<dc:creator>Scott Carroll</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[framework]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[QCodo]]></category>
		<category><![CDATA[QCubed]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[web]]></category>

		<guid isPermaLink="false">http://www.piranhamethod.com/?p=198</guid>
		<description><![CDATA[I have been developing applications from a PHP framework and code generation system called QCodo recently. And more recently, its community-driven branch dubbed QCubed. The QCubed platform is beneficial to me mostly because it allows object-oriented PHP code to be generated from a MySQL database structure (as well as many others) . I use PHP/MySQL [...]]]></description>
			<content:encoded><![CDATA[<p>I have been developing applications from a PHP framework and code generation system called <a title="QCodo PHP Framework" href="http://www.qcodo.com" target="_blank">QCodo</a> recently. And more recently, its community-driven branch dubbed <a title="QCubed PHP Development Framework" href="http://qcu.be" target="_blank">QCubed</a>. The QCubed platform is beneficial to me mostly because it allows object-oriented PHP code to be generated from a MySQL database structure (as well as many others) . I use PHP/MySQL almost exclusively in projects here at Piranha Method, so this is a perfect tool for me.<span id="more-198"></span></p>
<p>There are a few parts to QCodo/QCubed that speed up my coding time. First, I mentioned code generation. This is the strongest feature and is what originally drew me to QCodo. If you provide QCubed with your database information, you can have it scan your DB and write pretty clean &#8220;drafts&#8221; of OOP PHP code based on relationships and foreign keys. It will also generate draft QForms that can be used to perform basic CRUD functionality with the objects it has generated from the database.</p>
<p>Which brings me to the next feature that QCubed offers: QForms and QControls. QForms are as the developer puts it &#8220;stateful, event-driven objects.&#8221; What this means is that each QForm is basically an HTML form that posts back to itself and remembers its state from the previous posting. No sessions or cookies are used.</p>
<p>QControls are essentially PHP objects that have defined getters/setters that can be overridden or added onto.Â  The QForm is responsible for rendering the QControl as HTML and handling any events that are applied to the QControl. QControls can be nested and expanded on to create really powerful web applications.</p>
<p>The last part of QCodo/QCubed are QQueries. This is a shortcut way to perform SQL Queries in an object-oriented manner. QQueries can take in conditions and clauses to provide custom loading of objects in your application. For instance take the following logic:</p>
<p>Select all Projects where: the Project ID &lt;= 2 AND (the manager&#8217;s first name is alphabetically &#8220;greater than&#8221; the last name, or who&#8217;s name contains &#8220;Website&#8221;)</p>
<p><code><span style="color: #000000;"><span style="color: #0000bb;">&lt;?php<br />
$objProjectArray </span><span style="color: #007700;">= </span><span style="color: #0000bb;">Project</span><span style="color: #007700;">::</span><span style="color: #0000bb;">QueryArray</span><span style="color: #007700;">(<br />
</span><span style="color: #0000bb;">QQ</span><span style="color: #007700;">::</span><span style="color: #0000bb;">AndCondition</span><span style="color: #007700;">(<br />
</span><span style="color: #0000bb;">QQ</span><span style="color: #007700;">::</span><span style="color: #0000bb;">OrCondition</span><span style="color: #007700;">(<br />
</span><span style="color: #0000bb;">QQ</span><span style="color: #007700;">::</span><span style="color: #0000bb;">GreaterThan</span><span style="color: #007700;">(</span><span style="color: #0000bb;">QQN</span><span style="color: #007700;">::</span><span style="color: #0000bb;">Project</span><span style="color: #007700;">()-&gt;</span><span style="color: #0000bb;">ManagerPerson</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">FirstName</span><span style="color: #007700;">, </span><span style="color: #0000bb;">QQN</span><span style="color: #007700;">::</span><span style="color: #0000bb;">Project</span><span style="color: #007700;">()-&gt;</span><span style="color: #0000bb;">ManagerPerson</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">LastName</span><span style="color: #007700;">),<br />
</span><span style="color: #0000bb;">QQ</span><span style="color: #007700;">::</span><span style="color: #0000bb;">Like</span><span style="color: #007700;">(</span><span style="color: #0000bb;">QQN</span><span style="color: #007700;">::</span><span style="color: #0000bb;">Project</span><span style="color: #007700;">()-&gt;</span><span style="color: #0000bb;">Name</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'%Website%'</span><span style="color: #007700;">)<br />
),<br />
</span><span style="color: #0000bb;">QQ</span><span style="color: #007700;">::</span><span style="color: #0000bb;">LessOrEqual</span><span style="color: #007700;">(</span><span style="color: #0000bb;">QQN</span><span style="color: #007700;">::</span><span style="color: #0000bb;">Project</span><span style="color: #007700;">()-&gt;</span><span style="color: #0000bb;">Id</span><span style="color: #007700;">, </span><span style="color: #0000bb;">2</span><span style="color: #007700;">)<br />
)<br />
);</span></span></code></p>
<p>foreachÂ (<span style="color: #0000bb;">$objProjectArray </span><span style="color: #007700;">as </span><span style="color: #0000bb;">$objProject</span><span style="color: #007700;">)Â {<br />
</span><span style="color: #0000bb;">_p</span><span style="color: #007700;">(</span><span style="color: #0000bb;">sprintf</span><span style="color: #007700;">(</span><span style="color: #dd0000;">&#8216;%sÂ (managedÂ byÂ %sÂ %s)&#8217;</span><span style="color: #007700;">, </span><span style="color: #0000bb;">$objProject</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">Name</span><span style="color: #007700;">, </span><span style="color: #0000bb;">$objProject</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">ManagerPerson</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">FirstName</span><span style="color: #007700;">, </span><span style="color: #0000bb;">$objProject</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">ManagerPerson</span><span style="color: #007700;">-&gt;</span><span style="color: #0000bb;">LastName</span><span style="color: #007700;">));<br />
</span><span style="color: #0000bb;">_p</span><span style="color: #007700;">(</span><span style="color: #dd0000;">&#8216;&lt;br/&gt;&#8217;</span><span style="color: #007700;">, </span><span style="color: #0000bb;">false</span><span style="color: #007700;">);<br />
}<br />
</span><span style="color: #0000bb;">?&gt;</span></p>
<p>This is much easier to read and understand than the SQL command required to perform the same function. Also, if you change your database source you won&#8217;t have to rewrite code, as long as the relational structure stays the same.</p>
<p>I highly recommend you check out <a title="QCodo Examples" href="http://examples.qcodo.com">http://examples.qcodo.com</a> and <a title="QCubed Tutorials" href="http://trac.qcu.be/projects/qcubed/wiki/Tutorials">http://trac.qcu.be/projects/qcubed/wiki/Tutorials</a> to get a sense of how powerful this framework truly is.</p>

<div class="sociable">
<div class="sociable_tagline">
<strong>Share this:</strong>
</div>
<ul>
	<li class="sociablefirst"><a rel="nofollow"  target="_blank" href="http://www.piranhamethod.com/feed/" title="RSS"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/rss.png" title="RSS" alt="RSS" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;partner=sociable" title="PDF"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/pdf.png" title="PDF" alt="PDF" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.printfriendly.com/print?url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;partner=sociable" title="Print"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/printfriendly.png" title="Print" alt="Print" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://slashdot.org/bookmark.pl?title=QCodo%2FQCubed&amp;url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F" title="Slashdot"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/slashdot.png" title="Slashdot" alt="Slashdot" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.facebook.com/share.php?u=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;t=QCodo%2FQCubed" title="Facebook"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/facebook.png" title="Facebook" alt="Facebook" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;title=QCodo%2FQCubed&amp;source=The+Piranha+Method+Web+Development+%26amp%3B+Graphic+Design+Firm+-+Charlotte%2C+Greenville%2C+Charleston&amp;summary=I%20have%20been%20developing%20applications%20from%20a%20PHP%20framework%20and%20code%20generation%20system%20called%20QCodo%20recently.%20And%20more%20recently%2C%20its%20community-driven%20branch%20dubbed%20QCubed.%20The%20QCubed%20platform%20is%20beneficial%20to%20me%20mostly%20because%20it%20allows%20object-oriented%20" title="LinkedIn"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/linkedin.png" title="LinkedIn" alt="LinkedIn" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://twitter.com/home?status=QCodo%2FQCubed%20-%20http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F" title="Twitter"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/twitter.png" title="Twitter" alt="Twitter" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;title=QCodo%2FQCubed&amp;bodytext=I%20have%20been%20developing%20applications%20from%20a%20PHP%20framework%20and%20code%20generation%20system%20called%20QCodo%20recently.%20And%20more%20recently%2C%20its%20community-driven%20branch%20dubbed%20QCubed.%20The%20QCubed%20platform%20is%20beneficial%20to%20me%20mostly%20because%20it%20allows%20object-oriented%20" title="Digg"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/digg.png" title="Digg" alt="Digg" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://delicious.com/post?url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;title=QCodo%2FQCubed&amp;notes=I%20have%20been%20developing%20applications%20from%20a%20PHP%20framework%20and%20code%20generation%20system%20called%20QCodo%20recently.%20And%20more%20recently%2C%20its%20community-driven%20branch%20dubbed%20QCubed.%20The%20QCubed%20platform%20is%20beneficial%20to%20me%20mostly%20because%20it%20allows%20object-oriented%20" title="del.icio.us"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/delicious.png" title="del.icio.us" alt="del.icio.us" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.google.com/bookmarks/mark?op=edit&amp;bkmk=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;title=QCodo%2FQCubed&amp;annotation=I%20have%20been%20developing%20applications%20from%20a%20PHP%20framework%20and%20code%20generation%20system%20called%20QCodo%20recently.%20And%20more%20recently%2C%20its%20community-driven%20branch%20dubbed%20QCubed.%20The%20QCubed%20platform%20is%20beneficial%20to%20me%20mostly%20because%20it%20allows%20object-oriented%20" title="Google Bookmarks"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/googlebookmark.png" title="Google Bookmarks" alt="Google Bookmarks" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.myspace.com/Modules/PostTo/Pages/?u=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;t=QCodo%2FQCubed" title="MySpace"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/myspace.png" title="MySpace" alt="MySpace" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;title=QCodo%2FQCubed" title="StumbleUpon"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/stumbleupon.png" title="StumbleUpon" alt="StumbleUpon" class="sociable-hovers" /></a></li>
	<li><a rel="nofollow"  target="_blank" href="http://technorati.com/faves?add=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F" title="Technorati"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/technorati.png" title="Technorati" alt="Technorati" class="sociable-hovers" /></a></li>
	<li class="sociablelast"><a rel="nofollow"  target="_blank" href="http://news.ycombinator.com/submitlink?u=http%3A%2F%2Fwww.piranhamethod.com%2F2009%2F04%2Fqcodo-qcubed%2F&amp;t=QCodo%2FQCubed" title="HackerNews"><img src="http://www.piranhamethod.com/wp-content/plugins/sociable/images/hackernews.png" title="HackerNews" alt="HackerNews" class="sociable-hovers" /></a></li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.piranhamethod.com/2009/04/qcodo-qcubed/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>
