<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>H3RALD: Watch out: CakePHP screencasts</title>
    <link>http://www.h3rald.com/blog/31</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Fabio Cevasco's Writings</description>
    <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. 
This is old news now, the screencasts section came together with the &lt;a href="http://www.h3rald.com/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://www.h3rald.com/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. 
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;gt; 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;gt; 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 15:47:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:aae00650-5d09-102a-8a4a-e48c0fa51268</guid>
      <author>Fabio Cevasco</author>
      <link>http://www.h3rald.com/blog/31</link>
      <category>Blog</category>
      <category>CakePHP</category>
      <category>tutorial</category>
      <trackback:ping>http://www.h3rald.com/trackback/entries/30</trackback:ping>
    </item>
  </channel>
</rss>
