<?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>Robert Rosetta&#039;s Blog</title>
	<atom:link href="http://blog.rrosetta.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.rrosetta.com</link>
	<description>Website Development</description>
	<lastBuildDate>Thu, 03 Feb 2011 18:23:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Eclipse + Aptana Suite Plugin</title>
		<link>http://blog.rrosetta.com/2010/03/02/eclipse-aptana-suite-plugin/</link>
		<comments>http://blog.rrosetta.com/2010/03/02/eclipse-aptana-suite-plugin/#comments</comments>
		<pubDate>Tue, 02 Mar 2010 21:08:55 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[New Developers]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=61</guid>
		<description><![CDATA[Well for years I&#8217;ve used Dreamweaver, not only to design sites, but also to write PHP code.  Well with doing Zend Framework and OOP  and getting serious with PHP, Dreamweaver just doesn&#8217;t cut it as a code editor anymore.  Dreamweaver is great at doing webdesign, which is what it&#8217;s primary function is and I will [...]]]></description>
			<content:encoded><![CDATA[<p>Well for years I&#8217;ve used Dreamweaver, not only to design sites, but also to write PHP code.  Well with doing Zend Framework and OOP  and getting serious with PHP, Dreamweaver just doesn&#8217;t cut it as a code editor anymore.  Dreamweaver is great at doing webdesign, which is what it&#8217;s primary function is and I will continue to use it for that, but for PHP coding, I will now be using Eclipse with the Aptana Plugin.</p>
<p>One thing I was very impressed with was Eclipse&#8217;s complete melding with the PHP language, and the code I am developing.  It is a great way to learn about various PHP functions and interestingly enough -- the Zend Framework since I am now working with that.<span id="more-61"></span><strong> </strong></p>
<h3><strong>Key Features</strong></h3>
<ul>
<li>Color coding (both display and print)</li>
<li>Integration with the PHP Language and Manual</li>
<li>Auto-suggestions</li>
<li>Easily find where functions/classes are used throughout your code</li>
<li>Syntax error checking indicators, i.e, forgetting to use a semi colon, unbalanced parenthesis, etc.</li>
</ul>
<p><a href="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse_screen.jpg"><img class="aligncenter size-full wp-image-64" title="eclipse_screen" src="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse_screen.jpg" alt="Eclipse Screen Sample" width="600" height="363" /></a></p>
<p>To the left is the Project View or Workspace view, this allows you to easily move around your projects and open up your files.  In the center is obviously the code view, how ever, as you can see -- it contains two pop-ups.   While I was typing the class definition, &#8220;class Bootstrap extends Zend_App&#8230;&#8221;, a list of available classes pop-up, as you type, it narrows this list down.  By clicking on the list it will insert it into your code.  You can also see that it also gives you a class definition.  This is a great learning tool, especially for Zend.  By using this, you can quickly gain a better knowledge of what classes and functions the Zend Framework offers, even as you are coding. The right hand side is the Outline view, this is an outline of your current file, showing all the classes, methods, properties, etc.</p>
<p>One thing to remember about all these panels, they are moveable -- you so you can create your workspace to suit your needs,  there are also many more panels, two of which are shown below.</p>
<p><a href="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-project-php-function-views1.jpg"><img class="alignleft size-full wp-image-69" style="margin-top: 5px; margin-bottom: 5px; border: 5px solid black;" title="eclipse-project-php-function-views" src="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-project-php-function-views1.jpg" alt="Eclipse's Project View and PHP Function View" width="288" height="427" /></a></p>
<p>The PHP Function View shows the various classes and functions that are available to you from PHP.  A great feature also is that if you right click and select &#8220;Open Manual&#8221; you can view PHP manual for the class, function or property right from within Eclipse.  No more having to open up the manual and then search for it.  It also works within the code view as well.</p>
<p>The Project Outline View is another very important view to have.  This shows you all the classes, functions, properties used in your project.  As you can see, I drilled down through the SF_Model_Abstract to see the properties and functions associated with that class.</p>
<p>This is just some of the best aspects I have seen with Eclipse that makes coding TRUE Object Oriented Programming in PHP so much easier.</p>
<h2>Installation</h2>
<p>Installation was a snap.  Simply go to the <a href="http://www.zend.com/en/community/pdt" target="_blank">Zend Eclipse PDT</a> page and select your environment.  Once you download the zip file, unzip it, there is no installation, so you just can run from where you extracted it.  If you are using Windows platform like I am, then I moved it into my programs and set up a Start Menu shortcut.  After installation, the key thing obviously is to experiment with it and test out it&#8217;s functionality.  I set up a couple of things for my code to work the way I want it to.</p>
<p>One issue I faced, when I initially set it up, my PHP Function View was not being populated.  I looked on the web, where there were a lot of questions, but hardly any reasonable answers it seemed.  To see if I could get it to work on my other computer, I installed in on there,  this time instead of changing the default Workspace when Eclipse initially started, I kept it.  The PHP Function View worked on my desktop installation.  I went back to my laptop, deleted my project and restarted Eclipse, this time when it asked for my workspace, I kept it as the default.  When I loaded up my project, the PHP Function View was properly populated. I don&#8217;t know if this was the issue or not, but it was the only thing I had changed.  Also, the directory that I had initially changed the workspace to -- was the root directory of where my projects are located,  so that may have caused the problem.</p>
<h2>FTP</h2>
<p>Okay, FTP seems to be an issue with Eclipse.  After experimenting with numerous coding aspects -- I was wondering, so how do I FTP my files between my machine and the server?  I don&#8217;t want to have to switch between Eclipse and Dreamweaver or another FTP program all the time and it is very odd that an IDE would not include this functionality.   So once again, I went to the web to search for it. There I discovered that Aptana Suite had a plugin for Eclipse and the two could work together. Simply go to the <a href="http://www.aptana.org/studio/plugin" target="_blank">Aptana Suite Plugin page</a>, copy the URL that is listed there, go back into eclipse, select help from the main menu and select &#8220;Install New Software&#8221; toward the bottom of the list. From there,  just paste the URL into the  &#8221;Work With&#8221; box and hit enter.  Click on the check box next to the Aptana Suite listed.  you can see the example below.</p>
<p style="text-align: center;"><a href="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-aptana-suite-plugin-install.jpg"><img class="aligncenter size-full wp-image-82" title="eclipse-aptana-suite-plugin-install" src="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-aptana-suite-plugin-install.jpg" alt="Eclipse Installation Screen for the Aptana Suite Plugin" width="480" height="418" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">After clicking the next button several times, you will get to the license agreements.  I had an issue with this screen, even though I selected my approval of the licenses, the &#8220;Finish&#8221; button still would not become active.  I had to click back, go to the original screen, enter the URL in again and at that point the Finish button became active.  I did not have to reclick on the next buttons, I just merely selected Finish on the panel above.</p>
<p style="text-align: left;">Once you restart Eclipse -- Aptana should be accessible and you will be able to set up your FTP connections.  I won&#8217;t go through everything, but you can get an idea of what the screen looks like when you switch from the PHP Perpspective to the Aptana Perspective below.</p>
<p style="text-align: left;"><a href="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-aptana-suite-plugin-page.jpg"><img class="aligncenter size-full wp-image-90" title="eclipse-aptana-suite-plugin-page" src="http://blog.rrosetta.com/wp-content/uploads/2010/03/eclipse-aptana-suite-plugin-page.jpg" alt="Eclipse Aptana Plugin Perspective Page" width="600" height="364" /></a></p>
<p style="text-align: left;">To the left is the FTP controls, this shows your remote server and also allows you to set up your connections.  You can upload your files directly from the PHP Perspective using the Project/Workspace View.  You can switch Perspectives easily by toggling the two controls in the upper right area of the window.  If Eclipse is not displaying these, simply click on the icon next to them and choose &#8220;Other&#8221;, or it may already show &#8220;PHP (default)&#8221;.    The Perspectives may also be hidden, because as with most of Eclipse, it draggable, sizeable, and moveable.</p>
<h2>Video Tutorials</h2>
<p>The Zend website has a number of great <a href="http://files.zend.com/help/PDT/pdt.htm#video_tutorials.htm" target="_blank">Eclipse Video Tutorials</a> you can view, plus you can of course search on Google and YouTube.  Below are two to get you started&#8230;</p>
<h3>Using Eclipse+PDT as a PHP IDE Part 1</h3>
<p><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/VRFZpk-YHl4?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;feature=related" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/VRFZpk-YHl4?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;feature=related" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="355"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=VRFZpk-YHl4">www.youtube.com/watch?v=VRFZpk-YHl4</a></p></p>
<p><span style="color: #495e72; font-size: small;"><a href="http://www.youtube.com/watch?v=VRFZpk-YHl4&amp;feature=related">h</a></span><a href="http://www.youtube.com/watch?v=VRFZpk-YHl4&amp;feature=related"></a><a href="http://www.youtube.com/watch?v=VRFZpk-YHl4&amp;feature=related">ttp://www.youtube.com/watch?v=VRFZpk-YHl4&amp;feature=related</a></p>
<h3>Using Eclipse+PDT as a PHP IDE Part 2</h3>
<p><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/x8WnciHjXco?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;feature=related" />
<param name="allowFullScreen" value="true" />
<param name="allowscriptaccess" value="always">
<embed src="http://www.youtube.com/v/x8WnciHjXco?color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0&amp;rel=1&amp;feature=related" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="425" height="355"></embed>
</object>
</span><p><a href="http://www.youtube.com/watch?v=x8WnciHjXco">www.youtube.com/watch?v=x8WnciHjXco</a></p></p>
<p><a href="http://www.youtube.com/watch?v=x8WnciHjXco&amp;feature=related">http://www.youtube.com/watch?v=x8WnciHjXco&amp;feature=related</a></p>
<h2>Websites</h2>
<ul>
<li><a href="http://www.zend.com/en/community/pdt" target="_blank">Zend Eclipse PDT</a></li>
<li><a href="http://www.aptana.org/studio/plugin" target="_blank">Aptana Suite Plugin</a></li>
<li><a href="http://files.zend.com/help/PDT/pdt.htm#video_tutorials.htm" target="_blank">Eclipse Video Tutorials</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2010/03/02/eclipse-aptana-suite-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Errors are a GOOD Thing When Learning a Programming Language</title>
		<link>http://blog.rrosetta.com/2010/02/16/errors-are-a-good-thing-when-learning-a-programming-language/</link>
		<comments>http://blog.rrosetta.com/2010/02/16/errors-are-a-good-thing-when-learning-a-programming-language/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 19:15:10 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[New Developers]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=54</guid>
		<description><![CDATA[This may sound counter productive, but encountering errors when learning a language is a good thing.  It helps you to understand how the language works and how to debug the code.  All code has errors, whether it is syntax or logical.  Logical errors are usually the hardest to find because the program is still working, [...]]]></description>
			<content:encoded><![CDATA[<p>This may sound counter productive, but encountering errors when learning a language is a good thing.  It helps you to understand how the language works and how to debug the code.  All code has errors, whether it is syntax or logical.  Logical errors are usually the hardest to find because the program is still working, it&#8217;s just not doing what it should be doing.  It could be as simple as something like setting a database column to Tiny Int, but then trying to store a Integer size value in there.  It will store the value, it just won&#8217;t be the value you started out with. You may not even know something is wrong until you go to view the value and you notice that it is obviously incorrect.</p>
<p>Syntax errors however are generally mistypes.  An upper case letter in a class name, versus a lower case letter, missing semi-colon, undeclared class, etc. All of a sudden the system is complaining that it can&#8217;t find a class and you have to figure out why.  Even though in general syntax errors should be easier to find, especially if you develop in a module format, constantly testing the modules as you go along, it can be very difficult when just learning.<span id="more-54"></span></p>
<p>For instance, I just got this cryptic error while going through the <strong><em>Zend in Action</em></strong> book&#8230;.</p>
<blockquote><p><strong>Fatal error</strong>:  Uncaught exception  &#8216;Zend_Controller_Dispatcher_Exception&#8217; with message &#8216;Invalid controller  specified (error)&#8217; in  /home/../../lib/Zend/Controller/Dispatcher/Standard.php:242 Stack  trace: #0  /home/../../lib/Zend/Controller/Front.php(946):   Zend_Controller_Dispatcher_Standard-&gt;dispatch(Object(Zend_Controller_Request_Http),  Object(Zend_Controller_Response_Http)) #1 /home/../../app/bootstrap.php(57):  Zend_Controller_Front-&gt;dispatch() #2 /home/../../public/index.php(6):  Bootstrap-&gt;runApp() #3 {main}   thrown in <strong>/home/aboutnj/zend-action.rrosetta.com/lib/Zend/Controller/Dispatcher/Standard.php</strong> on line <strong>242</strong></p></blockquote>
<p>Now that doesn&#8217;t really tell me much. It doesn&#8217;t tell me where the error is occurring, I see the process that it is going for the Zend components, but none of my classes, other than the bootstrap.  So, since I am learning, I go through the system from where it last worked.  Since I am doing this step by step, I know that it was just working before I tried to include the menu items.  So it has to be related to the menu functionality.  One of the ways to narrow down a location of a syntax error is to comment out code from the beginning of the process and work your way down. If you are using a unit testing program, then you can put break points in to step through the program.  I generally use a mixture of both and I do think it may be better to just comment out code or purposely introduce errors into the code to see how it works when just learning.</p>
<p>One of the things I did for instance was purposely misspell one of the Zend classes that were in an if statement to make sure that it was finding it properly and there was no problem with that.  I walked through the system, commenting a line at a time that made external calls. I knew that after this statement &#8211; &#8220;<em>$actionStack-&gt;pushStack($menuAction);</em>&#8221; on page 73 was the problem.  But that line was not the actually cause of the problem. I confirmed that everything was okay in the IndexController.  After going through each process &#8211; I eventually commented out this line &#8220;<em>&lt;?php $this-&gt;headLink()-&gt;appendStyleSheet($this-&gt;baseUrl().&#8217;/css/menu.css&#8217;)?&gt;</em>&#8221; in the menu.phtml file.  Now many of you may be able to pick up the error right away &#8211; but when you are learning it is sometimes easy to forget what the proper case is for function names.  In this instance, the problem was with appendStyleSheet().  The correct name for the function is appendStyle<em>s</em>heet &#8211; with &#8220;sheet&#8221; having a lower case &#8220;s&#8221;, not upper.  Once I corrected that, everything was good to go and I could continue developing the system.</p>
<p>Of course no where in the stack trace did it indicate to me that it was in the menu.phtml file that was causing the problem. I am sure that as I get more fluent in the Zend Framework, these error messages will be less cryptic to me or that I will discover better ways of narrowing them down, just like when I was an expert at PowerBuilder.  By purposely introducing syntax errors into the code, I could see how Zend was reporting these back and helped me to narrow down what type of error might be causing the problem.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2010/02/16/errors-are-a-good-thing-when-learning-a-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting Multiple Computer Books to Learn a Programming Language</title>
		<link>http://blog.rrosetta.com/2010/02/15/getting-multiple-computer-books-to-learn-a-programming-language/</link>
		<comments>http://blog.rrosetta.com/2010/02/15/getting-multiple-computer-books-to-learn-a-programming-language/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 02:27:23 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[New Developers]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=49</guid>
		<description><![CDATA[I&#8217;m not sure how everyone else learns a new programming language, but I will share my years of knowledge with anyone who is wanting to get into computer programming. As you can see from reading the posts, although I haven&#8217;t posted in a while, is that I am currently trying to conquer Zend Framework and [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m not sure how everyone else learns a new programming language, but I will share my years of knowledge with anyone who is wanting to get into computer programming.</p>
<p>As you can see from reading the posts, although I haven&#8217;t posted in a while, is that I am currently trying to conquer Zend Framework and AJAX, using JQuery, DOJO, Prototype, YUI or other toolkit. I find I have to immerse myself in the language, reading the chapters ahead, highlighting, doing the samples, trying to apply it to my own project. The more resources I have, the better.<span id="more-49"></span></p>
<p>This is currently my Zend Framework reading list (and yes, I am referencing ALL of these books at the same time)&#8230;</p>
<ul>
<li>Zend Framework 1.8 &#8211; Web Application Development</li>
<li>Zend Framework in Action</li>
<li>Practical Web 2.0 Applications with PHP</li>
<li>Pro Zend Framework Techniques</li>
<li>Easy PHP Websites with the Zend Framework</li>
</ul>
<p>You may be wondering why I use all these books, well the goal is to FULLY understand the language. By using multiple books, I get to see how different ways people use to  solve the same problem.  For instance, in terms of Zend, each book demonstrates their own unique subdirectory structure.  One book, uses modules, while others don&#8217;t.  By learning these different techniques, I can see what will work for me.  I like the Module concept, because I believe in the separation of code.  When I was going through the Practical  Web 2.0 Applications book, they didn&#8217;t mention the use of modules.</p>
<p>The books also give different examples &#8211; which is a benefit.  For instance, in a previous post I mentioned how I wanted to use ReCAPTCHA instead of the PEAR CAPTCHA that is used in <em>Practical Web 2.0 Applications</em> book.  Well, skimming through my books, I discovered that <em>Pro Zend Framework Techniques</em> shows how to incorporate ReCAPTCHA using Zend_Service_ ReCaptcha on page 197, which is what I prefer to use.</p>
<p>Finally, a lot of times it just makes it easy to understand a concept.  If in one book, the concept seems complicated, another book may make it crystal clear and I have that &#8220;light bulb&#8221; moment.  I have a huge library of computer books and I continue to add to it.  With the web it has made it even easier, because now I can look up information on various developer sites. Even though the web has a ton of resources, I still think  for in depth information,  books are invaluable.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2010/02/15/getting-multiple-computer-books-to-learn-a-programming-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installation of PHPUnit on a Dreamhost Account</title>
		<link>http://blog.rrosetta.com/2009/11/30/installation-of-phpunit-on-a-dreamhost-account/</link>
		<comments>http://blog.rrosetta.com/2009/11/30/installation-of-phpunit-on-a-dreamhost-account/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 23:37:34 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=42</guid>
		<description><![CDATA[I know it&#8217;s been awhile since I posted here.  I needed to get some other web work complete, such as the Trenton 1784 website, which took me away from the Zend Framework for a bit.  Now I am back at it. Since I have the Zend Framework in Action book, in order to fill out [...]]]></description>
			<content:encoded><![CDATA[<p>I know it&#8217;s been awhile since I posted here.  I needed to get some other web work complete, such as the <a href="http://www.Trenton1784.org" target="_blank">Trenton 1784</a> website, which took me away from the Zend Framework for a bit.  Now I am back at it.</p>
<p>Since I have the <a href="http://www.manning.com/allen/" target="_blank">Zend Framework in Action</a> book, in order to fill out my knowledge of Zend, I wanted to get my server fully set up for the applications in this book and this required the downloading of <a href="http://pear.phpunit.de" target="_blank">PHPUnit</a> in order to do the Unit Testing.  Now it doesn&#8217;t seem like this would be a requirement to actually go through the book,  but I had always done unit testing when I was a consultant developing desktop apps for Fortune 500 companies.  Since Zend Framework in Action also explains how to use PHPUnit, I might as well take advantage of it.<span id="more-42"></span></p>
<p>First a note about installing this. These are merely steps that I took to get PHPUnit to wok for me.  I can not be held responsible for anything that may happen during these steps.  I have tried to lay them out as clearly as I could and in an easy to follow process.  It did take me some trial and error, as well as researching several websites to put this all together.</p>
<p>Installing it is like piecing together a puzzle &#8211; trying to find the next bit of information that someone may have left out.  Just downloading it was a bit of challenge since I wasn&#8217;t going to be using the Pear Installer.  First I had to look for where to download the zip file from. On the main page they have a Install PHPUnit link.  Okay, so I thought that would bring me to the download page. Nope &#8211; it brings me to the instructions on how to install it in the PDF manual.  At first I thought this wasn&#8217;t what I wanted, which was my own damn fault for just glancing at it, so I went back to the main screen to see if they had a &#8220;Download Link&#8221;, which they didn&#8217;t.  After looking at various links, I went back to the install link and read that page.  Although it was not hotlinked &#8211; the link for downloading PHPUnit manually was in there &#8211; <a href="http://pear.phpunit.de/get/" target="_blank">http://pear.phpunit.de/get/</a></p>
<p>So I downloaded the PHPUnit-3.4.3.tgz file and FTPed to the server (you can&#8217;t use Dreamhost&#8217;s WebFTP since it is over 2 meg -  I used Dreamweaver and of course you can use any FTP program you wish).  Now that it was on the server, I had to see how to set it up on a Dreamhost account that is on a  shared server. These are the steps I had to take.  I am putting these here because I noticed while doing searching that others were trying to figure out the same thing (some things I have already had set-up, such as putty, but I will go through them so anyone completely unfamiliar will be able to follow from start to finish.</p>
<h3>Using Putty to get into Dreamhost account</h3>
<p style="padding-left: 30px;">1) First <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html" target="_blank">get Putty</a> &#8211; no installation required, just download and run.</p>
<p style="padding-left: 30px;">2) Enter in the hostname &#8211; this is just your website  without the &#8220;http://www&#8221; &#8211; i.e.,  &#8220;somedomain.com&#8221;</p>
<p style="padding-left: 30px;">3) Click Open at the bottom.</p>
<p style="padding-left: 30px;">4) When the black command line screen comes up it will first says &#8220;login as&#8221;. Just type in the dreamhost user name which you use to FTP into dreamhost.</p>
<p style="padding-left: 30px;">5) It will then ask for the specific account&#8217;s password.  Type in the password that you use to FTP into that account with.</p>
<p style="padding-left: 30px;">6) If everything goes okay &#8211; you should see the console welcome screen.</p>
<p>If you do a <em>dir</em> command, you will see that you are on the root level of your account&#8217;s directory. You can easily get back to this directory by just typing &#8220;<em>cd $HOME</em>&#8221;</p>
<h3>Installing PHPUnit</h3>
<p style="padding-left: 30px;">1) Make sure the PHPUnit-x.x.x.tgz file is in your root account directory.  If it isn&#8217;t &#8211; then go to the directory you saved it in and copy it in the home directory by typing <em>cp PHPUnit-x.x.x.tgz $HOME</em></p>
<p style="padding-left: 30px;">2) Unzip the tgz file by issuing this command &#8211; <em>tar -zxvf PHPUnit-x.x.x.tgz</em> I found this on the <a href="http://wiki.dreamhost.com/Phpunit" target="_blank">DreamhostWiki</a></p>
<p style="padding-left: 30px;">3) Now create the local/bin directory if it is not already created by issuing this command <em>mkdir -p $HOME/local/bin</em></p>
<p style="padding-left: 30px;">4) Back to the <a href="http://www.phpunit.de/manual/current/en/installation.html" target="_blank">PHPUnit installation instructions</a> &#8211; you need to rename the phunit.php file  to just phpunit (note the lowercase) without the .php extension and copy it to your local/bin directory by issuing this command <em>cp PHPUnit-x.x.x/phpunit.php $HOME/local/bin/phpunit</em>. You can find this file located in the PHPUnit-x.x.x subdirectory which was created when the tar file was unzipped. <strong>NOTE:</strong> the <a href="http://wiki.dreamhost.com/Phpunit" target="_blank">Dreamhost PHPUnit Installation instructions</a> says that the file is located in the PHPUnit-x.x.x/bin directory &#8211; which there no such directory, at least in version 3.4.3 which is the latest. Also, it says nothing about having to rename the file.</p>
<p style="padding-left: 30px;">5) Now set up the paths.  I first tested these out one at a time without changing the .bash_profile to make sure it worked.</p>
<p style="padding-left: 30px;">6) You have to set a path to the PHP5 Command Line interpreter.  The instructions for Dreamhost I found here &#8211; <a href="http://wiki.dreamhost.com/PHP#PHP-CLI_.28Using_PHP_from_the_Command_line.29" target="_blank">PHP-CLI (Using PHP from the Command line)</a> You want to enter &#8211; <em>export PATH=/usr/local/php5/bin/:$PATH </em><br />
Type<em> php &#8211; v </em>to make sure it work. It should give you the PHP CLI version information.</p>
<p style="padding-left: 30px;">7) Set the path for your local/bin directory  so it will find the phpunit file. Enter in &#8211; <em>export PATH=$HOME/&lt;accountname&gt;/local/bin:$PATH<br />
</em>Type <em>phpunit &#8211;help</em> (<strong>Note:</strong> This will still give you an error because it is not able to find the other files in the PHPUnit-x.x.x/PHPUnit directory &#8211; we will add that path next.  It should find at least the PHPUnit file though, attempt to run it and not give an command not found message.)</p>
<p style="padding-left: 30px;">8 ) Set up the path to find the rest of the files required by PHUnit.  I kept these in the original subdirectory which is located in PHPUnit-x.x.x/PHPUnit.  Just enter <em>export PATH=$HOME/&lt;accountname&gt;/PHPUnit-x.x.x:$PATH</em></p>
<p style="padding-left: 30px;">9) Now test it the whole thing out by entering <em>phpunit &#8211;help</em> If everything worked you should get the version information and help screen.  If you didn&#8217;t make sure that all your path&#8217;s are entered in correctly with the proper upper and lower cases.</p>
<h3>Making the Changes Permanent in the .bash_profile</h3>
<p>Once you have gotten that to work you want to make those paths permanent so you don&#8217;t have to retype them every time you log in. This requires putting them into your .bash_profile (note the period before the file name &#8211; just like .htaccess)</p>
<p style="padding-left: 30px;">1) Enter <em>cd $HOME </em>to make sure you are in the root directory<em><br />
</em></p>
<p style="padding-left: 30px;">2) Enter <em>vi .bash_profile</em> (This will bring you to the vi editor)</p>
<p style="padding-left: 30px;">3) The vi editor opens in view mode and you need to change to edit mode &#8211; so hit the <em>a</em> key You should now be able to edit the file.</p>
<p style="padding-left: 30px;">4) Cursor  down to the end of the last line and hit enter (you should now have a new line to enter in information). Enter this -</p>
<p style="padding-left: 30px;"><em>PATH=$HOME/&lt;accountname&gt;/PHPUnit-x.x.x:</em><em>$HOME/&lt;accountname&gt;/local/bin:</em><em>/usr/local/php5/bin/:</em><em>$PATH</em></p>
<p style="padding-left: 30px;">That line is made up of the three paths we entered before &#8211; just concatenated together and are now in the .bash_profile file.</p>
<p style="padding-left: 30px;">5) Now to save the file.  Hit the <em>esc key</em> to get out of edit mode. Type <em>: x  (no space between the colon and the x) </em>to save and exit.</p>
<p>To test to make sure the .bash_profile works you need to  logout of the command line by typing <em>logout</em> and enter.  Log back in using Putty (which is described above) After logging in, if you type in<em> phpunit &#8211;help</em> now, it should give you version and help information as it did before but without you having to manually type in the paths.</p>
<p>If it doesn&#8217;t work, double check your paths and make sure everything is correct. It seemed as if the path to PHPUnit-x.x.x had to appear first for some reason.  When I didn&#8217;t have it first it generated a  PHP error.  It could be possible that Dreamhost has a copy of PHPUnit somewhere on their system that it could be picking up if it doesn&#8217;t search in YOUR PHPUnit directory first.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/11/30/installation-of-phpunit-on-a-dreamhost-account/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Trenton 1784</title>
		<link>http://blog.rrosetta.com/2009/10/23/trenton-1784/</link>
		<comments>http://blog.rrosetta.com/2009/10/23/trenton-1784/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 20:31:52 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Development Projects]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=39</guid>
		<description><![CDATA[I&#8217;m currently working on a new website for a client &#8211; Trenton1784.org.  A lot of what I would like to do requires JQuery.  I would like to make it much more &#8220;interactive&#8221;.  For instance, on the main page there is the vignette.  Each day a photo with description will be displayed on the main page.  [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently working on a new website for a client &#8211; <a href="http://www.trenton1784.org" target="_blank">Trenton1784.org</a>.  A lot of what I would like to do requires JQuery.  I would like to make it much more &#8220;interactive&#8221;.  For instance, on the main page there is the vignette.  Each day a photo with description will be displayed on the main page.  There could be about 55 vignettes total. <span id="more-39"></span></p>
<p>The client would like to be able to show the user past vignettes, and I had initially just thought about the simple &#8220;view others&#8221; and have them be directed to another page that lists all the previously displayed vignettes.  Now I am thinking about possibly trying to incorporate a &#8220;Photo Scroller&#8221; type mechanism that allows the visitor to cycle through them right from the home page.  I&#8217;ve never used JQuery and I just got my books in yesterday &#8211; but the only way to learn something is to do it. I&#8217;m trying to jump right in and learn to swim as quickly as possible here.</p>
<p>I may have to start out a little more manageable  though and wade in with JQuery and that would be to still use the &#8220;redirect to new page&#8221; idea, but then allow them to just simply mouse over the thumbnail of the image to have it expand into the full image.</p>
<p>The other thing is that some vignette description text may be long, but they don&#8217;t want it all appearing on the home page.  I want to do a &#8220;view more&#8221; type functionality that expands the text out on demand.  What I wanted to do was allow for 3 lines of displayed text and then the &#8220;view more&#8221; underneath if not all of it was displayed &#8211; similar to the facebook way of doing it.  Most samples I saw though involve &lt;P&gt; breaks  within the text and TWO blocks -  which won&#8217;t work for what I am trying to do.  I did see one sample that I may use or try to modify &#8211; that works for the most part the way I want it to.  The only problem is that it puts in a &lt;p&gt; element at the break point.  I suppose I could dynamically remove this element when the person clicks on &#8220;view more&#8221;  &#8211; that way the text continues to flow properly.  Like I said &#8211; I&#8217;ve never used JQuery before, so this will definitely be a learning experience.</p>
<p>If anyone has any thoughts, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/23/trenton-1784/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend Framework in Action</title>
		<link>http://blog.rrosetta.com/2009/10/21/zend-framework-in-action/</link>
		<comments>http://blog.rrosetta.com/2009/10/21/zend-framework-in-action/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 06:34:06 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=36</guid>
		<description><![CDATA[Well I got my Zend Framework in Action book in today.  I figure it will help me to understand more fully what I am learning in the Practical Web 2.0 Applications with PHP.  Since this is the first time using Zend Framework, I am trying to get up to speed as quickly as possible &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Well I got my Zend Framework in Action book in today.  I figure it will help me to understand more fully what I am learning in the Practical Web 2.0 Applications with PHP.  Since this is the first time using Zend Framework, I am trying to get up to speed as quickly as possible &#8211; so the more information I have at my disposal to cross reference, the better.  This is generally how I have always learned &#8211; it was how I taught myself PowerBuilder.  I would use five books at one time sometimes &#8211; using each to supplement the information I was looking for. One book may not explain something in a easily understood manner, or may leave something out, but by combining the books, it helped in understanding the complex concepts.<span id="more-36"></span></p>
<p>I haven&#8217;t used PHP OOP (Object Oriented Programming) technology before.  I do have a ton of OOP experience, from PowerBuilder to Java, but since PHP 5 was the first version that truly introduced OOP, I haven&#8217;t had much of a chance to actually put my knowledge to practice using PHP. One of the issues has been, when you are doing small module type programs, and the client wants something done quickly &#8211; it&#8217;s a little hard to develop in an OOP style.  I try to explain, and in a corporate environment it is a lot easier to do so, that OOP takes much more time on the front end, but saves a ton of time when trying to make modifications later on.</p>
<p>I&#8217;m excited to be finally be back into using OOP and &#8220;proper&#8221; coding practices.  The goal with learning Zend is not only to learn this framework and use it &#8211; but also to learn proper PHP development. Although Zend Framework in Action didn&#8217;t get the best reviews on Amazon  it mostly dealt with errors in the code samples.  That is downloadable.  It did get good reviews in what I was looking for though and that was explaining the fundamentals.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/21/zend-framework-in-action/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Practical Web 2.0 Applications with PHP – Chapter 3</title>
		<link>http://blog.rrosetta.com/2009/10/17/practical-web-2-0-applications-with-php-%e2%80%93-chapter-3/</link>
		<comments>http://blog.rrosetta.com/2009/10/17/practical-web-2-0-applications-with-php-%e2%80%93-chapter-3/#comments</comments>
		<pubDate>Sat, 17 Oct 2009 20:58:31 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Frameworks]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=25</guid>
		<description><![CDATA[Chapter 3 is basically setting up the user tables in the database and the functionality for loading, inserting and deleting the records.  There are two custom built classes that the author developed that will need to be downloaded from the source code &#8211; DatabaseObject.php and Profile.php. I&#8217;m wondering if these are watered down versions of [...]]]></description>
			<content:encoded><![CDATA[<p>Chapter 3 is basically setting up the user tables in the database and the functionality for loading, inserting and deleting the records.  There are two custom built classes that the author developed that will need to be downloaded from the source code &#8211; DatabaseObject.php and Profile.php. I&#8217;m wondering if these are watered down versions of the classes the author actually uses because there are limited comments in the code and he stresses in the beginning of the book the importance of commenting.<span id="more-25"></span></p>
<p>While going through this chapter I had started reading Chapter 4 to get a better idea of how the Chapter 3 code worked.  I plan on making a couple of modifications with how things work in Chapter 4.  For one thing &#8211; the system is set up where it sets the user password and then they must go in and change it.  I prefer to give the user the ability to create their own password at the time of registration.  The second thing is that the application uses the PEAR CAPTCHA  &#8211; I find these graphic CAPTCHA very hard to read many times and very frustrating.  Anyway &#8211; I will attempt to replace the authors version with <a href="http://recaptcha.net/" target="_blank">reCAPTCHA</a> which helps to digitize books.</p>
<p>I will submit the changes I make to the author&#8217;s code in the next blog post so if anyone who wishes to utilize this  can see how I did it.  I can&#8217;t see it being very hard &#8211; but considering this is my first time using Zend Framework or even reCAPTCHA &#8211; who knows.</p>
<h2>Zend Classes Introduced</h2>
<p><a href="http://framework.zend.com/manual/en/zend.auth.html" target="_blank">Zend_Auth</a><br />
<a href="http://framework.zend.com/manual/en/zend.acl.html" target="_blank">Zend_Acl</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/17/practical-web-2-0-applications-with-php-%e2%80%93-chapter-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Practical Web 2.0 Applications with PHP &#8211; Chapter 2</title>
		<link>http://blog.rrosetta.com/2009/10/12/practical-web-2-0-applications-with-php-chapter-2/</link>
		<comments>http://blog.rrosetta.com/2009/10/12/practical-web-2-0-applications-with-php-chapter-2/#comments</comments>
		<pubDate>Tue, 13 Oct 2009 02:50:50 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Frameworks]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=13</guid>
		<description><![CDATA[Okay &#8211; I&#8217;ve pretty much made it through Chapter 2.  I won&#8217;t go over Chapter 1, because that chapter was basically just an introduction.  Chapter 2 covers developing the base classes and functionality that application will be built upon.    One of the hardest things was making sure that Zend and Smarty were installed properly and [...]]]></description>
			<content:encoded><![CDATA[<p>Okay &#8211; I&#8217;ve pretty much made it through Chapter 2.  I won&#8217;t go over Chapter 1, because that chapter was basically just an introduction.  Chapter 2 covers developing the base classes and functionality that application will be built upon.    One of the hardest things was making sure that Zend and Smarty were installed properly and that my custom PHP.ini file was correct.  I&#8217;m using a live server on the web, so I had make absolutely sure that everything was working properly.</p>
<p>I did run into a few issues going through Chapter 2, but overall the chapter walked through everything really well and explained everything.  So what issues did I run into?<span id="more-13"></span></p>
<p><strong>Issue 1</strong><br />
This wasn&#8217;t really an issue with the book, it was an issue with Zend and ZendLoader being deprecated and the following warning stating that it was going to be removed in 2.0.</p>
<p style="padding-left: 30px;"><em><strong>Notice</strong>: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in <strong>/home/&#8230;./&#8230;./zend/library/Zend/Loader.php</strong> on line <strong>207</strong></em></p>
<p>You can&#8217;t really have a working website if it constantly displays a warning message,  so I had to figure out how to fix this.</p>
<p><strong>Solution</strong><br />
After several hours of trying to research the Zend Documentation concerning how to properly use the Zend_Loader_Autoloader and coming up with no success &#8211; I discovered this website/blog&#8230; <a href="http://akrabat.com/2009/04/30/zend_loaders-autoloader_deprecated-in-zend-framework-18/" target="_blank">Akra&#8217;s DevNotes by Rob Allen</a> &#8211; Author of Zend Framework in Action (which I currently have on order).  He gives the fix very straight forward&#8230;</p>
<p>The old code -</p>
<pre><span style="color: #007700;">require_once(</span><span style="color: #dd0000;">'Zend/Loader.php'</span><span style="color: #007700;">);
</span><span style="color: #0000bb;">Zend_Loader</span><span style="color: #007700;">::</span><span style="color: #0000bb;">registerAutoload</span><span style="color: #007700;">();
</span></pre>
<p>Should be replaced with&#8230;</p>
<pre><span style="color: #007700;">require_once(</span><span style="color: #dd0000;">'Zend/Loader/Autoloader.php'</span><span style="color: #007700;">);
</span><span style="color: #0000bb;">$loader </span><span style="color: #007700;">= </span><span style="color: #0000bb;">Zend_Loader_Autoloader</span><span style="color: #007700;">::</span><span style="color: #0000bb;">getInstance</span><span style="color: #007700;">();

</span></pre>
<p>After I did that with some slight modifications to the variable name, everything worked fine and the warning message disappeared.</p>
<p><strong>Issue 2</strong><br />
After creating the IndexController on page 26 it seems like the file should print out &#8220;web site home&#8221; in the browser &#8211; however instead I was receiving this&#8230;</p>
<p style="padding-left: 30px;"><em>&#8220;<strong>Fatal error</strong>: Uncaught exception &#8216;Zend_View_Exception&#8217; with message &#8216;script &#8216;index/index.phtml&#8217; not found in path (/home<strong>/&#8230;./&#8230;../</strong>phpweb20/include/views/scripts/)&#8217; in /home/&#8230;./&#8230;./zend/library/Zend/View/Abstract.php:926 Stack trace: #0 /home<strong>/&#8230;./&#8230;../</strong>zend/library/Zend/View/Abstract.php(829): Zend_View_Abstract-&gt;_script(&#8216;index/index.pht&#8230;&#8217;) #1 /home<strong>/&#8230;./&#8230;../</strong>zend/library/Zend/Controller/Action/Helper/ViewRenderer.php(903): Zend_View_Abstract-&gt;render(&#8216;index/index.pht&#8230;&#8217;) #2 /home<strong>/&#8230;./&#8230;../</strong>zend/library/Zend/Controller/Action/Helper/ViewRenderer.php(924): Zend_Controller_Action_Helper_ViewRenderer-&gt;renderScript(&#8216;index/index.pht&#8230;&#8217;, NULL) #3 /home<strong>/&#8230;./&#8230;../</strong>zend/library/Zend/Controller/Action/Helper/ViewRenderer.php(963): Zend_Controller_Action_Helper_ViewRenderer-&gt;render() #4 /home<strong>/&#8230;./&#8230;../</strong>zend/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer-&gt;postDispatch() #5 /home/aboutnj/rrosetta.com/zend in <strong>/home/&#8230;./&#8230;../zend/library/Zend/View/Abstract.php</strong> on line <strong>926</strong></em></p>
<p>The book didn&#8217;t really say that it should be working at this point, so I moved onto the database portion.  At this point I was unsure if I had set up the custom php.ini file properly with the correct paths or even if I had correctly set up Zend.  It seemed like I had since I had successfully run some of the test cases.</p>
<p>After I worked through the databse portion, which basically seemed to work properly and stated that the &#8220;Web site home&#8221; should be printing out &#8211; I started really looking into the issue.  After spending several hours researching on the web and making sure I didn&#8217;t miss anything in the book, I discovered that the book left out one important part of the installation of Zend.  I sort of discovered this when the book mentioned that the Zend framework expects templates to contain a PHTML extension, and I never created a PHTML file.  Going to the Zend website, I discovered that zend expects there to be <em>/views/scripts/</em> directory under the <em>include directory</em>.</p>
<p><strong>Solution</strong><br />
Created the subdirectory structure <em>phpweb20/include/views/scripts</em> and within this added the<em> index/index.phtml</em> subdirectory and  file.  I discovered this here &#8211; <a href="http://framework.zend.com/manual/en/project-structure.project.html" target="_blank">http://framework.zend.com/manual/en/project-structure.project.html</a> in the Zend documentation. After I had created this subdirectory, with the index.phtml file everything worked fine.</p>
<p><strong>Issue 3</strong><br />
Okay this ended up being my problem, but it was still very frustrating.  After creating the the linkages with the  Smarty Template Engine and creating the index.tpl, header.tpl and the footer.tpl files, I was receiving this very cryptic error message&#8230;</p>
<p style="padding-left: 30px;"><em><strong>Fatal error</strong>:  Call to a member function fetch() on a non-object in <strong>/home/&#8230;./&#8230;./phpweb20/include/Templater.php</strong> on line <strong>53</strong></em></p>
<p><strong>Solution<br />
</strong>I spent about two hours on this problem, not knowing if I was getting this because of something I coded wrong or if it was because I didn&#8217;t install Smarty properly.  I tried printing out the object &#8211; first in the Templater.php class first &#8211; which didn&#8217;t print anything out.  So instead I checked to see if I could instantiate the Smarty object directly in the index.php file and print it out using print_r() and var_dump() &#8211; it was successfully being instantiated it.  Next I tried the same thing with the Templater class &#8211; with this it was not creating the Smarty class &#8211; it was showing that it was null.   Realizing that it must be a problem with something in the Templater class and not with the way I had Smarty installed &#8211; I searched on the web for the error message and found this article &#8211; <em><a href="http://stackoverflow.com/questions/254291/call-to-a-member-function-on-a-non-object" target="_blank">Call to a member function on a non-object</a></em> It was exactly the problem I was having and the person was encountering it trying to do the same thing I was  &#8211; working through the PHP Web 2.0 Applications with PHP book.  I felt like I may finally get it, the suggestions put me back into thinking that it might be the installation &#8211; but that didn&#8217;t seem right based on my other tests.  The person commented at the end saying that they had fixed it &#8211; but then didn&#8217;t give any indication of what they did &#8211; and NEVER responded to the person who asked if they could post the solution since they were having the same issue.</p>
<p>After this I resorted to the PHP.net documentation.  It had to be because the construct() method wasn&#8217;t being called properly  since none of the values that were being created in this method were printing out when using var_dump().  I went to  the <a href="http://us3.php.net/manual/en/language.oop5.php" target="_blank">PHP Classes and Objects documentation</a> and relooked at the way the constructor method was being called.  Needless to say it was a stupid mistype.  Instead of having two underscores and construct() &#8211; I only had one.  I had _construct() and it should have been __construct() &#8211; so the construct method was never being called.</p>
<p>Although it was a stupid mistake &#8211; it was a good learning experience in terms of PHP OOPs programming.  Sometimes you learn the most when things don&#8217;t work and you have to research the reason why.</p>
<h2>Zend Classes Introduced</h2>
<p><a href="http://framework.zend.com/manual/en/zend.controller.html" target="_blank">Zend_Controller</a><br />
<a href="http://framework.zend.com/manual/en/zend.config.html" target="_blank">Zend_Config</a><br />
<a href="http://framework.zend.com/manual/en/zend.loader.html" target="_blank">Zend_Loader</a><br />
<a href="http://framework.zend.com/manual/en/zend.db.html" target="_blank">Zend_Db</a><br />
<a href="http://framework.zend.com/manual/en/zend.view.html" target="_blank">Zend_View</a><br />
<a href="http://framework.zend.com/manual/en/zend.log.html" target="_blank">Zend_Log</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/12/practical-web-2-0-applications-with-php-chapter-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Practical Web 2.0 Applications with PHP &#8211; a Chapter a Day</title>
		<link>http://blog.rrosetta.com/2009/10/11/practical-web-2-0-applications-with-php-a-chapter-a-day/</link>
		<comments>http://blog.rrosetta.com/2009/10/11/practical-web-2-0-applications-with-php-a-chapter-a-day/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 17:40:59 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Frameworks]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=8</guid>
		<description><![CDATA[I got the Practical Web 2.0 Applications with PHP.  The book seems very detailed  which is unusual for a computer book.  Most computer books have disjointed examples, however this one walks through the development of an entire Blog application from start to finish. It does use the Zend Framework, the Smarty Template Engine and Scriptaculous.  [...]]]></description>
			<content:encoded><![CDATA[<p>I got the <a href="http://www.amazon.com/Practical-Web-2-0-Applications-PHP/dp/1590599063/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1255282459&amp;sr=8-1" target="_blank">Practical Web 2.0 Applications with PHP</a>.  The book seems very detailed  which is unusual for a computer book.  Most computer books have disjointed examples, however this one walks through the development of an entire Blog application from start to finish.</p>
<p>It does use the Zend Framework, the Smarty Template Engine and Scriptaculous.  MY goal is to work through this book within a month from start to finish.  With 14 chapters, if I do a half chapter or a chapter a day  I should be able to reach this goal.  I&#8217;ve skimmed through the book for the last two weeks, just looking casually at the concepts &#8211; such as how the author handles creating search engine friendly URLs.  I&#8217;ve created search friendly URLs for AboutNewJersey.com, but I would like to see how others do it.</p>
<p>After each chapter &#8211; I will include a summary and notes about various things I learned.  This will not only help me- but those who may be also using the book.</p>
<p>Well I guess I better get to work instead of writing about it!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/11/practical-web-2-0-applications-with-php-a-chapter-a-day/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Web User Interfaces &#8211; YUI, DIJIT, JQuery, Ext JS, Scriptaculous</title>
		<link>http://blog.rrosetta.com/2009/10/08/web-user-interfaces-yui-dijit-jquery-ext-js-scriptaculous/</link>
		<comments>http://blog.rrosetta.com/2009/10/08/web-user-interfaces-yui-dijit-jquery-ext-js-scriptaculous/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 19:08:49 +0000</pubDate>
		<dc:creator>Robert Rosetta</dc:creator>
				<category><![CDATA[Computers/Programming]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[Web Frameworks]]></category>

		<guid isPermaLink="false">http://blog.rrosetta.com/?p=3</guid>
		<description><![CDATA[The web technologies have caught up to what my actual skills are &#8211; application development.  I&#8217;ve loved the web &#8211; but up until now it much more of a graphic designer&#8217;s world.  Today with Web 2.0 and the tools to create true interactive web applications, I can concentrate more on my true skills &#8211; database  [...]]]></description>
			<content:encoded><![CDATA[<p>The web technologies have caught up to what my actual skills are &#8211; application development.  I&#8217;ve loved the web &#8211; but up until now it much more of a graphic designer&#8217;s world.  Today with Web 2.0 and the tools to create true interactive web applications, I can concentrate more on my true skills &#8211; database  driven &#8211; interactive applications.<span id="more-3"></span></p>
<p>Now for the hard part though &#8211; finding the right tools to do the job.  The last couple of weeks I have started to look into many of the tools available &#8211; mostly in terms of creating nicely refined user interfaces and forms.  I started out looking at YUI &#8211; which then moved onto Dijit.  This led to Scriptaculous and then JQuery and currently Ext JS.</p>
<p>The problem is &#8211; I like various aspects of all of these.  As far as UI though, I think <a href="http://developer.yahoo.com/yui/" target="_blank">YUI</a> is the weakest (it completely redefines what a checkbox is, which I do NOT  understand), but I do like their underlying AJAX/and javascript framework.  I started heavily looking into <a href="http://dojotoolkit.org/projects/dijit" target="_blank">Dijit</a>, which has a lot of cool easy to use frame effects &#8211; although I don&#8217;t necessarily like the skinning and some functionality is odd.  For instance, I can have a &#8220;Tooltip&#8221; on a TextBox, but not on a DateTextBox or a TextArea.  This led me to <a href="http://jquery.com/" target="_blank">JQuery</a> which I really like in terms of  the look of it&#8217;s  various components &#8211; such as the pop-up date and the modal panel.  However, it doesn&#8217;t contain any skinning for form elements such as TextBox or checkBoxes .  I&#8217;ve tried combining it with Dijit with no success. Finally I have looked at <a href="http://www.extjs.com/" target="_blank">Ext JS</a> &#8211; which unlike the others &#8211; is NOT free.  It has a lot of cool components though.  I could experiment with the free download for now and see if I want to spend the $329 for the final product or not.</p>
<p>I looked at <a href="http://script.aculo.us/" target="_blank">Scriptaculuos</a>, but I wasn&#8217;t that impressed with it.  I&#8217;ll look deeper into it, but I was far more impressed with the JQuery and Ext JS.  However, The more tool kits I have under my belt the better off I will be anyway.</p>
<p>As I mentioned, it would be nice to combine the various frameworks and pick and choose what I want to use.  As it stands, it would probably be YUI for the Javascritpt/AJAX framework, Dijit for form elements and JQuery or Ext JS for components such as pop-up calendars, tab controls, modal panels, etc.</p>
<p>We&#8217;ll see where I end up.  If anyone else has any suggestions, or experiences with any of these tools or others, let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.rrosetta.com/2009/10/08/web-user-interfaces-yui-dijit-jquery-ext-js-scriptaculous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

