<?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>Okada Design Blog &#187; books</title>
	<atom:link href="http://www.okadadesign.no/blog/category/books/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.okadadesign.no/blog</link>
	<description>Welcome to Okada Design Web Development Blog</description>
	<lastBuildDate>Wed, 11 Jan 2012 23:21:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Book Review &#8220;CMS Design Using PHP and jQuery&#8221;</title>
		<link>http://www.okadadesign.no/blog/books/book-review-cms-design-using-php-and-jquery/</link>
		<comments>http://www.okadadesign.no/blog/books/book-review-cms-design-using-php-and-jquery/#comments</comments>
		<pubDate>Mon, 17 Jan 2011 07:49:46 +0000</pubDate>
		<dc:creator>shinokada</dc:creator>
				<category><![CDATA[books]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.okadadesign.no/blog/?p=2627</guid>
		<description><![CDATA[ Download Sample Chapter <p>The Packt Publishing contacted me and asked if I am interested in writing a review about this book. I said yes and got a e-book straight away. I have read 50% of this book and checked codes. Today I’d like to write some reviews about what I read so far.</p> [...]
Related posts:<ol>
<li><a href='http://www.okadadesign.no/blog/books/the-book-reviews-and-books-i-am-going-to-buy/' rel='bookmark' title='The book reviews and books I am going to buy'>The book reviews and books I am going to buy</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.okadadesign.no%2Fblog%2Fbooks%2Fbook-review-cms-design-using-php-and-jquery%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.okadadesign.no%2Fblog%2Fbooks%2Fbook-review-cms-design-using-php-and-jquery%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<div style="float:left;margin: 0 10px 10px 0;text-align: center;" ><a href="http://link.packtpub.com/xTaRpW"><img src="http://www.okadadesign.no/blog/wp-content/uploads/2011/01/CMS-book-image.png" /></a><br />
<a href="https://www.packtpub.com/sites/default/files/2527OS-Chapter-7-Plugins.pdf">Download Sample Chapter</a>
</div>
<p>The Packt Publishing contacted me and asked if I am interested in writing a review about this book. I said yes and got a e-book straight away.  I have read 50% of this book and checked codes. Today I’d like to write some reviews about what I read so far.</p>
<p>This is not a paid work and I will be honest.</p>
<p>The book starts from the most important part of CMS about user management.<br />
Then it goes to core of CMS, pages and templates. Using jQuery and plug-ins for this CMS.</p>
<p>I think the appropriate audience of this book should have some experiences with PHP and jQuery. If you have your own CMS, then the book will give you different approaches and skills.<br />
If you don’t know php or jQuery, then you should read those books first.</p>
<p><span id="more-2627"></span></p>
<h3>Chapter 1</h3>
<p>In chapter one, the book explains about the cms directory structure and how to name the directory and why, explaining about config file etc.</p>
<p>The author creates a simple database and add a httpd.conf file. He explains well and step by step. It is easy to read. However as I stated it before if you just started writing php or jquery, then I think you may need to google or study further things you don’t know. But if you have some expereince with web development or know a bit about Zend or Linux, then it shouldn’t be a problem. I learnt a couple of things already in this chapter.</p>
<p>He explains well about .htaccess and took some mysteries off about this file for me.</p>
<p>What surprised me first was that the book takes you straight to the core of coding without gibberish.<br />
Typos which I found in code are followings.</p>
<p>Page 18 &#8216;password &#8216;=>&#8217;cmspass&#8217;,<br />
should be &#8216;password&#8217;=>&#8217;cmspass&#8217;, without space after password. If you take out this space it works. And the supplied code for chapter one does not have this error.</p>
<p>Page.php methods are missing “public static function” and its constructor has unnecessary codes such as return false which constructor will never return.</p>
<p>And public $vars; (or var $var;)  is missing at the top.</p>
<h3>Chapter 2</h3>
<p>In this chapter the author explains about the user management including roles, admin log-in system including forgotten password management, captcha, user page, user creation, deletion and update which are important to any CMS.<br />
He explains the use of JASON in group field, giving a sample db and data for your database.<br />
He touches about security as well.</p>
<p>The codes in admin log-in function are easy to understand and he gives room for the readers to expand it in future.  </p>
<p>For log-in directory he creates index.php and login.css. Again rather than complicated structure system, author make it easy to understand so that readers don’t need to dig into code to find the structure itself.</p>
<p>It seems better to copy and paste from the book when you are testing on your local server rather than using codes from downloads.</p>
<p>If recaptcha does not work in your localhost. Follow these steps.</p>
<p>1. Go to recaptcha and use the domain name localhost. It will give you public and private keys.<br />
2.  in login.php use this code</p>
<pre class="brush: php; title: ; notranslate">
require_once SCRIPTBASE.'ww.incs/recaptcha.php';
      require_once('recaptchalib.php');
  $captcha=recaptcha_get_html(RECAPTCHA_PUBLIC, $error);
</pre>
<p>3. in recaptcha.php comment out the first line.</p>
<pre class="brush: php; title: ; notranslate">
// require_once SCRIPTBASE.'ww.incs/recaptcha-php-1.11/recaptchalib.php';

define('RECAPTCHA_PRIVATE','your key here);
define('RECAPTCHA_PUBLIC','your key here');
</pre>
<p>4. find recaptchalib.php from ww.incs/recaptcha-php-1.11 and move it to ww.admin/login/ directory</p>
<p>Author continues to create login-lib for redirection. He uses a line of regex and builds up the log-in function. forgotten-password-verification.php and password-reminder.php will be useful scripts for those who are creating own CMS.</p>
<p>The author does not explain line by line, however he tells you what the code is doing. So if you have an experience with php, you understand what’s going on most of the time.</p>
<p>Throughout the book the author uses require, but it might be better to use require_once or include_once for study purpose.<br />
At this stage I suggest the following change for page 38 the following line</p>
<pre class="brush: php; title: ; notranslate">
require 'admin_libs.php';
echo 'you are logged in!';
</pre>
<p>should be</p>
<pre class="brush: php; title: ; notranslate">
require_once 'admin_libs.php';
echo 'you are logged in!';
</pre>
<p>Suggestion 1: For debugging, unable the captcha to easy access to admin area.</p>
<p>A couple of typos in chapter 2 are followings, otherwise it works well.</p>
<p>1. The author uses acitvation_key for a field name, however in forgotten-password-verification.php he uses verification_code. So it gives an error.</p>
<p>The line</p>
<pre class="brush: php; title: ; notranslate">
$r=dbRow('select * from user_accounts where
  email=&amp;quot;'.addslashes($_GET['email']).'&amp;quot; and verification_code=&amp;quot;'.$_GET['verification_code'].'&amp;quot; and active'
);
</pre>
<p>should read like this.</p>
<pre class="brush: php; title: ; notranslate">
$r=dbRow('select * from user_accounts where
  email=&amp;quot;'.addslashes($_GET['email']).'&amp;quot; and activation_key=&amp;quot;'.$_GET['verification_code'].'&amp;quot; and active'
);
</pre>
<p>2. page 59,</p>
<pre class="brush: php; title: ; notranslate">
$password=md5($_REQUEST['email'].'|'.$_REQUEST['password']);
This line should be commented out.
// $password=md5($_REQUEST['email'].'|'.$_REQUEST['password']);
</pre>
<p>It might be good idea that author sets up debugging system for readers so that if somethings goes wrong, then readers can find the cause and can fix it. I would suggest to set up xdebug for this purpose.</p>
<p>3. page 51</p>
<pre class="brush: php; title: ; notranslate">
$login_msg=(int)$_REQUEST['login_msg'];
</pre>
<p>should be</p>
<pre class="brush: php; title: ; notranslate">
$login_msg=$_REQUEST['login_msg'];
</pre>
<p>4. page 65</p>
<pre class="brush: php; title: ; notranslate">
$grs=json_decode($r['groups']);
foreach($groups as $k=&amp;gt;$g){
echo '&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;groups['.$k.']&amp;quot;';
if(in_array($g,$grs))echo ' checked=&amp;quot;checked&amp;quot;';
echo ' /&amp;gt;',htmlspecialchars($g),'&amp;lt;br /&amp;gt;';
}
</pre>
<p>This will give an error when you are creating a new user.</p>
<p>So I would change this to the following.</p>
<pre class="brush: php; title: ; notranslate">
// the following won't be necessary for create function
if($id&amp;gt;-1){
    $grs=json_decode($r['groups']);
foreach($groups as $k=&amp;gt;$g){
   echo '&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;groups['.$k.']&amp;quot;';
   if(in_array($g,$grs))echo ' checked=&amp;quot;checked&amp;quot;';
   echo ' /&amp;gt;',htmlspecialchars($g),'&amp;lt;br /&amp;gt;';
}
</pre>
<p>I would like to see the author is using PDO, he could start using prepared statement from the beginning.<br />
So far the author does not introduce validation for input such as email. It may come later, but if not you must add your validation to codes.</p>
<h3>Chapter 3</h3>
<p>Author builds the basics of page management, including creation of the form for page management, and a few jQuery tools for making page location management easy and improving the selection of large select-boxes.</p>
<p>He leads you through how to use jQuery plugin, jstree to enhance the menu and further more drag and drop to record events. He explains what the codes do, but does not explain line by line. If you have used jquery before it is upto you to investigate further. Codes are practical and can be used to your CMS.</p>
<p>He explains pages structure system with using parent field. He does not write about recursive function in menu.php but it is a useful to create a nested menu and it is included in the code.</p>
<p>Again following the book rather than copy and paste from source code will lead you to build up pages functions step by step.</p>
<h3>Chapter 4 Page Management part 2</h3>
<p>Chapter 4 starts off from human readable date function with jQuery. This is another handy tools which you can use for your CMS as well. He also shows codes which avoids creating a same page with the same parent menu and using jQuery modal to create a page.</p>
<p>However action.edit.php has problems when you create a page from ‘add main page’ on the left column. When you create through this, it won’t have id and other values and it will gives errors if your xdebug is on. A way around is to create another function for this purpose.</p>
<p>There is useful information how to add CKeditor to textareas.<br />
Interesting topic for me was about file manager. In my CMS, I used Tinymce Ajax File Manager. The author explains his KFM (Kae file manager) which you can download from http://kfm.verens.com/.<br />
However I am not able to make it work as of today. And forum is not online even the author says to ask help from the forum. That’s a bit of bummer.</p>
<p>I installed imagemagick on my ubuntu with the help of this page.</p>
<p>http://www.lavluda.com/2008/02/02/install-imagemagick-support-to-your-debianubuntu-server/</p>
<p>The book is filled up with various and many practical codes which is useful for your current or next project.<br />
Did I learn anything new? Yes definitely! It’s up to you either using it or learning from it.</p>
<h3>Chapter 5 Design Template</h3>
<p>I have little experience with using a template engine, so this is another interesting topic for me.</p>
<p>He leads you how to set up Smarty and using it in a template. And he shows coding for creating page menus, and embed the page content within that.</p>
<p>If statement which to find a default theme was useful for my future CMS.</p>
<p>There is a typo in source codes but not in the book.<br />
index.php in the source code has this.</p>
<pre class="brush: php; title: ; notranslate">
$pagecontent=$PAGEDATA-&amp;gt;render();
</pre>
<p>And this should be</p>
<pre class="brush: php; title: ; notranslate">
$pagecontent=$PAGEDATA-&amp;gt;body;
</pre>
<p>The book will introduce render method later in the book.</p>
<h3>Chapter 6 Design</h3>
<p>In this chapter it will finish the template engine and  improving the navigation menu with using the Filament Group menu. This will show you how to code for a jQuery menu which easily  changed to a vertical menu or horizontal one.</p>
<p>Creating a theme switcher will be useful for me to alternate amongst different themes. He also leads you through how to call Smarty functions from within the page body itself. This is great to know if you are creating plugins and you can use it inline in the page body.</p>
<p>In page146<br />
You need to make /.privat/config.php writable in order to make it work<br />
chmod 766 /var/www/webworks/.private/config.php</p>
<p>Otherwise codes in the books goes well without problem.</p>
<p>So far there are many useful information and codes I can use for the next project. However I found the code structure getting complex without MVC approach.</p>
<p>I recommend the book to those who want to make your own CMS.</p>
<p>You wiil find many clever and cunning way of coding and learn new things. </p>
<p>Related posts:<ol>
<li><a href='http://www.okadadesign.no/blog/books/the-book-reviews-and-books-i-am-going-to-buy/' rel='bookmark' title='The book reviews and books I am going to buy'>The book reviews and books I am going to buy</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.okadadesign.no/blog/books/book-review-cms-design-using-php-and-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The book reviews and books I am going to buy</title>
		<link>http://www.okadadesign.no/blog/books/the-book-reviews-and-books-i-am-going-to-buy/</link>
		<comments>http://www.okadadesign.no/blog/books/the-book-reviews-and-books-i-am-going-to-buy/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 17:07:00 +0000</pubDate>
		<dc:creator>shinokada</dc:creator>
				<category><![CDATA[books]]></category>

		<guid isPermaLink="false">http://www.okadadesign.no/blog/?p=6</guid>
		<description><![CDATA[ <p>I have bought two books about jquery from Amazon last year.</p> <p>1. Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques</p> <p>and</p> <p>2. jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library</p> <p>The first one is excellent. If you are a beginner like me and want to learn [...]
Related posts:<ol>
<li><a href='http://www.okadadesign.no/blog/books/book-review-cms-design-using-php-and-jquery/' rel='bookmark' title='Book Review &#8220;CMS Design Using PHP and jQuery&#8221;'>Book Review &#8220;CMS Design Using PHP and jQuery&#8221;</a></li>
<li><a href='http://www.okadadesign.no/blog/web-development/codeigniter-shopping-cart/' rel='bookmark' title='Codeigniter shopping cart v1.0 code updates'>Codeigniter shopping cart v1.0 code updates</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<div class="tweetmeme_button" style="float: right; margin-left: 10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fwww.okadadesign.no%2Fblog%2Fbooks%2Fthe-book-reviews-and-books-i-am-going-to-buy%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fwww.okadadesign.no%2Fblog%2Fbooks%2Fthe-book-reviews-and-books-i-am-going-to-buy%2F&amp;style=normal&amp;b=2" height="61" width="50" /><br />
			</a>
		</div>
<p>I have bought two books about jquery from Amazon last year.</p>
<p>1. <a href="http://www.amazon.com/gp/product/1847192505?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847192505">Learning jQuery: Better Interaction Design and Web Development with Simple JavaScript Techniques</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=1847192505" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p>and</p>
<p>2. <a href="http://www.amazon.com/gp/product/1847193811?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1847193811">jQuery Reference Guide: A Comprehensive Exploration of the Popular JavaScript Library</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=1847193811" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p>The first one is excellent. If you are a beginner like me and want to learn jquery, I highly recommend it. I have read three times the first 6 chapters and I am still reading and digesting the rest of the book slowly.</p>
<p>What I realized is that I need to know javascript. From chapter 7, you need to know javascript well. Not only the beginners level. That&#8217;s why I am going to buy a couple of javascript books for learning it, and I will tell you in the second part what I am going to order.</p>
<p>I am disappointed about the second book a bit. If you need a reference on your desk, it may serve what it&#8217;s supposed to do. But you can find more information from <span style="font-style: italic;"><a href="http://visualjquery.com/">http://visualjquery.com/</a></span> with examples. This website is an excellent resource for jquery.<br />The books does not give enough examples. You can find more in the above website or jquery.com document.</p>
<p>Now after some research I decided to buy the following books for my learning jquery and javascript.</p>
<p>The first one is<br /><a href="http://www.amazon.com/gp/product/0596517742?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596517742">JavaScript: The Good Parts</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=0596517742" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p>Douglas Crockford is a highly regarded javascript expert. You can find his talks in Yahoo! UI Library<br /><a href="http://developer.yahoo.com/yui/theater/">http://developer.yahoo.com/yui/theater/</a></p>
<p>In his talk, he recommended only one book which is least bad. That&#8217;s the second one I am going to buy.<br /><a href="http://www.amazon.com/gp/product/0596101996?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0596101996">JavaScript: The Definitive Guide</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=0596101996" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p>Some cretics comment about lack of examples in this book, but overall reviews are good.</p>
<p>The third one is<br /><a href="http://www.amazon.com/gp/product/1933988355?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=1933988355">jQuery in Action</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=1933988355" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p>I am hoping to learn more about jquery from this book.<br />There will be another jquery book is coming out soon.<br /><a href="http://www.amazon.com/gp/product/0470227796?ie=UTF8&amp;tag=jquejavaandmo-20&amp;linkCode=as2&amp;camp=1789&amp;creative=9325&amp;creativeASIN=0470227796">Beginning JavaScript and CSS Development with jQuery</a><img src="http://www.assoc-amazon.com/e/ir?t=jquejavaandmo-20&amp;l=as2&amp;o=1&amp;a=0470227796" alt="" style="border: medium none  ! important; margin: 0px ! important;" width="1" border="0" height="1" /></p>
<p><a href="http://www.packtpub.com/user-interface-library-for-jquery/book">jQuery UI 1.6: The User Interface Library for jQuery</a></p>
<p>And the author of Learning jQuery, Karl Swedberg is publishing another jquery book in May 2009.</p>
<p>Well I have to how much left in my wallet&#8230;</p>
<p>I used <a href="https://affiliate-program.amazon.com/gp/associates/network/main.html">Amazon Associates</a> for the above link. I can earn some Amazon gift card so that I can buy more books!</p>
<p>Related posts:<ol>
<li><a href='http://www.okadadesign.no/blog/books/book-review-cms-design-using-php-and-jquery/' rel='bookmark' title='Book Review &#8220;CMS Design Using PHP and jQuery&#8221;'>Book Review &#8220;CMS Design Using PHP and jQuery&#8221;</a></li>
<li><a href='http://www.okadadesign.no/blog/web-development/codeigniter-shopping-cart/' rel='bookmark' title='Codeigniter shopping cart v1.0 code updates'>Codeigniter shopping cart v1.0 code updates</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.okadadesign.no/blog/books/the-book-reviews-and-books-i-am-going-to-buy/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

