<?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>ben koonse &#187; web development</title>
	<atom:link href="http://bennyfreshness.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://bennyfreshness.com</link>
	<description>wrestling code into submission...</description>
	<lastBuildDate>Tue, 11 Oct 2011 19:38:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.5</generator>
		<item>
		<title>Wanna Kohana?</title>
		<link>http://bennyfreshness.com/2009/10/wanna-kohana/</link>
		<comments>http://bennyfreshness.com/2009/10/wanna-kohana/#comments</comments>
		<pubDate>Sat, 31 Oct 2009 07:26:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://bennyfreshness.com/?p=68</guid>
		<description><![CDATA[Wanna Kohana? Because I sure do.. This secure, lightweight, and extensible little number can work wonders for your web developing ensemble.  ]]></description>
			<content:encoded><![CDATA[<p>Wanna <a href="http://www.kohanaphp.com/">Kohana</a>? Because I sure do.. This secure, lightweight, and extensible little number can work wonders for your web developing ensemble.</p>
<p>OK, I know what you&#8217;re all thinking, &#8220;What about CakePHP?&#8221;  Cake is undeniably an Olympic gold medalist framework featuring many similarities to Ruby on Rails.  Ahhh Rails, I promise someday I&#8217;ll devote more time to you, but until then my programming world resides primarily in PHP.  Sometimes you have to make the best of the hand thats dealt&#8230; </p>
<p>Which brings us to the lovely, elegant, graceful and genteel Kohana framework.</p>
<p><span id="more-68"></span></p>
<p>Enough fluff, I&#8217;m about to punch you in the face with some factualizations.  Here&#8217;s reasons why Kohana has street cred:</p>
<blockquote>
<ol>
<li>The strictest OOP PHP has to offer</li>
<li>Dainty footprint, no extra libraries like PEAR</li>
<li>Locks down GET, POST, COOKIE, and SESSION with XSS protection</li>
<li>Auto-loads classes like butter</li>
<li>Orginization</li>
<li>Flexible and extensible</li>
<li>Godlike power over events</li>
<li>Rapid Application Development</li>
</ol>
</blockquote>
<p>Don&#8217;t believe me, <a href="http://www.kohanaphp.com/download">download</a> the framework and see for yourself!</p>
<p>First of all not having to support PHP4 means less code and enables more robust functionality for the framework.  <a href="http://php.net/manual/en/language.oop5.autoload.php">Auto-loading</a>, for those of you who haven&#8217;t yet experienced its awesomeness, steadfastly promotes great justice.  Gone are those agonizing days of having to use require_once() and the likes.</p>
<p>MVC, well we all know the virtues of MVC. Also, the RAD aspect is pretty rad as well.</p>
<p>Event handling enables you to poke your head in at almost any time during execution just to say hello or stay and enjoy a spot of tea, cherio.</p>
<p>Time for some snippets!</p>
<p>Here is a basic controller:</p>
<p><code> </code></p>
<p><code></p>
<pre>class Freshness_Controller extends Controller {
  function freshen()
  {
	// Load the view as an object
	$view = new View('freshest');
	// Adding variables to be displayed in the view
	$view-&gt;title      = "Welcome to Bennyfreshness's blog.";
	$view-&gt;heading = "Wow this is indeed extremely fresh.";
	$view-&gt;content = "I've never seen so much freshness.";
	// Render the view
	$view-&gt;render(TRUE);
  }
}</pre>
<p></code></p>
<p>You get the point&#8230; Clean, concise code&#8230;</p>
<p>To bring this party to an end I&#8217;d like to end with some closing remarks.  If you&#8217;re doing web application development in PHP I strongly recommend checking out Kohana.  Its short learning curve, vibrant community, friendly IRC (#kohana on irc.freenode.net), and most importantly rich and robust code base will increase your productivity and you&#8217;ll have more fun while programming.</p>
<p>So how do you get me to go back to developing in Cake?</p>
<p>Take the letter &#8220;c&#8221; out of &#8220;cloth&#8221; and the letter &#8220;f&#8221; out of &#8220;way&#8221;</p>
<p> <img src='http://bennyfreshness.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://bennyfreshness.com/2009/10/wanna-kohana/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Getting RAD with CakePHP</title>
		<link>http://bennyfreshness.com/2009/08/rapid-application-development-with-cakephp/</link>
		<comments>http://bennyfreshness.com/2009/08/rapid-application-development-with-cakephp/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 08:20:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[RAD]]></category>

		<guid isPermaLink="false">http://bennyfreshness.com/?p=9</guid>
		<description><![CDATA[Ever got tired of rewriting a user login system every time you build a website, or database access scripts?  Do you wish there were a way to create more reusable modular code?  Well get ready to fall head over heels in passionate love with Rapid Application Development (RAD) Frameworks.]]></description>
			<content:encoded><![CDATA[<p>Ever gotten tired of rewriting a user login system every time you build a website, or database access scripts?  Do you wish there were a way to create more reusable modular code?  Well get ready to fall head over heels in passionate love with Rapid Application Development (RAD) Frameworks.</p>
<p>Wikipedia defines RAD as</p>
<blockquote><p>A type of software development methodology which uses minimal planning in favor of rapid prototyping. The &#8220;planning&#8221; of software developed using RAD is interleaved with writing the software itself. The lack of extensive pre-planning generally allows software to be written much faster, and makes it easier to change requirement</p></blockquote>
<p>Enough about RAD itself, lets get into some of the benefits.  Hold on to your terminal cassonova&#8230;</p>
<ul>
<li>Speed up development</li>
<li>Write less code</li>
<li>Focus on functionality, not mundane repetitive tasks</li>
<li>Create a more modularized and organized project</li>
<li>The acronym is actually RAD, which, itself, is pretty rad&#8230;</li>
</ul>
<p><span id="more-9"></span></p>
<p>There are countless numbers of RAD Frameworks across all platforms.  Since this is more of an introductory post on RAD Frameworks we&#8217;re only going to go over a few basics.  This post will detail some aspects of <a title="cakephp" href="http://cakephp.org/">CakePHP</a>, one of the more popular PHP frameworks.  They describe it on their site as follows&#8230;</p>
<blockquote><p>Using commonly known design patterns like MVC and ORM within the convention over configuration paradigm, CakePHP reduces development costs and helps developers write less code.</p></blockquote>
<p>So lets dive right in, two basic but integral ideas&#8230;</p>
<p>MVC &#8211; Model View Controller, this is an architectural pattern which helps seperate business logic from presentation.  The model handles data.  The controller manipulates data.  And the view presents the data.</p>
<p>ORM &#8211; Object Relational Mapping, in a nutshell, gives you objects which you can play with instead of having to access database data directly.</p>
<p>Now to the nitty gritty&#8230;  Lets show you how to get CRUD (create, read, update, delete.. sorry for another acronym, hopefully last) up and running in no time flat..</p>
<p>Start with your database table.  Lets say you were selling books.  A typical book table might look something like this (simplified).</p>
<p>CREATE TABLE books (<br />
id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,<br />
title VARCHAR(255),<br />
author VARCHAR(255)<br />
);</p>
<p>Once you have your config file (user, pass, database) set correctly, now you get to ENJOY THE MAGIC OF CODE GENERATION.  I can&#8217;t stress enough what this next part does for one&#8217;s mental health.</p>
<p>From a command line or terminal run the following commands..</p>
<ul>
<li>cake bake model book (creates your book model)</li>
<li>cake bake controller books scaffold admin (creates your CRUD controller scaffolding with admin functionality)</li>
<li>cake bake view books (creates all your views for CRUD)</li>
</ul>
<p>Now, after three lines of code pasted into a terminal, you have generated a fully functional, extensible, modular CRUD application, including error reporting, user friendly flash messages, well, I hope you get the point..</p>
<p>The beauty of this is that you don&#8217;t waste time on mundane tasks, you can start hacking away on the unique functionality of your next killer app almost immediately.</p>
<p>Keep in mind there are a few more caveats and gotcha&#8217;s when working with a framework such as CakePHP, but generally you will find them to be a godsend in your web development world.  A world where heinous devilish monsters must be dealt with on a daily basis (<a href="http://www.ie6nomore.com/">IE6</a>).</p>
<p>Please post questions, this is a VERY general overview but I&#8217;d love to go into more detail&#8230;.</p>
<p><object width="500" height="400"><param name="movie" value="http://www.youtube.com/v/GQXqWkWqnSw?fs=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/GQXqWkWqnSw?fs=1" type="application/x-shockwave-flash" width="500" height="400" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://bennyfreshness.com/2009/08/rapid-application-development-with-cakephp/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

