<?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>rvdavid: A Web Developer&#039;s Blog</title> <atom:link href="http://www.rvdavid.net/feed/" rel="self" type="application/rss+xml" /><link>http://www.rvdavid.net</link> <description>A periodical blog of experiences from the angle of an autodidactic, paranoid and narcissistic web developer...</description> <lastBuildDate>Wed, 01 Sep 2010 12:47:15 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator><meta
xmlns="http://www.w3.org/1999/xhtml" name="robots" content="noindex,follow" /> <item><title>Fixing Gnome keyring / Login Keyring: &#8220;Enter Password to Unlock&#8221; issue</title><link>http://www.rvdavid.net/fixing-gnome-keyring-login-keyring-enter-password-to-unlock-issue/</link> <comments>http://www.rvdavid.net/fixing-gnome-keyring-login-keyring-enter-password-to-unlock-issue/#comments</comments> <pubDate>Wed, 01 Sep 2010 12:42:36 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Ubuntu]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=416</guid> <description><![CDATA[Hi everyone, this is just a quick how-to on handling the Ubuntu Maverick/Gnome Login Keyring issue which occurs when you change your user password. The issue: You&#8217;ve decided to change your password for whatever reason and suddenly you&#8217;re presented with the following message whenever you launch an application you have instructed to &#8220;remember&#8221; your password. [...]]]></description> <content:encoded><![CDATA[<div
class="adsense adsense-leadin" style="float:right;margin: 12px;"><script type="text/javascript">google_ad_client = "pub-3968550303568935";
/* 250x250, created 07/06/10 */
google_ad_slot = "3782770990";
google_ad_width = 250;
google_ad_height = 250;</script> <script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script></div><p>Hi everyone, this is just a quick how-to on handling the Ubuntu Maverick/Gnome Login Keyring issue which occurs when you change your user password.</p><p>The issue: You&#8217;ve decided to change your password for whatever reason and suddenly you&#8217;re presented with the following message whenever you launch an application you have instructed to &#8220;remember&#8221; your password.</p><p><strong>Enter password to unlock your login keyring</strong><br
/> The password you use to log in to your computer no longer matches that of your login keyring.</p><p><strong>This is how you fix it: </strong><br
/> <span
id="more-416"></span></p><p>Step 1: Go to <strong>System</strong> &gt;&gt; <strong>Preferences</strong> &gt;&gt; <strong>Passwords and Encryption Keys</strong>.<br
/> Step 2: If not already open, click on the &#8220;<strong>Passwords</strong>&#8221; tab.<br
/> Step 3: Right click on: &#8220;<strong>Passwords: Login</strong>&#8220;.<br
/> Step 4: From the context menu select: &#8220;<strong>Change Password</strong>&#8220;.<br
/> Step 5: Enter the Current password in the &#8220;<strong>Old Password</strong>&#8221; field.<br
/> Step 6: Enter the password you would like to change it to in the &#8220;<strong>Password</strong>&#8221; field.<br
/> Step 7: Enter the password you would like to change to again in the &#8220;<strong>Confirm</strong>&#8221; field.<br
/> Step 8: Click &#8220;<strong>OK</strong>&#8220;.</p><p>After this, relaunch the application which uses Gnome Keyring, you may have to re-enter your password, but after that, Gnome Keyring should remember your password for each subsequent launch.</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/fixing-gnome-keyring-login-keyring-enter-password-to-unlock-issue/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Setting TTY / Virtual Consoles resolution with Grub 2 in Ubuntu Lucid Lynx</title><link>http://www.rvdavid.net/setting-tty-virtual-consoles-resolution-with-grub-2-in-ubuntu-lucid-lynx/</link> <comments>http://www.rvdavid.net/setting-tty-virtual-consoles-resolution-with-grub-2-in-ubuntu-lucid-lynx/#comments</comments> <pubDate>Tue, 22 Jun 2010 23:45:58 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[grub2]]></category> <category><![CDATA[Linux]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=411</guid> <description><![CDATA[I&#8217;ve been using Ubuntu for a while now and something that bugged me a lot was the crappy screen resolution whenever I had to go and use my virtual terminals (TTY). In previous versions of ubuntu which used grub 1, setting up the resolution for tty was done by simply using the vga=??? boot option. [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been using Ubuntu for a while now and something that bugged me a lot was the crappy screen resolution whenever I had to go and use my virtual terminals (TTY).</p><p>In previous versions of ubuntu which used grub 1, setting up the resolution for tty was done by simply using the vga=??? boot option. In grub 2 however, this is not so easy.</p><p>I remember when it first came out. I was somewhat exasperated by the fact that I had _just_ become comfortable f*cking with grub&#8217;s menu.lst and now I had to learn how to use grub 2 &#8211; which had some new convention for editing menu items let alone setting up the resolution.</p><p>Anyway, there&#8217;s really nothing to it. I had to do a lot of digging around and some experimentation, but in the end, as with all things linux it was &#8220;easy&#8221; when I finally found out how.<span
id="more-411"></span></p><p><strong>Step 1:</strong> Open up your the grub header file stored in /etc/grub.d/00_header<br
/> <code><br
/> $ sudo vim /etc/grub.d/00_header<br
/> </code></p><p><strong>Step 2:</strong> Add a command inside the block of string with script that sets the gfxmode. Acceptable Set the gfxpayload parameter to the resolution you want to use for your virtual terminals / TTY.</p><p>SO for me, lines 101 &#8211; 113 of the 00_header file in /etc/grub.d looks like this<br
/> <code><br
/> 101     cat &lt;&lt; EOF<br
/> 102 if loadfont `make_system_path_relative_to_its_root ${GRUB_FONT_PATH}` ; then<br
/> 103   set gfxmode=${GRUB_GFXMODE}<br
/> 104   insmod gfxterm<br
/> 105   insmod ${GRUB_VIDEO_BACKEND}<br
/> 106   if terminal_output gfxterm ; then true ; else<br
/> 107     # For backward compatibility with versions of terminal.mod that don't<br
/> 108     # understand terminal_output<br
/> 109     terminal gfxterm<br
/> 110   fi<br
/> 111   #set gfx payload - use your own resolution here. I have a 19 inch monitor which natively supports 1440x900<br
/> 112   set gfxpayload=1440x900x32<br
/> 113 EOF<br
/> </code></p><p><strong>Step 3:</strong> After you save the file, go back to the terminal and run update-grub2 as root.</p><p><code><br
/> $ sudo update-grub2<br
/> </code></p><p>Your terminal should look like this:<br
/> <code><br
/> $ sudo update-grub2<br
/> Generating grub.cfg ...<br
/> Found linux image: /boot/vmlinuz-2.6.32-23-generic<br
/> Found initrd image: /boot/initrd.img-2.6.32-23-generic<br
/> Found memtest86+ image: /boot/memtest86+.bin<br
/> done<br
/> </code></p><p>And that&#8217;s it. On your next boot, you should see your console displayed in the resolution you used for setting gfxpayload.</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/setting-tty-virtual-consoles-resolution-with-grub-2-in-ubuntu-lucid-lynx/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Just when I needed it the most, my weapon of rapid web development goes nuts!</title><link>http://www.rvdavid.net/just-when-i-needed-it-the-most-my-weapon-of-rapid-web-development-goes-nuts/</link> <comments>http://www.rvdavid.net/just-when-i-needed-it-the-most-my-weapon-of-rapid-web-development-goes-nuts/#comments</comments> <pubDate>Thu, 17 Jun 2010 15:16:41 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[General]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=402</guid> <description><![CDATA[Today was an absolute sh*t fight. Starting from an entire morning where after I experienced several crashes with Visual Studio Express, that I thought I&#8217;d try the full version. To do this though, I had to expand my VMWare virtual disk. So a quick: vmware-vdiskmanager -x 45GB windevxp.vmdk &#8230; and my virtual disk is now [...]]]></description> <content:encoded><![CDATA[<p>Today was an absolute sh*t fight. Starting from an entire morning where after I experienced several crashes with Visual Studio Express, that I thought I&#8217;d try the full version.</p><p>To do this though, I had to expand my VMWare virtual disk. So a quick:<br
/> <code><br
/> vmware-vdiskmanager -x 45GB windevxp.vmdk<br
/> </code><br
/> &#8230; and my virtual disk is now 45GBs! &#8211; I then had to resize the windows partition. I&#8217;ll post more on this straight after this post.</p><p>So with that done, I&#8217;m set to install Visual Studio, I thought yeah it should take about 5 &#8211; 10 miuntes&#8230;</p><p><strong>BOY WAS I WRONG! </strong></p><p>The installation took like 2 &#8211; 3 hours at least, so there&#8217;s a large chunk of my day gone. (Great&#8230; F*CK!) At this point though, I didn&#8217;t care anymore, I was bitter about the amount of work I&#8217;ve lost and the disruption caused by stupid Visual Studio Express randomly crashing! I just wanted the whole thing to be installed and start coding again.</p><p><span
id="more-402"></span></p><p>After Visual Studio had finished installing, I start coding again, only to experience RAM shortages on the Virtual Machine I use as my windows development environment!</p><p>Luckily though, I had 4GB stick of RAM, which my colleague Neil had organised for me yesterday, comin&#8217; in today. I was just itchin to get my hands on that frickin extra RAM, when it finally came, I threw a party! I installed the RAM, started up my notebook. I start making mental comparisons on how much faster it is now, I&#8217;ve got 6 GB of RAM now mother f*ckers! (f*cking yes!).</p><p>All this excitement was drained out of me when I launch VM Ware and I receive a Kernel panic! Not even it just rebooted back to the start up screen.</p><p>When it rebooted, I find that my EXT4 partition has been mounted as read only. Some digging around dmesg reveals that some deleted inodes were being referenced. Pretty scary. I&#8217;ve never run into such problems. A quick google search guides me to some information stating that e2fsck will fix this situation - all I need to do is create a start up disk that i can boot into, then run an e2fsck -v /dev/sda2 (/dev/sda2 is where my corrupt files are).</p><p>So I burn a start up CD, run it and used e2fsck to fix my hard disk.</p><p>Long story short, important VM ware files are missing&#8230; I got no answers to this aside from reinstalling. <strong>Absolutely terrible! GRRR!</strong></p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/just-when-i-needed-it-the-most-my-weapon-of-rapid-web-development-goes-nuts/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Carving up designs &amp; Programming like it&#8217;s 1999</title><link>http://www.rvdavid.net/carving-up-designs-programming-like-its-1999/</link> <comments>http://www.rvdavid.net/carving-up-designs-programming-like-its-1999/#comments</comments> <pubDate>Tue, 15 Jun 2010 13:59:03 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[General]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=396</guid> <description><![CDATA[Well, my current projects at work are a far cry from last year&#8217;s mission critical projects where I was on the edge of my seat, tapping my feet to the sound of inaudible rhythm, staring at the screen with unblinking eyes, gritting my teeth as I developed applications in an almost mechanical manner. Now, I [...]]]></description> <content:encoded><![CDATA[<p>Well, my current projects at work are a far cry from last year&#8217;s mission critical projects where I was on the edge of my seat, tapping my feet to the sound of inaudible rhythm, staring at the screen with unblinking eyes, gritting my teeth as I developed applications in an almost mechanical manner.</p><p>Now, I find myself carving up new designs for ancient projects and looking at the code base, I&#8217;m honestly surprised that it has managed to not only run, but make bank for the company it belonged to all these years. Caching really does save your ass, so does having a dedicated server you can pump hardware into.</p><p>In the past few weeks, I&#8217;ve carved up designs, chased several phantom display bugs (which ended up being typos &#8211; you would&#8217;ve known if you had been keeping up with my tweets) and went back to coding ASP like it was 1999.</p><p>Yes you read right, ASP! I&#8217;m currently trapped in legacy code world&#8230; negotiating screen real estate and dealing with browser laws and rules that change ever so slightly for each different version of browser software!</p><p><span
id="more-396"></span></p><p>Surprisingly, I&#8217;m still an epic ASP classic coder. After shaking off some rust, I&#8217;ve implemented good old option explicit, eliminated all the &#8220;on error resume next&#8221; one liners scattered throughout the source code, controlled and centralised the numerous global ADODB Connection and Recordset objects which get shared by different parts of the code&#8230; in short I&#8217;ve started makin&#8217; the move to make the codebase a little more meaningful.</p><p>We opted to go with this option due to time constraints and other plans I&#8217;ve got down the track. Needless to say, I&#8217;m single handedly taking care of business and by the time I finish, this mission critical website is going to:</p><ul><li><strong>Perform better </strong>- I&#8217;ve sped up the site by lessening the newbie load cerated by having several Server.CreateObject(&#8220;ADODB.Connection&#8221;) calls, to use just the one.</li><li><strong>Be easier to navigate </strong>- At the present moment, the current version of the website I&#8217;m workin&#8217; on has 5 different navigation systems with links that point to the same pages but are named differently. I&#8217;ve changed this so that the links are meaningful. Related navigation items are grouped together.</li><li><strong>Consistent content layout<span
style="font-weight: normal;"> &#8211; Well, as consistent as possible anyway &#8211; there are different heading layouts and a lack of consistency in the current site. The new design has design consistency goodness all over it, but due to the html being deeply mixed up with ASP (we&#8217;re talking 3000 &#8211; 4000 line scripts here) and the time line I&#8217;m working with, I really can&#8217;t afford to nit pick html. I&#8217;m going for a happy middle here.<br
/> </span></strong></li><li><strong>Have a complete Member&#8217;s Control Panel</strong> &#8211; The website is going to have a Control Panel that works like a control panel rather than a password protected page with a bunch of links with useless info.</li></ul><p>All in all, I&#8217;m excited about the end product which comes closer as each productive day is complete! What happens from that point is currently being idly, but meticulously planned for. Very exciting times ahead, this should be great!</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/carving-up-designs-programming-like-its-1999/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Subversion Tip: Managing SVN Properties with text files</title><link>http://www.rvdavid.net/subversion-tip-managing-svn-properties-with-text-files/</link> <comments>http://www.rvdavid.net/subversion-tip-managing-svn-properties-with-text-files/#comments</comments> <pubDate>Fri, 21 May 2010 04:56:00 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Web Development]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=389</guid> <description><![CDATA[Here&#8217;s a quick SVN trick I use for managing my svn:ignore and svn:externals properties for my projects. One of the first things I do for newly checked out projects is to add a externals.txt and ignore.txt files. Then I just populate these with the property values I require for the project. I know, it&#8217;s a [...]]]></description> <content:encoded><![CDATA[<p>Here&#8217;s a quick SVN trick I use for managing my svn:ignore and svn:externals properties for my projects.</p><p>One of the first things I do for newly checked out projects is to add a externals.txt and ignore.txt files. Then I just populate these with the property values I require for the project.</p><p><strong>I know, it&#8217;s a no brainer when you think about it right?</strong></p><p>The thing is, I didn&#8217;t think of doing it until the past few projects and actually had to rely on ide integrated / gui tools to do it prior to this year. I came across a couple of examples and did it a couple of times in a rush without noting it down, but thought I&#8217;d make a post about it on my blog so that I have somehwere easy to find.</p><p><span
id="more-389"></span>Here&#8217;s a quick example:</p><p>example contents of externals.txt</p><p><code>library/Zend http://framework.zend.com/svn/framework/standard/tags/release-1.10.4/library/Zend<br
/> library/ZendX http://framework.zend.com/svn/framework/standard/tags/release-1.10.4/extras/library/ZendX/<br
/> library/Doctrine http://svn.doctrine-project.org/tags/1.2.2/lib/Doctrine<br
/> externals/dojo http://svn.dojotoolkit.org/src/branches/1.4<br
/> nbproject </code></p><p>example contents of ignore.txt<br
/> <code><br
/> public/webalizer<br
/> public/analog</code></p><p>Then I use the -F arguement to specify that I want to use the contents of a file to specify the value or values of the property.<br
/> <code>$ svn propset svn:ignore -F ignore.txt .</code> to set my svn:ignore property values.<br
/> or<br
/> <code>$ svn propset svn:externals -F externals.txt .</code> to set my svn:externals property values.</p><p><strong>It&#8217;s all about convenience baby!</strong></p><p>This makes svn properties management very convenient. It&#8217;s one of the things that make it easier for me to set things up. What&#8217;s more, when I need to add or remove to/from svn:externals or svn:ignore, I can do so easily &#8211; managing my svn properties this way, I also have a good reference as to what my property values are without having to run a number of svn propgets via command line.</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/subversion-tip-managing-svn-properties-with-text-files/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Project Chronus: a Zend Framework/Dojo/Doctrine Project Quietly Launched</title><link>http://www.rvdavid.net/project-chronus-a-zend-frameworkdojodoctrine-project-quietly-launched/</link> <comments>http://www.rvdavid.net/project-chronus-a-zend-frameworkdojodoctrine-project-quietly-launched/#comments</comments> <pubDate>Sun, 09 May 2010 13:01:03 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[General]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=375</guid> <description><![CDATA[It&#8217;s been a while since my last entry and this is due the dedication of my free time, when not working on client&#8217;s projects, to a certain in-house project. Last week, I&#8217;ve quietly launched project chronus. A project which provides multi site administration system geared for collaboration. Project Chronus makes it easy for our website [...]]]></description> <content:encoded><![CDATA[<p>It&#8217;s been a while since my last entry and this is due the dedication of my free time, when not working on client&#8217;s projects, to a certain in-house project.</p><p>Last week, I&#8217;ve quietly launched project chronus. A project which provides multi site administration system geared for collaboration. Project Chronus makes it easy for our website content admin people at DevProducts to keep track of numerous website projects placed under their control.</p><p>Project Chronus is the first project I&#8217;ve built with Zend Framework 1.8 and above (as in utilising bootstrapping with Zend_Application) that felt natural. I&#8217;ve built several projects with Zend framework 1.5+, but not as comfortably as I did with my recent project.</p><p>While Project Chronus is a project to be used for our own internal purposes, it served as a live project with enough real requirements to be effectively used as a sandbox for future projects we choose to undertake and in addition, set (and put to the test) standards for how we do things.</p><p><span
id="more-375"></span></p><p>What I used to build Project Chronus:</p><ul><li><a
title="Find out more about ZF" href="http://framework.zend.com/about/overview" target="_blank">Zend Framework 1.10</a>+<ul><li>I used the <a
title="I followed and used the recommended structure" href="http://framework.zend.com/manual/en/project-structure.project.html" target="_blank">Recommended Project Directory Structure</a>.</li><li><a
title="Zend Auth documentation" href="http://framework.zend.com/manual/1.10/en/zend.auth.html" target="_blank">Zend_Auth</a> and a Controller Plugin to check for/redirect authenticated/non-authenticated users.<ul><li>ZendX_Doctrine_Auth_Adapter &#8211; although we had to change Doctrine to Doctrine_Core on line 168 since we are using Doctrine 1.2.x which does not have the empty Doctrine class extending Doctrine_Core.</li></ul></li><li><a
title="Zend Dojo Form documentation" href="http://framework.zend.com/manual/1.10/en/zend.dojo.form.html" target="_blank">Zend_Dojo_Form</a></li><li><a
title="Zend Dojo View Helpers Documentation" href="http://framework.zend.com/manual/1.10/en/zend.dojo.view.html" target="_blank">Dojo View helpers </a><ul><li>TabContainer</li><li>ContentContainer</li><li>We also _slapped_ together an EnhancedDataGrid View helper class (using EnhancedGrid in Dojo 1.4) &#8211; which supports menus, delete, export and added a togglable search form.This class is in dire need of refactoring, but it does the job &#8211; and doing it well so far. I&#8217;m waiting to see if Matthew&#8217;s proposal gets active and becomes complete, to see how the ZF/Dojo pros do it and will then fashion our and perhaps release some code I would not be ashamed of.</li></ul></li><li><a
title="Zend Navigation documentation" href="http://framework.zend.com/manual/1.10/en/zend.navigation.html" target="_blank">Zend_Navigation</a></li><li><a
title="Zend View Helper documentation" href="http://framework.zend.com/manual/1.10/en/zend.view.helpers.html" target="_blank">Zend_View_Helper_Placeholder</a></li><li><a
title="Zend_Test_PHPUnit documentation" href="http://framework.zend.com/manual/1.10/en/zend.test.phpunit.html" target="_blank">Zend_Test_PHPUnit_ControllerTestCase</a> &#8211; Yes, we were unit testing everything including Controllers and Views! Although sadly, we found ourselves reverting to &#8220;just code it now&#8221; conventions as we raced tot the finish line.So we stopped testing Controllers and Views midway &#8211; we did however, unit test most of our model_service code and it&#8217;s in the cards to write tests for the untested units to achieve 100% code coverage for controllers and models.</li></ul></li><li><a
title="Dojo Toolkit" href="http://dojotoolkit.org/" target="_blank">Dojo 1.4x </a><ul><li>Several form Dijits.</li><li>The EnhancedGrid component.<ul><li>Menus Plugin</li></ul></li><li>Dojo.xhrGet/Post</li><li>TabContainer</li><li>ContentPane</li></ul></li><li><a
title="The Doctrine Project website" href="http://www.doctrine-project.org/" target="_blank">Doctrine 1.2.x ORM</a><ul><li>Doctrine Query Language &#8211; We use DQL extensively within our Service classes to fetch and use models.</li><li>SFYAML &#8211; Doctrine uses this to process fixtures and schema yml files which we use to setup and update the database schema.</li></ul></li><li><a
title="PHPUnit Website" href="http://www.phpunit.de/" target="_blank">PHPUnit 3..4.11</a></li></ul><p>Approaches we used to build the Project:</p><ul><li>Service Layer &#8211; as per my previous entry: &#8220;<a
title="Past blog entry - great input from bill karwin, ryan horn and other people contributed greatly to the discussion." href="http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/" target="_blank">My Zend Framework Model Layer: Part Service, Part ORM</a>&#8221; with a few tweaks included. I didn&#8217;t get a chance to include ACL into the Service Classes however.  I went with the Controller Plugin option, because we did not have a requirement for multi-role user system.<p>I was a little confused at certain times. For instance, I have a Service Layer for authentication and password which started off as authentication, change password and reset password. Still throwing it around, but aside from this, when I have to deal with actual entities, the Service Layer class is pretty much semantic.</li><li>Authentication Module &#8211; Another thing that was slightly strange was that I decided to create a separate authentication module where I put in my login, logout, reset password confirmation (sends email) and reset password (after confirmation) features. With this being in a module, I can just drop this module in whenever these generic features are required.</li></ul><p>I will be using this as a base for any web applications we will be building using the Zend Framework. The generic features in Authentication and other unmentioned features such as an administrator dashboard module which has features for managing System Users serve as a great starting point for any web application.</p><p>I guess it goes without saying, I&#8217;m lovin&#8217; web dev at the moment and I&#8217;ve finally got some free time, so it&#8217;s back to blogging.</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/project-chronus-a-zend-frameworkdojodoctrine-project-quietly-launched/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>5 things I do to get myself back on focus</title><link>http://www.rvdavid.net/5-things-i-do-to-get-myself-back-on-focus/</link> <comments>http://www.rvdavid.net/5-things-i-do-to-get-myself-back-on-focus/#comments</comments> <pubDate>Thu, 04 Feb 2010 06:04:14 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[lists]]></category> <category><![CDATA[Web Development]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=369</guid> <description><![CDATA[Well it&#8217;s the last week of my half week holidays and I had a blast. I found myself going from missing work to not thinking about work at all. I know though, that once I got back here at the helm at DP HQ, I&#8217;ll be needing some time to get back into the swing [...]]]></description> <content:encoded><![CDATA[<p>Well it&#8217;s the last week of my half week holidays and I had a blast. I found myself going from missing work to not thinking about work at all. I know though, that once I got back here at the helm at DP HQ, I&#8217;ll be needing some time to get back into the swing of things.</p><p>Of course, this is not the first time I&#8217;ve taken time off, so I thought I&#8217;d warm up my blogging again and talk about what I do to get my mind into gear. So here are 5 things that I like to do to get myself back into focus:</p><p><span
id="more-369"></span></p><ol><li><strong>Classical Music<br
/> <span
style="font-weight: normal;">This is more a point about setting a quiet mode for the day. When I have my headphones on with a Play list that has Chopin, Liszt and Beethoven, I know that my thoughts are going to be well insulated against the hustle and bustle of phones, idle chatter and other random office noises. Not only that, but over the years, I&#8217;ve come to associate classical music with focus &#8211; which is my ultimate goal. I want to have a focussed day and this sets it up for me nicely.<br
/> </span></strong></li><li><strong>Pen and Paper up a list of things to be done today<br
/> <span
style="font-weight: normal;">Yes, that&#8217;s right I still use pen and paper when creating a </span></strong>&#8220;to-do list&#8221;.I use evolutions task manager for this in my day to day, but during times when I need to kick start me off, there&#8217;s nothing like a good pen and paper to-do list to keep me focussed on what I need to do. I guess it&#8217;s because I am more deliberate when I&#8217;m writing up a list rather than typing it up.</p><p>It goes without saying, but after each task is completed, I cross it off and continue on to the next one. This keeps me focussed and helps me build momentum.</li><li><strong>Get the backlog of easy stuff out of the way first &#8211; regardless of how tedious it is.<br
/> <span
style="font-weight: normal;">Once I&#8217;ve got Now this goes without saying, today, this is exactly what I did and even though I&#8217;d much rather be in the trenches coding away, I know that I&#8217;ll be distracted if I didn&#8217;t do this first. So that&#8217;s what I did. I answered emails, wrote up quotations and even wrote a letter of reference for someone who used to work for us.</p><p>This is linked directly with my to do list and how it works on building my momentum. As each little task is complete, I plough through the next few until there is no more left.<br
/> </span></strong></li><li><strong>Do not let myself be swayed by positive stress<br
/> <span
style="font-weight: normal;">So as I have now completed the easy tasks out of the way, I usually feel the need to lean back and &#8216;lax out. I feel like I&#8217;ve run a marathon&#8230; and won! This feeling is known as positive stress. You&#8217;ve poured all your energy and focus into a task and successfully completed your mission now it&#8217;s time to report to for debriefing. NOPE! Roll forward to the next task &#8211; Unit Testing.<br
/> </span></strong></li><li><strong>Unit Testing<br
/> <span
style="font-weight: normal;">Now I&#8217;ve mentioned this before on a previous post &#8211; I&#8217;m a fan of Unit Testing. Unit Testing really does aid in focussing your mind to achieve tasks at hand. With Unit Testing, I map out what I need to do by way of tests. What functionality a certain model object will have. My models methods start off mapping to business requirements, my tests map to each public method in my models. It&#8217;s a beautiful cycle of productivity. I love this stuff!</span></strong></li></ol><p>I apply the same to my blogging as well. I&#8217;m not game to launch into my theory of how models should be explicitly returning messages just yet, so I&#8217;ll be holding off on that post till tomorrow or the day after. I&#8217;m currently listening to Classical music and getting this easy post out first to gain some momentum writing my blog posts.</p><p>I recommend you try it out yourself. It&#8217;s really something that separates the counter-productive, procrastinating me to the productive, action man that I know I am.</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/5-things-i-do-to-get-myself-back-on-focus/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Is it important that Views pull data from Models on their own?</title><link>http://www.rvdavid.net/is-it-important-that-views-pull-data-from-models-on-their-own/</link> <comments>http://www.rvdavid.net/is-it-important-that-views-pull-data-from-models-on-their-own/#comments</comments> <pubDate>Thu, 21 Jan 2010 23:25:41 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Zend Framework]]></category> <category><![CDATA[mvc]]></category> <category><![CDATA[php]]></category> <category><![CDATA[Web Development]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=363</guid> <description><![CDATA[In my recent post regarding the Model Service layer, there was one query about me mentioning that the View is configured by the Controller which goes against the grain of traditional MVC idea of &#8220;Views Should handle their own Models / data&#8221;. There is nothing wrong with Views being able to handle their own models, [...]]]></description> <content:encoded><![CDATA[<p>In my recent post regarding the Model Service layer, there was one query about me mentioning that the View is configured by the Controller which goes against the grain of traditional MVC idea of &#8220;Views Should handle their own Models / data&#8221;.</p><p>There is nothing wrong with Views being able to handle their own models, I&#8217;m not suggesting that this shouldn&#8217;t be the case. You can also do it this way. That is the &#8220;traditional MVC&#8221; way of doing things and it works fine which is why I&#8217;m questioning why I&#8217;ve moved away from it. I&#8217;m just typing as I go so hopefully by the end of it, we&#8217;ll have something that makes a point.</p><h3>I used to Really love this sh*t!</h3><p>I used to trumpet the sh*t out of this because I had it figured out and it made me feel smart <img
src='http://www.rvdavid.net/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . I thought hey, I can adhere to the traditional MVC way of things and make the View select it&#8217;s own Model (or models) and gather information on it&#8217;s own &#8211; all I need is a View Helper. Further along came the question &#8220;What about the times when the Model needs to be used by the Controller?&#8221; well I got a plan for this too, then there&#8217;s the &#8220;What about when the Controller and View need access to the same model?&#8221; case. I needed to create a strategy to make sure that the Model isn&#8217;t instantiated twice in these cases.</p><p><span
id="more-363"></span></p><h3>This is how I did it: Components you need to code up to make it so that the View can choose it&#8217;s own Models</h3><p><strong>Step 1:</strong> I created a Model Service Factory which I stored in Zend_Registry &#8211; the Model Service Factory has a Registry of it&#8217;s own and checks to see if an instance of the Model being requested already exists &#8211; if it does, it returns that instead of creating a new instance.<br
/> <strong> Step 2:</strong> I created a View Helper called &#8220;GetModel&#8221; which accesses the Zend_Registry to access the Model Service Factory and returns the model<br
/> <strong> Step 3:</strong> I then created an Action Helper called &#8220;GetModel&#8221; which worked exactly like the View Helper.</p><p>But then, I found myself questioning if the view selecting it&#8217;s own models / data applies to PHP<span
style="color: #ff0000;">, or if all this complexity is worth anything useful aside from saying &#8220;I can do it&#8221;</span>. Here are some of the things I&#8217;m thinking about:</p><ul><li>One of the cases that I&#8217;ve found cumbersome is when I need to access  request parameters in the View whether it be for creating a URL. This should be regarded as a data source as well. Does this mean that we have to code up View Helper to access this also? (This isn&#8217;t a smart ass rhetorical question either &#8211; I really want to know what do you do?)To handle cases where I need to display parameters in the view, I assign the view parameters in the controller something along the lines of:</li></ul><blockquote><p>$this-&gt;view-&gt;username = $this-&gt;_getParam(&#8216;username&#8217;);</p></blockquote><ul><li>Say you need to display session data in the view, how would you go about doing that? Personally, as with the request parameters, I assign the session data to the view in the controller:</li></ul><blockquote><p>$this-&gt;view-&gt;somesessiondata = $session-&gt;somedata;</p></blockquote><ul><li>Now say we need to get some data from the model&#8230; no problem!  I can use the getModel view helper that makes me feel so smart. To do this though, we need to set up the view so that it has the ID parameter.</li></ul><blockquote><p>$data = $this-&gt;getModel(&#8216;SomeModel&#8217;)-&gt;findById($this-&gt;id);<br
/> // or if we us a view helper for parameters (I said IF &#8211; not entirely sure about this yet)<br
/> $data = $this-&gt;getModel(&#8216;SomeModel&#8217;)-&gt;findById($this-&gt;getParam(&#8216;id&#8217;));</p></blockquote><p>Now compare this with providing the data that the view needs via the Controller.</p><blockquote><p>// in the controller<br
/> $this-&gt;view-&gt;data = $this-&gt;_service-&gt;findById($this-&gt;_getParam(&#8216;id&#8217;));<br
/> $this-&gt;view-&gt;username = $this-&gt;_getParam(&#8216;username&#8217;);<br
/> $session = new Zend_Session_NameSpace<br
/> $this-&gt;view-&gt;sessionData = $session-&gt;sessionData;</p><p>// in the view<br
/> &lt;h2&gt;User Details&lt;/h2&gt;<br
/> &lt;?php foreach ($data as $key=&gt;$val) : ?&gt;<br
/> &lt;?=$key?&gt;: &lt;?=$val;?&gt;<br
/> &lt;?php endforeach; ?&gt;</p><p>&lt;p&gt;You have requested the username: &lt;?=$this-&gt;username; ?&gt; which is not available. &lt;/p&gt;</p></blockquote><p>Also at one point I was thinking why we are fighting so hard to decouple the view from the controller anyway? They are coupled from the file system and have default conventions like indexAction is coupled with index.phtml view script in an index script directory (which matches controller name).</p><p>Having said that though, I don&#8217;t see a strong case <strong>for</strong> or <strong>against</strong> pushing or pulling models to or from the View. Maybe I&#8217;m just missing the point somewhere. In any case, I&#8217;d be grateful to know (and learn from) what your take is on this subject matter.</p><p>So to sum it up, these are the questions that are floating through my head at the moment.</p><ul><li>What are the _specific_ advantages of having the View pull data from the model directly?</li><li>What are the _specific_ disadvantages of having the Controller push data from the model into view member variables?</li><li>Is the example I specified above (creating view helpers, registry, action helpers) overkill just to achieve something that may or may not be a design problem?</li></ul> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/is-it-important-that-views-pull-data-from-models-on-their-own/feed/</wfw:commentRss> <slash:comments>19</slash:comments> </item> <item><title>My Zend Framework Model Layer: Part Service, Part ORM</title><link>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/</link> <comments>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/#comments</comments> <pubDate>Tue, 19 Jan 2010 17:38:29 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Zend Framework]]></category> <category><![CDATA[mvc]]></category> <category><![CDATA[php]]></category> <category><![CDATA[service layer]]></category> <category><![CDATA[Web Development]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=307</guid> <description><![CDATA[The Model Layer of the MVC triad: I&#8217;ve been thinking this over for the past few months since using the Doctrine ORM and I think I&#8217;ve finally made some progress to get this issue licked. In the past, I&#8217;ve agonised over this issue and blogged about my progress. Some weeks or days later I tried to probe the [...]]]></description> <content:encoded><![CDATA[<p>The Model Layer of the MVC triad: I&#8217;ve been thinking this over for the past few months since using the Doctrine ORM and I think I&#8217;ve finally made some progress to get this issue licked. In the past, I&#8217;ve agonised over this issue and <a
title="Research into Possible Domain Model Solutions " href="http://www.rvdavid.net/zend-framework-model/" target="_blank">blogged about my progress</a>. Some weeks or days later I tried to probe the <a
title="How would you handle this? – Service Layer slowly getting polluted (or so it seems)! - Damn was I confused!" href="http://www.rvdavid.net/how-would-you-handle-this-service-layer-slowly-getting-polluted-or-so-it-seems/" target="_blank">community on what they would do</a>, Now I think I&#8217;d have an idea on what I would do.</p><p>After some more thought and lots of research on the subject, I&#8217;ve come to a solid point where I actually have something to try out which seems semantic aside from the naming of the class (Service Class) &#8211; but this is derived from what some people are talking about in ZF circles starting from Matthew Weier O&#8217;Phinney who was coining it as the &#8220;<a
title="check out the part with the sub heading: gateway to the domain" href="http://weierophinney.net/matthew/archives/202-Model-Infrastructure.html" target="_blank">Gateway to the Domain</a>&#8221; from early on, then later changing it to &#8220;Service Class&#8221;.</p><p><span
id="more-307"></span></p><h3>The Service Class</h3><p>So this is what I chose to go with:  For each model class, I&#8217;ve got a Database Agnostic Service class - in fact, it uses the Entities Produced by Doctrine ORM to talk to the database, but isn&#8217;t entirely reliant upon Doctrine to Provide the Model Layer on it&#8217;s own. Using Doctrine as your Model Layer alone I suppose is better than extending Zend_Db which is highly <a
title="Me getting schooled on Why Extending from Zend_Db is bad at Nabble" href="http://n4.nabble.com/Another-Model-Design-Thread-td670076.html" target="_blank">discouraged by everyone</a>, but you still have the database dependency.</p><p>I thought well, I&#8217;ve done a lot of feeling around the subject, maybe I&#8217;ll just ask around. So over to twitter I go. I sent <a
title="Dude, I always gotta go to your site to get your name! I can never spell it correctly!" href="http://weierophinney.net/matthew/" target="_blank">Matthew Weier O&#8217;Phinney</a> a tweet asking if it is right that Doctrine models are relatively empty whilst Model services are filled with business logic and <a
href="http://twitter.com/weierophinney/status/7464401031" target="_blank">he answered</a>: &#8220;Absolutely. Plain old PHP is perfect for entities.&#8221; but I had no idea WTF that meant.</p><p>The Service Layer uses the Model which is the Entity. <a
href="http://twitter.com/rvdavid/status/7465840295">My further attempt</a> to clarify the situation and continue discussion didn&#8217;t get a response &#8211; maybe because I had to condense words and use accronymns to fit the message in or he had just become too busy. So on my own I go again.</p><p>After mulling over it a few, I thought I&#8217;d just run with what I&#8217;ve got. It seems to be semantic, but it has a lot of responsibilities:</p><ul><li>The Model Service Class is a Resource.</li><li>The Model Service uses the ACL layer to check if a Role Identified has the Privileges to make it&#8217;s request prior to usage.</li><li>The Model Service creates Entities by using its Model Factory/Finder methods such as FindById it then returns either an array or an Entity based on what Hydration mode was specified (default is array).</li><li>The Model Service creates Forms and uses it for Validation</li><li>The Model Service provides the CRUD methods so that the Controller does not have to worry about instantiating and configuring models to Create Update or Delete data.</li><li>The Model Service uses Zend_Cache and can use caching on non-changing data such as lookup lists status or types and large collections of data used in drop downs, lists or datagrids.</li><li>Although there is no factory for it, the Model Service can create and use other Model Service classes.</li><li><del
datetime="2010-05-05T03:45:29+00:00">The Service Layer is not passed to the View either. The View is configured by the Controller and has data shoved into properties/member variables.</del></li><li>The Service Object can be passed to the View if required, so that the View can use the Sevice object to interrogate models on it&#8217;s own. We trust that those writing the View Markup will only be using the service object _strictly for reading only_.</li></ul><p>I&#8217;ve been working with this setup for a few weeks now. This method is very testable and makes for an extremely thin Controller Layer.</p><p>What do you guys think?</p><p>Have we over engineered this thing? Should it be called the Service Layer as more and more people are coining it as? What suggestions can you make to make this better?</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/my-zend-framework-model-layer-part-service-part-orm/feed/</wfw:commentRss> <slash:comments>37</slash:comments> </item> <item><title>Added New Feature: Top Commentators</title><link>http://www.rvdavid.net/added-new-feature-top-commentators/</link> <comments>http://www.rvdavid.net/added-new-feature-top-commentators/#comments</comments> <pubDate>Mon, 18 Jan 2010 11:44:41 +0000</pubDate> <dc:creator>rvdavid</dc:creator> <category><![CDATA[Announcements]]></category><guid
isPermaLink="false">http://www.rvdavid.net/?p=304</guid> <description><![CDATA[I&#8217;m on Holiday at the moment and loving every minute of it! During the Weekend, I&#8217;ve decided to add a little something to my blog and installed a new feature which somewhat gives back to those who comment on my blog. I&#8217;ve added the Top Commentators feature which lists the top 10 people who have [...]]]></description> <content:encoded><![CDATA[<p><strong>I&#8217;m on Holiday at the moment and loving every minute of it!</strong> During the Weekend, I&#8217;ve decided to add a little something to my blog and installed a new feature which somewhat gives back to those who comment on my blog. I&#8217;ve added the Top Commentators feature which lists the top 10 people who have commented on posts within my blog throughout it&#8217;s existance. At the moment, I&#8217;ve got laserlight with 11 comments.</p><p><span
id="more-304"></span></p><p>I came accross laserlight back in the day when I was still trying to find a forum to hang out after work or over the weekend.  I ended up at PHP Builder and had posted a few comments and tried to be part of their community. I think what turned me off PHP Builder was that the members that they had were slightly cliquey and were not as friendly as the ones at SitePoint. At the time, they also had some very big trolls. But that I Imagine would have been in the past.</p><p>It would have been great to keep in touch with her, she had some brains about her. Hopefully she&#8217;s doing well.</p><p>So the way Top Commentators works is that it keeps count of those who comment on my blog posts by using email addresses, does a calculation and then displays the top ten people who have been commenting on the home page and each of the pages on my blog, with a back link to their website.</p><p>Hopefully, this will encourage my followers on twitter and the rvdavid my blog log community members to get involved and participate in leaving comments on some of the blog posts that I write.</p><p>This is my way of providing a window of appreciation for everyone who contributes to my blog posts. So thank you in advance, and thank you to the regular visitors who keep an eye out for my blog. You guys are great!</p> ]]></content:encoded> <wfw:commentRss>http://www.rvdavid.net/added-new-feature-top-commentators/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using disk (enhanced) (user agent is rejected)
Database Caching 6/10 queries in 0.012 seconds using disk

Served from: www.rvdavid.net @ 2010-09-03 06:15:33 -->