<?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>Zack Live &#187; Framework</title>
	<atom:link href="http://zacklive.com/tag/framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://zacklive.com</link>
	<description>WordPress Themes and Web Designer</description>
	<lastBuildDate>Thu, 08 Jul 2010 03:27:09 +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>Say Hello to Kohana 3</title>
		<link>http://zacklive.com/say-hello-to-kohana-3/917/</link>
		<comments>http://zacklive.com/say-hello-to-kohana-3/917/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 04:37:46 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Design Pattern]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Hello World]]></category>
		<category><![CDATA[HMVC]]></category>
		<category><![CDATA[Installation]]></category>
		<category><![CDATA[Kohana 3]]></category>
		<category><![CDATA[Kohana PHP]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://zacklive.com/?p=917</guid>
		<description><![CDATA[Kohana 3 has been released for a while. This is a redesign version of Kohana. Kohana 3 and 2 will both be in active, if you are new to Kohana, I suggest you to start with Kohana 3. The most &#8230; <a href="http://zacklive.com/say-hello-to-kohana-3/917/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-919" title="kohana-3-php-logo" src="http://zacklive.com/wp-content/uploads/2010/02/kohana-3-php-logo-550x241.jpg" alt="kohana 3 php logo 550x241 Say Hello to Kohana 3 photo" width="550" height="241" /><br />
<a title="Kohana PHP Framework" href="http://kohanaphp.com/">Kohana 3</a> has been released for a while. This is a redesign version of <strong>Kohana</strong>. <strong>Kohana 3</strong> and 2 will both be in active, if you are new to Kohana, I suggest you to start with Kohana 3. The most important difference between these two version is that Kohana 3 uses a new <strong>design pattern</strong> <strong>HMVC</strong> rather than <strong>MVC</strong> as Kohana 2 is using. What is HMVC? These two articles may help you understand it:</p>
<ol>
<li><a title="HMVC Design Pattern" href="http://en.wikipedia.org/wiki/Presentation-abstraction-control">Presentation-abstraction-control</a></li>
<li><a title="HMVC Design Pattern" href="http://ooerabegins.wordpress.com/2009/05/29/hmvc-pattern1/">HMVC Pattern For GUI Of Swing/GWT/Desktop Application</a></li>
</ol>
<p>You can download Kohana 3 here:</p>
<p><a title="Kohana 3 Download" href="http://dev.kohanaphp.com/projects/kohana3/files">Kohana 3 Download</a></p>
<p><span id="more-917"></span>As usual, it&#8217;s extremely easy to install Kohana, unzip the download file, put the Kohana folder to your web server, change permissions of following folders to <strong>777</strong>:</p>
<ol>
<li><strong>application/cache</strong></li>
<li><strong>application/logs</strong></li>
</ol>
<p>Finally make some changes to application/bootstrap.php:</p>
<ol>
<li>Change <a title="Kohana PHP Timezone" href="http://php.net/timezones">timezone</a></li>
<li>Set the <strong>base_url</strong></li>
</ol>
<p>That&#8217;s it, your Kohana is ready to go. Visit your website which should be the base_url you set above, you will see the Environment Tests page:</p>
<p style="text-align: center;"><a href="http://zacklive.com/wp-content/uploads/2010/02/kohana-install-1.jpg" rel="lightbox[917]" title="kohana-install-1"><img class="size-medium wp-image-918 aligncenter" title="kohana-install-1" src="http://zacklive.com/wp-content/uploads/2010/02/kohana-install-1-550x369.jpg" alt="kohana install 1 550x369 Say Hello to Kohana 3 photo" width="550" height="369" /></a></p>
<p>Notice the green background text, it&#8217;s telling you to delete the install.php file in you Kohana root. And then refresh the page, you will see &#8220;hello, world!&#8221; text. Where is the text come from? Open application-&gt;classes-&gt;controller, there is a welcome.php there. Double click the file, Here is the code:</p>
<pre class="brush: php;">
&lt;?php defined('SYSPATH') or die('No direct script access.');

class Controller_Welcome extends Controller {

	public function action_index()
	{
		$this-&gt;request-&gt;response = 'hello, world!';
	}

} // End Welcome
</pre>
<p>This is the Welcome controller, the only thing it do is to print the text &#8216;hello, world!&#8217; to the screen. You can try to output other text by change:</p>
<pre class="brush: php;">
$this-&gt;request-&gt;response = 'hello, world!';
</pre>
<p>to:</p>
<pre class="brush: php;">
$this-&gt;request-&gt;response = 'hello, Kohana 3! I am Zack from ZackLive.com~';
</pre>
<p>Now you&#8217;ve got your Kohana installed, try to get your hands dirty.</p>
<p>Some useful resource for Kohana 3:</p>
<ol>
<li><a title="Kohana 3 User Guide" href="http://v3.kohanaphp.com/guide/about.kohana">Kohana 3 User Guide</a></li>
<li><a title="Kohana 3 Unofficial Wiki" href="http://kerkness.ca/wiki/doku.php">Kohana 3 Unofficial Wiki</a></li>
<li><a title="Kohana 3 API Cheat Sheet" href="http://kohana.sher.pl/cs">Kohana 3 API Cheat Sheet</a></li>
</ol>
<p>If you&#8217;ve got any questions about Kohana 3, feel free to ask me by commenting here or post on <a title="Kohana forum" href="http://forum.kohanaphp.com/">Kohana forum</a>.</p>
<!-- PHP 5.x --><p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/hello-world-tutorial-for-kohana/15/" title="Hello World Tutorial for Kohana">Hello World Tutorial for Kohana</a></li><li><a href="http://zacklive.com/redirect-users-according-to-browser-language/923/" title="Redirect Users According to Browser Language">Redirect Users According to Browser Language</a></li><li><a href="http://zacklive.com/addslashes-or-mysql-real-escape-string-avoid-sql-injection/906/" title="Addslashes or Mysql_real_escape_string to use to Avoid SQL Injection">Addslashes or Mysql_real_escape_string to use to Avoid SQL Injection</a></li><li><a href="http://zacklive.com/an-oop-way-to-work-with-mysql-database-in-php/894/" title="An OOP Way to Work with MySQL Database in PHP">An OOP Way to Work with MySQL Database in PHP</a></li><li><a href="http://zacklive.com/four-wordpress-theme-frameworks/331/" title="Four WordPress Theme Frameworks">Four WordPress Theme Frameworks</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/say-hello-to-kohana-3/917/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Four WordPress Theme Frameworks</title>
		<link>http://zacklive.com/four-wordpress-theme-frameworks/331/</link>
		<comments>http://zacklive.com/four-wordpress-theme-frameworks/331/#comments</comments>
		<pubDate>Mon, 29 Dec 2008 16:35:15 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Blog and WordPress]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Hybrid]]></category>
		<category><![CDATA[Sandbox]]></category>
		<category><![CDATA[Thematic]]></category>
		<category><![CDATA[Theme Designer]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[WP Framework]]></category>

		<guid isPermaLink="false">http://zacklive.com/?p=331</guid>
		<description><![CDATA[I found four WordPress theme frameworks which worth to try out. Hybrid Hybrid is a WordPress theme framework designed with content in mind. There is no other theme that will display your content in a meaningful way like this one &#8230; <a href="http://zacklive.com/four-wordpress-theme-frameworks/331/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I found four WordPress theme frameworks which worth to try out.</p>
<ul>
<li><a title="hybrid wordpress theme framework" href="http://themehybrid.com/themes/hybrid">Hybrid</a><br />
Hybrid is a WordPress theme framework designed with content in mind. There is no other theme that will display your content in a meaningful way like this one does. It’s all about getting your information out there to the world. Without all the fuss. That’s what Hybrid does.</li>
<li><a title="thematic wordpress theme framework" href="http://themeshaper.com/thematic-for-wordpress/">Thematic</a><br />
This is more than just a WordPress theme: Thematic is a highly extensible, search-engine optimized WordPress Theme Framework featuring 13 widget-ready areas, grid-based layout samples, styling for popular plugins and more. The coding, functionality and support rivals the best in “premium” themes. With one, important, difference—Thematic is completely free and open source.</li>
<li><a title="wp framework wordpress" href="http://wpframework.com/">WP Framework</a><br />
WP Framework is a &#8220;blank&#8221; WordPress theme that empowers you to create <em>awesome</em> WordPress Themes in little to no time!</li>
<li><a title="sandbox wordpress theme framework" href="http://www.plaintxt.org/themes/sandbox/">Sandbox</a><br />
The Sandbox is a powerful tool available for WordPress theme designers and developers. The Sandbox can be easily designed just with <abbr title="Cascading Style Sheet" />CSS, so beginners will feel comfortable not bothering with <abbr title="PHP Hypertext Preprocessor" />PHP.</p>
<p>Experienced developers and designers can accomplish almost anything with minimal work, thanks to the rich, semantic markup and profusion of classes dynamically generated by the Sandbox.</li>
</ul>
<!-- PHP 5.x --><p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/less-theme-a-blank-theme-for-wordpress-theme-designers/1027/" title="Less Theme: A Blank Theme for WordPress Theme Designers">Less Theme: A Blank Theme for WordPress Theme Designers</a></li><li><a href="http://zacklive.com/say-hello-to-kohana-3/917/" title="Say Hello to Kohana 3">Say Hello to Kohana 3</a></li><li><a href="http://zacklive.com/tutorials-for-translating-wordpress-themes/873/" title="Tutorials for Translating WordPress Themes">Tutorials for Translating WordPress Themes</a></li><li><a href="http://zacklive.com/free-elegant-portfolio-wordpress-themes/771/" title="Free Elegant Portfolio WordPress Themes">Free Elegant Portfolio WordPress Themes</a></li><li><a href="http://zacklive.com/top-10-best-quality-wordpress-themes-of-2009/763/" title="Top 10 Best Quality WordPress Themes of 2009">Top 10 Best Quality WordPress Themes of 2009</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/four-wordpress-theme-frameworks/331/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Hello World Tutorial for Kohana</title>
		<link>http://zacklive.com/hello-world-tutorial-for-kohana/15/</link>
		<comments>http://zacklive.com/hello-world-tutorial-for-kohana/15/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 04:44:47 +0000</pubDate>
		<dc:creator>Zack</dc:creator>
				<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Kohana]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Tutorials]]></category>

		<guid isPermaLink="false">http://blogiii.com/zack/?p=12</guid>
		<description><![CDATA[It seems unnecessary to write a Hello World tuorial for a PHP framework, because when someone comes to framework, he is no longer a beginner, can figure out his own Hello World. But this idea comes up in my brain, &#8230; <a href="http://zacklive.com/hello-world-tutorial-for-kohana/15/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: center"><a href="http://i252.photobucket.com/albums/hh6/Xanxuss/kohana-hello.png" rel="lightbox[15]" title="Hello World Tutorial for Kohana"><img class="aligncenter" src="http://i252.photobucket.com/albums/hh6/Xanxuss/kohana-hello.png" alt="Kohana hello world" width="450" height="405" title="Hello World Tutorial for Kohana photo" /></a></p>
<p>It seems unnecessary to write a Hello World tuorial for a PHP framework, because when someone comes to framework, he is no longer a beginner, can figure out his own Hello World. But this idea comes up in my brain, and I guess it might be helpful for someone who is the first time to work with MVC or OOP. It&#8217;s quite simple, let&#8217;s get started.</p>
<p>You should have <a title="kohana tutorial" href="http://blogiii.com/zack/install-kohana-on-windows/11/">installed Kohana</a> correctly, now we create a <em>hello.php</em> in /application/controllers/, here is the content of the file:</p>
<blockquote><p>&lt;?php<br />
/**<br />
* Hello World controller<br />
*/<br />
class Hello_Controller extends Template_Controller<br />
{<br />
function __construct()<br />
{<br />
parent::__construct();<br />
}</p>
<p>function index()<br />
{<br />
$this-&gt;template-&gt;title = &#8220;Hello World&#8221;;<br />
$this-&gt;template-&gt;content = &#8220;Hello, welcome to Kohana World !!!&#8221;;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p><span id="more-15"></span></p>
<p>We have a <em>Hello </em>Controller with a index method, so we can call this page in the URL: localhost/kohana/index.php/hello. If you cannot understand this, you may want to see &#8216;<em>Show me, don&#8217;t tell me</em>&#8216; section in <a title="kohana 101" href="http://oscar.nom.za/dl/kohana101.pdf">Kohana 101</a>. In the <em>Hello</em> Controller, we set the title and content of our Hello World page, of course you can change the title and content into anything.</p>
<p>Now we have a Controller, we also need a View to reveal the page. Create a <em>template.php</em> in /applicaion/views/, and type in the fellowing codes:</p>
<blockquote><p>&lt;!DOCTYPE html PUBLIC &#8220;-//W3C//DTD XHTML 1.0 Strict//EN&#8221; &#8220;http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd&#8221;&gt;<br />
&lt;html xmlns=&#8221;http://www.w3.org/1999/xhtml&#8221; xml:lang=&#8221;en&#8221; lang=&#8221;en&#8221;&gt;</p>
<p>&lt;head&gt;</p>
<p>&lt;title&gt;&lt;?php echo $title ?&gt;&lt;/title&gt;</p>
<p>&lt;body&gt;</p>
<p>&lt;h2&gt;&lt;?php echo $title ?&gt;&lt;/h2&gt;</p>
<p>&lt;p&gt;&lt;?php echo $content ?&gt;&lt;/p&gt;</p>
<p>&lt;/body&gt;<br />
&lt;/html&gt;</p></blockquote>
<p>Very simple HTML codes, echo the title and content set in the <em>Hello </em>Controller to the page, that&#8217;s all what it does. You can see how Kohana works, processing in Controller, sending the result to View, and the View exhibit the page.</p>
<p>Usually I&#8217;d like to add a profiler to a example page, so that we can see some system information. It&#8217;s very easy to do that, just add one line to the Construt function in the Controller:</p>
<blockquote><p>$this-&gt;profiler = new Profiler;</p></blockquote>
<p>So the Hello Controller file should look like this:</p>
<blockquote><p>&lt;?php<br />
/**<br />
* Hello World controller<br />
*/<br />
class Hello_Controller extends Template_Controller<br />
{<br />
function __construct()<br />
{<br />
parent::__construct();<br />
$this-&gt;profiler = new Profiler;<br />
}</p>
<p>function index()<br />
{<br />
$this-&gt;template-&gt;title = &#8220;Hello World&#8221;;<br />
$this-&gt;template-&gt;content = &#8220;Hello, welcome to Kohana World !!!&#8221;;<br />
}<br />
}<br />
?&gt;</p></blockquote>
<p>We can now visit <em>localhost/kohana/index.php/hello</em>, you will have a page the same as the image above.</p>
<p>You already have some basic concepts of Kohana now, I highly recommand you to read <a title="kohana 101" href="http://oscar.nom.za/dl/kohana101.pdf">Kohana 101</a>, or if you are even not sure how to setup your own Kohana, you can read my post, <a title="kohana tutorial" href="http://blogiii.com/zack/install-kohana-on-windows/11/">Install Kohana on Windows</a>. Hope this can help you.</p>
<!-- PHP 5.x --><p  class="related_post_title">Related Posts</p><ul class="related_post"><li><a href="http://zacklive.com/say-hello-to-kohana-3/917/" title="Say Hello to Kohana 3">Say Hello to Kohana 3</a></li><li><a href="http://zacklive.com/install-kohana-on-windows/14/" title="Install Kohana on Windows">Install Kohana on Windows</a></li><li><a href="http://zacklive.com/redirect-users-according-to-browser-language/923/" title="Redirect Users According to Browser Language">Redirect Users According to Browser Language</a></li><li><a href="http://zacklive.com/addslashes-or-mysql-real-escape-string-avoid-sql-injection/906/" title="Addslashes or Mysql_real_escape_string to use to Avoid SQL Injection">Addslashes or Mysql_real_escape_string to use to Avoid SQL Injection</a></li><li><a href="http://zacklive.com/design-a-master-css-stylesheet/902/" title="Design a Master CSS Stylesheet">Design a Master CSS Stylesheet</a></li></ul>]]></content:encoded>
			<wfw:commentRss>http://zacklive.com/hello-world-tutorial-for-kohana/15/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
