<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>H3RALD - Tag 'tutorial' (RSS Feed)</title>
    <language>en-us</language>
    <lastBuildDate>Tue, 27 Oct 2009 08:48:00 -0600</lastBuildDate>
    <ttl>40</ttl>
    <link>http://www.h3rald.com</link>
    <description/>
    <item>
      <title>Getting Started with Lithium</title>
      <description>&lt;p&gt;So &lt;a href="http://li3.rad-dev.org/"&gt;Lithium&lt;/a&gt; is now officially out, and its 0.1 release can be freely &lt;a href="http://rad-dev.org/lithium/versions"&gt;downloaded&lt;/a&gt; from the official web site or by cloning the Lithium git repository. The good news is that although not many web hosts offer &lt;span class="caps"&gt;PHP&lt;/span&gt; 5.3, you can try it out youself, locally and with minimum effort.&lt;/p&gt;
&lt;h3&gt;Requirements&lt;/h3&gt;
&lt;p&gt;According to the &lt;a href="http://rad-dev.org/wiki/guides/setup"&gt;Lithium Wiki&lt;/a&gt;, to develop applications with Lithium you need:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A web server, like Apache or &lt;span class="caps"&gt;IIS&lt;/span&gt;&lt;/li&gt;
	&lt;li&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; 5.3.0 or higher&lt;/li&gt;
	&lt;li&gt;Git (not required, but all example projects are on git repos, so you may as well have it)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For this tutorial, more specifically, you need to download (just download, don&amp;#8217;t install anything!):&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://code.google.com/p/mongoose/"&gt;mongoose&lt;/a&gt;, a tiny, standalone (as &lt;em&gt;in one single file&lt;/em&gt;), cross-platform web server.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://www.php.net/downloads.php#v5"&gt;&lt;span class="caps"&gt;PHP&lt;/span&gt; 5.3.0&lt;/a&gt;, not the installer, the zip package.&lt;/li&gt;
	&lt;li&gt;&lt;a href="http://rad-dev.org/lithium/versions"&gt;Lithium&lt;/a&gt; (version 0.1, at the time of writing)&lt;/li&gt;
	&lt;li&gt;The &lt;a href="http://rad-dev.org/li3_docs"&gt;li3_docs plugin&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;To get the li3_docs plugin you need to &lt;a href="http://rad-dev.org/users/add"&gt;register&lt;/a&gt; on rad-dev.org, and clone the li3_docs git repository. If you don&amp;#8217;t have git installed or you don&amp;#8217;t want to read &lt;a href="http://spheredev.org/wiki/Git_for_the_lazy"&gt;another awesome tutorial&lt;/a&gt; to install it and learn how to use it, I&amp;#8217;ll save you the hassle and let you download the plugin from &lt;a href="/files/li3_docs.zip"&gt;here&lt;/a&gt;, for this time ony.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Note:&lt;/b&gt; This tutorial assumes that you are on Windows. If you are not, some things may be a bit different depending on your platform.&lt;/p&gt;
&lt;h3&gt;Setting up the environment&lt;/h3&gt;
&lt;p&gt;Choose a directory on your sistem (let&amp;#8217;s call it &lt;b&gt;D:\lithium_test&lt;/b&gt; from now on). We&amp;#8217;ll do everything in here, and you can move it anywhere you like afterwards, even on a &lt;span class="caps"&gt;USB&lt;/span&gt; stick, without breaking anything.&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Unzip Lithium in &lt;b&gt;D:\lithium_test&lt;/b&gt;, so that it contains the following files and directories:
	&lt;ul&gt;
		&lt;li&gt;app/&lt;/li&gt;
		&lt;li&gt;libraries/&lt;/li&gt;
		&lt;li&gt;.htaccess (it won&amp;#8217;t actually be used in this tutorial)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Unzip &lt;span class="caps"&gt;PHP&lt;/span&gt; 5.3.0 somewhere and copy the following files to the &lt;b&gt;D:\lithium_test&lt;/b&gt; folder:
	&lt;ul&gt;
		&lt;li&gt;php5.dll&lt;/li&gt;
		&lt;li&gt;php-cgi.exe&lt;/li&gt;
		&lt;li&gt;php.ini (just get php.ini-development from the &lt;span class="caps"&gt;PHP&lt;/span&gt; package and rename it)&lt;/li&gt;
	&lt;/ul&gt;&lt;/li&gt;
	&lt;li&gt;Copy the mongoose-2.8.exe executable in &lt;b&gt;D:\lithium_test&lt;/b&gt; and rename it to &lt;b&gt;mongoose.exe&lt;/b&gt; for convenience.&lt;/li&gt;
	&lt;li&gt;Create a &lt;b&gt;mongoose.conf&lt;/b&gt; file containing the following lines:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt;&lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;cgi_interp      php-cgi.exe
&lt;span class="line-numbers"&gt;&lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;cgi_ext         php
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;If you did everything correctly, your &lt;b&gt;D:\lithium_test&lt;/b&gt; directory should contain the following:&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;app\&lt;/li&gt;
	&lt;li&gt;libraries\&lt;/li&gt;
	&lt;li&gt;.htaccess&lt;/li&gt;
	&lt;li&gt;mongoose.exe&lt;/li&gt;
	&lt;li&gt;mongoose.conf&lt;/li&gt;
	&lt;li&gt;php-cgi.exe&lt;/li&gt;
	&lt;li&gt;php.ini&lt;/li&gt;
	&lt;li&gt;php5.dll&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Running Lithium&lt;/h3&gt;
&lt;p&gt;Double click &lt;b&gt;mongoose.exe&lt;/b&gt; and point your browser of choice to &lt;a href="http://localhost:8080/app/webroot/index.php"&gt;http://localhost:8080/app/webroot/index.php&lt;/a&gt;. You should see the Lithium temporary homepage (yes, I expected something fancier too):&lt;/p&gt;
&lt;p&gt;&lt;img src="/img/pictures/lithium/temp_homepage.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Now, let&amp;#8217;s see if we can get the li3_docs plugin running as well:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Unzip &lt;b&gt;li3_docs.zip&lt;/b&gt; and copy the &lt;b&gt;li3_docs&lt;/b&gt; folder in &lt;b&gt;D:\lithium_test\app\libraries\plugins&lt;/b&gt;.&lt;/li&gt;
	&lt;li&gt;Open &lt;b&gt;D:\lithium_test\app\config\bootstrap.php&lt;/b&gt; and add the line: &lt;code&gt;Libraries::add('plugin', 'li3_docs');&lt;/code&gt; at the end. I actually found this commented out already (line 80).&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Go to &lt;a href="http://localhost:8080/app/webroot/index.php?url=docs"&gt;http://localhost:8080/app/webroot/index.php?url=docs&lt;/a&gt;, you should see something like this:&lt;/p&gt;
&lt;p&gt;&lt;img src="/img/pictures/lithium/li3_docs.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;Congratulation, you&amp;#8217;re now running your first Lithium application!&lt;/p&gt;
&lt;h3&gt;Fixing URLs&lt;/h3&gt;
&lt;p&gt;Once the initial excitement wears off you&amp;#8217;ll notice that none of the links on the docs page works.&lt;/p&gt;
&lt;p&gt;That&amp;#8217;s because the mongoose web server does not support &lt;span class="caps"&gt;URL&lt;/span&gt; rewriting (and Lithium needs it badly right now), so we have to change the way URLs are created. &lt;a href="http://twitter.com/nateabele"&gt;@nateabele&lt;/a&gt; gave me &lt;a href="http://pastium.org/view/3a966c1446fcbd1d4f5a94d882256987"&gt;some tips&lt;/a&gt; on how to do this; it&amp;#8217;s very simple:&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;Create a directory called &lt;b&gt;action&lt;/b&gt; in &lt;b&gt;D:\lithium_test\app\extensions&lt;/b&gt;.&lt;/li&gt;
	&lt;li&gt;Create a file called &lt;b&gt;Request.php&lt;/b&gt;, containing the following:&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="CodeRay"&gt;
  &lt;div class="code"&gt;&lt;pre&gt;&lt;span class="line-numbers"&gt; &lt;a href="#n1" name="n1"&gt;1&lt;/a&gt;&lt;/span&gt;&lt;span class="inline-delimiter"&gt;&amp;lt;?php&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n2" name="n2"&gt;2&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;namespace&lt;/span&gt; app\extensions\action;
&lt;span class="line-numbers"&gt; &lt;a href="#n3" name="n3"&gt;3&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n4" name="n4"&gt;4&lt;/a&gt;&lt;/span&gt;&lt;span class="keyword"&gt;class&lt;/span&gt; &lt;span class="class"&gt;Request&lt;/span&gt; &lt;span class="keyword"&gt;extends&lt;/span&gt; \lithium\action\&lt;span class="constant"&gt;Request&lt;/span&gt; {
&lt;span class="line-numbers"&gt; &lt;a href="#n5" name="n5"&gt;5&lt;/a&gt;&lt;/span&gt;
&lt;span class="line-numbers"&gt; &lt;a href="#n6" name="n6"&gt;6&lt;/a&gt;&lt;/span&gt;  &lt;span class="keyword"&gt;protected&lt;/span&gt; &lt;span class="keyword"&gt;function&lt;/span&gt; &lt;span class="function"&gt;_base&lt;/span&gt;() {
&lt;span class="line-numbers"&gt; &lt;a href="#n7" name="n7"&gt;7&lt;/a&gt;&lt;/span&gt;    &lt;span class="keyword"&gt;return&lt;/span&gt;  &lt;span class="string"&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;span class="content"&gt;?url=&lt;/span&gt;&lt;span class="delimiter"&gt;'&lt;/span&gt;&lt;/span&gt;;
&lt;span class="line-numbers"&gt; &lt;a href="#n8" name="n8"&gt;8&lt;/a&gt;&lt;/span&gt;  }
&lt;span class="line-numbers"&gt; &lt;a href="#n9" name="n9"&gt;9&lt;/a&gt;&lt;/span&gt;}
&lt;span class="line-numbers"&gt;&lt;strong&gt;&lt;a href="#n10" name="n10"&gt;10&lt;/a&gt;&lt;/strong&gt;&lt;/span&gt;&lt;span class="inline-delimiter"&gt;?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;p&gt;We&amp;#8217;re basically extending the &lt;code&gt;\lithium\action\Request&lt;/code&gt; with a custom class, telling Lithium how to create the base &lt;span class="caps"&gt;URL&lt;/span&gt;.&lt;/p&gt;
&lt;p&gt;After doing so, open &lt;b&gt;D:\lithium_test\app\webroot\index.php&lt;/b&gt; and change:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;echo lithium\action\Dispatcher::run();&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;into:&lt;/p&gt;
&lt;code&gt;echo lithium\action\Dispatcher::run(new app\extensions\action\Request());&lt;/code&gt;
&lt;p&gt;In this case, we&amp;#8217;re instructing the dispatcher to use our custom Request class instead of the default one.&lt;/p&gt;
&lt;p&gt;Now everything should work as expected. Reload the docs page (&lt;a href="http://localhost:8080/app/webroot/index.php?url=docs"&gt;http://localhost:8080/app/webroot/index.php?url=docs&lt;/a&gt;) and verify that the links work by navigating to &lt;code&gt;Lithium&lt;/code&gt;, then &lt;code&gt;action&lt;/code&gt; and finally &lt;code&gt;Controller&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Now you can use Lithium to display its own &lt;span class="caps"&gt;API&lt;/span&gt; locally (if things didn&amp;#8217;t work out, there&amp;#8217;s always &lt;a href="http://li3.rad-dev.org/docs"&gt;http://li3.rad-dev.org/docs&lt;/a&gt;).&lt;/p&gt;</description>
      <pubDate>Tue, 27 Oct 2009 08:48:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/getting-started-with-lithium/</guid>
      <link>http://www.h3rald.com/articles/getting-started-with-lithium/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/getting-started-with-lithium/#comments</comments>
      <category>li3</category>
      <category>php</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>The CakePHP Framework: Your First Bite</title>
      <description>&lt;p&gt;According to a recent study, &lt;span class="caps"&gt;PHP&lt;/span&gt; is one of the most popular programming languages in the world. In spite of this, &lt;span class="caps"&gt;PHP&lt;/span&gt; is often criticized for its inconsistent naming conventions, its lack of important features as compared to other languages (like namespaces) and its inherent disorganization. Furthermore, &lt;span class="caps"&gt;PHP&lt;/span&gt; is very easy to learn, and this has often led to the common misconception that most &lt;span class="caps"&gt;PHP&lt;/span&gt; developers are inexperienced and that their code is therefore prone to security vulnerabilities and exploits.&lt;a href="http://www.sitepoint.com/article/application-development-cakephp"&gt;Read the full article&lt;/a&gt; on &lt;a href="http://www.sitepoint.com/"&gt;SitePoint.com&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Thu, 13 Jul 2006 20:03:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/cakephp-first-bite/</guid>
      <link>http://www.h3rald.com/articles/cakephp-first-bite/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/cakephp-first-bite/#comments</comments>
      <category>cakephp</category>
      <category>tutorial</category>
      <category>review</category>
    </item>
    <item>
      <title>Ruby on Rails &amp; CakePHP</title>
      <description>&lt;p&gt;This article is an attempt to port a famous Ruby on Rails tutorial to &lt;span class="caps"&gt;PHP&lt;/span&gt; using an emerging &lt;span class="caps"&gt;PHP&lt;/span&gt; &lt;span class="caps"&gt;MVC&lt;/span&gt; framework, CakePHP. CakePHP was inspired by Rails&amp;#8217; philosophy of Rapid Application Development. It implements a lot of the features and concepts that made Ruby on Rails popular in a very short time. Although Ruby&amp;#8217;s syntax and way of doing things is known to be much more elegant than other programming languages, there is yet hope for &lt;span class="caps"&gt;PHP&lt;/span&gt; to get more organized and effi cient. This tutorial will follow its Rails counterpart step-by-step, covering the essential steps to create a simple, yet fully functional, web application.&lt;br /&gt;
Register on the &lt;a href="http://www.php-mag.net/magphpde/psecom,id,20,archive,2,noeid,20,.html"&gt;International &lt;span class="caps"&gt;PHP&lt;/span&gt; Magazine&lt;/a&gt; to read the full article.&lt;br /&gt;
&lt;img src="/img/thumbs/phpmag0706.gif" alt="" /&gt;&lt;/p&gt;</description>
      <pubDate>Fri, 07 Jul 2006 01:52:28 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/ror-and-cakephp/</guid>
      <link>http://www.h3rald.com/articles/ror-and-cakephp/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/ror-and-cakephp/#comments</comments>
      <category>cakephp</category>
      <category>rails</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>An overview of the CakePHP framework</title>
      <description>&lt;p&gt;&lt;em&gt;&amp;#8220;There are many frameworks available for the &lt;span class="caps"&gt;PHP&lt;/span&gt; programming language nowadays, and especially a lot of &lt;span class="caps"&gt;RAD&lt;/span&gt; (Rapid Application Development) frameworks which aim to make web development faster, less tedious and more organized. CakePHP was one of the first frameworks to port the &lt;span class="caps"&gt;RAD&lt;/span&gt; philosophy &amp;#8211; which became so popular after Ruby on Rails &amp;#8211; to the &lt;span class="caps"&gt;PHP&lt;/span&gt; programming language. CakePHP v1.0 is now one of the most popular and intuitive solutions for &lt;span class="caps"&gt;PHP&lt;/span&gt; programming, let&amp;#8217;s discover why&amp;#8230;&amp;#8221;&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://hades.phparch.com/ceres/public/article/index.php/art::cakephp::overview"&gt;Read the full article&lt;/a&gt; on &lt;a href="http://hades.phparch.com/artemis/main/"&gt;php|architect article repository&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Tue, 30 May 2006 07:50:20 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/cakephp-overview/</guid>
      <link>http://www.h3rald.com/articles/cakephp-overview/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/cakephp-overview/#comments</comments>
      <category>cakephp</category>
      <category>review</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Watch out: CakePHP screencasts</title>
      <description>&lt;p&gt;Tutorials are great, articles are helpful, manuals are essential and the &lt;span class="caps"&gt;API&lt;/span&gt; is your best friend, but there&amp;#8217;s still something missing there&amp;#8230; Unfortunately podcasts are not yet available, but the CakePHP team is proud to announce the creation of two &lt;a href="http://cakephp.org/pages/screencasts"&gt;screencasts&lt;/a&gt; in an effort to help new bakers familiarizing with CakePHP&amp;#8217;s concepts. &lt;br /&gt;
This is old news now, the screencasts section came together with the &lt;a href="http://base--/blog/view/24"&gt;site overhaul&lt;/a&gt; but I only got a chance to take a look at them (one of them only, to be totally honest) recently, and so here&amp;#8217;s a spoil&amp;#8230; erhm, a &lt;em&gt;detailed&lt;/em&gt; description of John Anderson&amp;#8217;s screencast about the &lt;a href="http://manual.cakephp.org/chapter/18"&gt;Blog Tutorial&lt;/a&gt;.&lt;/p&gt;
&lt;p style="float:left;"&gt;&lt;img src="http://base--/img/pictures/CakePHP_1.0.png" alt="" /&gt;&lt;/p&gt;
&lt;p&gt;There&amp;#8217;s something I&amp;#8217;ll never do: a screencast. Recording every mouse movement, every word or piece of code typed in half an hour? No way! And what happens if I mistype something? People will keep pointing out the fact that I was starting to type &lt;code&gt;&amp;lt;/h2&amp;gt;&lt;/code&gt; to close a &lt;code&gt;&amp;lt;/h1&amp;gt;&lt;/code&gt; tag, or that I waited an eternity like five full seconds before deciding what to do. I guess I&amp;#8217;m quite paranoid&amp;#8230; John did it, and he did it well. Using just bash, vim and Safari he was able to record an excellent 30-minutes screencast featuring the blog tutorial. &lt;br /&gt;
Before people start complaining that the blog tutorial should be completed in fifteen minutes, keep in mind that John&amp;#8217;s screencast is meant to show everything clearly to new users, via a trial and error approach if necessary.&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s what happens in the screencast, nothing new if your read the blog tutorial, but still interesting, especially if you&amp;#8217;re new to Cake. Unfortunately there&amp;#8217;s no audio, but the video talks by itself and John will occasionally write some comments here and there.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;0:01 &amp;#8211; 5:00&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;span class="caps"&gt;SVN&lt;/span&gt; checkout to get the latest CakePHP version&lt;/li&gt;
	&lt;li&gt;make app/tmp writeable&lt;/li&gt;
	&lt;li&gt;execute queries (table posts)&lt;/li&gt;
	&lt;li&gt;insert some test posts&lt;/li&gt;
	&lt;li&gt;create database config file: modify 3 lines of database.php&lt;/li&gt;
	&lt;li&gt;CakePHP is now able to connect to database&lt;/li&gt;
	&lt;li&gt;create app/models/post.php model&lt;/li&gt;
	&lt;li&gt;create posts_controller.php [John uses Vim as preferred &lt;span class="caps"&gt;PHP&lt;/span&gt; editor]&lt;/li&gt;
	&lt;li&gt;try to access /posts/, error: missing method index()&lt;/li&gt;
	&lt;li&gt;create function index() in postscontroller.php able to fetch posts&lt;/li&gt;
	&lt;li&gt;refresh, missing index view&lt;/li&gt;
	&lt;li&gt;create index.thtml displaying the raw posts array&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;5:01 &amp;#8211; 10:00&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;index.thtml: display posts with table and foreach iteration&lt;/li&gt;
	&lt;li&gt;add hyperlink in index.thtml to view posts&lt;/li&gt;
	&lt;li&gt;access /posts/view/1 &amp;#8594; missing method view()&lt;/li&gt;
	&lt;li&gt;add view() method in postscontroller.php&lt;/li&gt;
	&lt;li&gt;create view.thtml to display&lt;/li&gt;
	&lt;li&gt;Raw view post with pre tags and print_r()&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;10:01 &amp;#8211; 15:00&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;display post properly with &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt; tags&lt;/li&gt;
	&lt;li&gt;add link in index.thtml to add a post&lt;/li&gt;
	&lt;li&gt;missing method &amp;#8594; add()&lt;/li&gt;
	&lt;li&gt;add add() in controller&lt;/li&gt;
	&lt;li&gt;missing view [trial and error, trial and error&amp;#8230;]&lt;/li&gt;
	&lt;li&gt;create add.thtml, using the Html Helper to create input tags easily&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;15:01 &amp;#8211; 20:00&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;add.thtml (continued)&lt;/li&gt;
	&lt;li&gt;testing add form&lt;/li&gt;
	&lt;li&gt;view added post&lt;/li&gt;
	&lt;li&gt;start adding another (for validation purposes) [stop before submitting]&lt;/li&gt;
	&lt;li&gt;modify post.php model, valid_not_empty for title and body&lt;/li&gt;
	&lt;li&gt;modify view to trigger validation &lt;code&gt;$html-&amp;gt;tagErrorMsg()&lt;/code&gt;&lt;/li&gt;
	&lt;li&gt;test: no body, message displayed&lt;/li&gt;
	&lt;li&gt;test: no title, message displayed&lt;/li&gt;
	&lt;li&gt;add another post, everything works&lt;/li&gt;
	&lt;li&gt;[pause: five seconds]&lt;/li&gt;
	&lt;li&gt;back to the controller, create delete() function&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;20:01 &amp;#8211; 25:00&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;delete function (continued)&lt;/li&gt;
	&lt;li&gt;add &amp;#8220;Actions&amp;#8221; table column in index.thtml, with link delete post&lt;/li&gt;
	&lt;li&gt;delete two posts&lt;/li&gt;
	&lt;li&gt;take a breath&lt;/li&gt;
	&lt;li&gt;add link in index.thtml to edit post&lt;/li&gt;
	&lt;li&gt;refresh page, mouse over edit links&amp;#8230;&lt;/li&gt;
	&lt;li&gt;back to controller, add edit function [we learnt abour CakePHP errors alright]&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;&lt;strong&gt;25:01 &amp;#8211; 27:38&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;pause, 5 sec [should I write edit.thtml from scratch]&lt;/li&gt;
	&lt;li&gt;copy add.thtml as edit.thtml&lt;/li&gt;
	&lt;li&gt;change just the title and form action&lt;/li&gt;
	&lt;li&gt;[pause: 3 sec]&lt;/li&gt;
	&lt;li&gt;test edit link&lt;/li&gt;
	&lt;li&gt;edit a post&lt;/li&gt;
	&lt;li&gt;move around, switch views&lt;/li&gt;
	&lt;li&gt;edit config/routes.php&lt;/li&gt;
	&lt;li&gt;set default route to posts/index&lt;/li&gt;
	&lt;li&gt;refresh &amp;#8211;  all done!&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;That&amp;#8217;s it. All in a 40MB .mov file. Download it from &lt;a href="http://www.archive.org/download/CakePHP_BlogTutorialJohn/BlogTutorial.mov"&gt;here&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Sat, 20 May 2006 07:47:00 -0600</pubDate>
      <guid>http://www.h3rald.com/articles/31/</guid>
      <link>http://www.h3rald.com/articles/31/</link>
      <author>h3rald@h3rald.com</author>
      <comments>http://www.h3rald.com/articles/31/#comments</comments>
      <category>cakephp</category>
      <category>tutorial</category>
    </item>
  </channel>
</rss>

