<?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>Colin Seaman Consultancy Ltd - Web Development using PHP and the Zend Framework &#187; Zend Framework</title>
	<atom:link href="http://www.colinseaman.com/tag/zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.colinseaman.com</link>
	<description>Robust, scalable, on-time development</description>
	<lastBuildDate>Mon, 28 Jun 2010 20:29:07 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The need for something different</title>
		<link>http://www.colinseaman.com/2010/03/13/the-need-for-something-different/</link>
		<comments>http://www.colinseaman.com/2010/03/13/the-need-for-something-different/#comments</comments>
		<pubDate>Sat, 13 Mar 2010 20:53:18 +0000</pubDate>
		<dc:creator>Colin Seaman</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[alta vista]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[mashup]]></category>
		<category><![CDATA[tesco]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://www.colinseaman.com/?p=67</guid>
		<description><![CDATA[
Back in 2000 I was working for a well funded Educational platform development company. It was at the start of this year when I first heard about Google after a fellow developer mentioned it in the office. At the time, my search engine of choice was AltaVista, pretty good at the time but it was [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.colinseaman.com/wp-content/uploads/google_logo5.jpg"><img class="alignright size-medium wp-image-70" style="border: 0px;" title="google_logo5" src="http://www.colinseaman.com/wp-content/uploads/google_logo5-300x124.jpg" alt="" width="300" height="124" /></a></p>
<p>Back in 2000 I was working for a well funded Educational platform development company. It was at the start of this year when I first heard about Google after a fellow developer mentioned it in the office. At the time, my search engine of choice was AltaVista, pretty good at the time but it was terribly frustrating when it returned results far from what you were after.</p>
<p>Seemingly over night Google became the search engine of choice, and has since diversified it&#8217;s suite of tools and products to seemingly take over our lives. It&#8217;s remarkable foresight on the part of the Google owners and team, but sometime we need something a little different.</p>
<p>Often I have conversations about how to implement or produce a certain project or application. In many instances, the very thing that the user is after has already been developed by Google in some form or another. Yet Google and it&#8217;s apps can&#8217;t be all things to all people, and developing something that stands out and is different than Google&#8217;s offerings will make your company or application stand out too.</p>
<p>I&#8217;m not suggesting to dump Google&#8217;s offerings, far from it, but to use Google as another tool in the box rather than the toolbox itself is often the better solution. Google has a great number of APIs associated with it&#8217;s products and leveraging them in your own application isn&#8217;t done as often as it should be. The Zend Framework  has many built in components that leverage the use of these services already.</p>
<p>Whilst at the current time the market is in a period of content and data aggregration (mashups), let&#8217;s start aggregating services a little more to offer multi use systems rather than just multi information systems. We can look at the retail industry to find out why this is already a proven concept.</p>
<p>Let&#8217;s take Tesco for example. Once just a supermarket, now it&#8217;s not just a place you go to to get your food, you get your petrol there, your credit card is with them, your home insurance is with them, you might even bank with them. It truely is a one-stop shop &#8211; however Tesco, like many other companies, are just buying in white label services and products. I believe there is always room for innovation in the technology market, but lets make use of the services available and mix them with our own ideas to create something new and fresh.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colinseaman.com/2010/03/13/the-need-for-something-different/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Zend_Form; easy ways to customise the output</title>
		<link>http://www.colinseaman.com/2010/01/22/zend_form-easy-ways-to-customise-the-output/</link>
		<comments>http://www.colinseaman.com/2010/01/22/zend_form-easy-ways-to-customise-the-output/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 11:58:15 +0000</pubDate>
		<dc:creator>Colin Seaman</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[decorators]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Zend Framework]]></category>
		<category><![CDATA[Zend_Form]]></category>

		<guid isPermaLink="false">http://www.colinseaman.com/?p=47</guid>
		<description><![CDATA[I&#8217;ve been following a thread on LinkedIn recently regarding people&#8217;s concerns about how to &#8220;easily&#8221; get the output from Zend Form to look how they want on the screen.  There are numerous articles on this, especially those involving how to customise the decorators which Zend Form uses or writing plugins which take care of the [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been following a thread on LinkedIn recently regarding people&#8217;s concerns about how to &#8220;easily&#8221; get the output from Zend Form to look how they want on the screen.  There are numerous articles on this, especially those involving how to customise the decorators which Zend Form uses or writing plugins which take care of the whole lot.</p>
<p>I guess some people&#8217;s concerns are that they either can&#8217;t follow these articles (some of them do make some huge presumptions!) or they don&#8217;t want to have to write a plugin (for example) just for one custom render of a form.</p>
<p>The easiest way to achieve a half way house is to use the power of Zend Form and all it&#8217;s validators and such, but to control the form element layouts in your phtml files.  I&#8217;ve placed some sample code below which I hope helps people in this situation:</p>
<p>IndexController.php</p>
<p>public function blahAction()</p>
<p>{</p>
<p>$form = new forms_myform();</p>
<p>if ($this-&gt;getRequest()-&gt;isPost())<br />
  {<br />
   $postdata = $this-&gt;_request-&gt;getPost();</p>
<p>if (!$form-&gt;isValid())</p>
<p>{</p>
<p>$form-&gt;populate($postdata); // form is invalid, send the data back to the form</p>
<p>} else { // the form has validated successfully, now do something with it</p>
<p>$filtered_data = $form-&gt;getValues();</p>
<p>// Do something with the output</p>
<p>}</p>
<p>}</p>
<p>$this-&gt;view-&gt;form = $form; // assign the form object for use in out view script</p>
<p>blah.phtml (view script)</p>
<p>&lt;p&gt;&lt;?php echo $this-&gt;form-&gt;username ?&gt;&lt;/p&gt;</p>
<p>&lt;p&gt;&lt;?php echo $this-&gt;form-&gt;email?&gt;&lt;/p&gt;</p>
<p>&lt;p&gt;&lt;?php echo $this-&gt;form-&gt;submit?&gt;&lt;/p&gt;</p>
<p>myform.php</p>
<p>&lt;?php</p>
<p>class forms_myform extends Zend_Form<br />
{<br />
    public function __construct()<br />
    {<br />
  $translate = Zend_Registry::get(&#8216;Zend_Translate&#8217;);<br />
             $this-&gt;setDisableLoadDefaultDecorators(false);</p>
<p>  // Create the non empty validator<br />
        $validatorUsername = new Zend_Validate_NotEmpty();<br />
        $validatorUsername-&gt;setMessage(&#8216;Username cannot be empty&#8217;);</p>
<p>      <br />
        $username = new Zend_Form_Element_Text(&#8216;username&#8217;);<br />
        $username-&gt;setLabel($translate-&gt;_(&#8216;Username&#8217;))<br />
           -&gt;setRequired(true)<br />
           -&gt;setDecorators(array(&#8216;ViewHelper&#8217;,<br />
                         &#8216;Description&#8217;,<br />
                         &#8216;Errors&#8217;,<br />
                         array(&#8216;HtmlTag&#8217;, array(&#8216;tag&#8217; =&gt; &#8217;span&#8217;)),<br />
                         array(&#8216;Label&#8217;, array(&#8216;class&#8217; =&gt; &#8221;),)))<br />
                 -&gt;addValidator($validatorUsername);</p>
<p>$email= new Zend_Form_Element_Text(&#8216;email&#8217;);<br />
        $email-&gt;setLabel($translate-&gt;_(&#8216;Email&#8217;))<br />
           -&gt;setRequired(true)<br />
           -&gt;setDecorators(array(&#8216;ViewHelper&#8217;,<br />
                         &#8216;Description&#8217;,<br />
                         &#8216;Errors&#8217;,<br />
                         array(&#8216;HtmlTag&#8217;, array(&#8216;tag&#8217; =&gt; &#8217;span&#8217;)),<br />
                         array(&#8216;Label&#8217;, array(&#8216;class&#8217; =&gt; &#8221;),)));</p>
<p>$submit = new Zend_Form_Element_Submit(&#8217;submit&#8217;);<br />
        $submit-&gt;setLabel($translate-&gt;_(&#8216;Submit&#8217;))<br />
          -&gt;setValue(&#8216;1&#8242;)<br />
          -&gt;setDecorators(array(&#8216;ViewHelper&#8217;,<br />
                         &#8216;Description&#8217;,<br />
                         &#8216;Errors&#8217;,<br />
                         array(&#8216;HtmlTag&#8217;, array(&#8216;tag&#8217; =&gt; &#8217;span&#8217;)),<br />
                         array(&#8216;Label&#8217;, array(&#8216;class&#8217; =&gt; &#8216;nolabel&#8217;),)))<br />
          -&gt;setAttrib(&#8216;class&#8217;,'loginbutton&#8217;);<br />
        $this-&gt;addElements(array($username, $email, $submit));</p>
<p>    }<br />
}</p>
<p>//  You&#8217;ll notice that we set the decorators in the form so that we don&#8217;t get all the junk DD, DT etc tags that by standard Zend Form produces.</p>
<p>-&gt;setDecorators(array(&#8216;ViewHelper&#8217;,<br />
                         &#8216;Description&#8217;,<br />
                         &#8216;Errors&#8217;,<br />
                         array(&#8216;HtmlTag&#8217;, array(&#8216;tag&#8217; =&gt; &#8217;span&#8217;)),<br />
                         array(&#8216;Label&#8217;, array(&#8216;class&#8217; =&gt; &#8221;),)))</p>
<p>By wrapping the HTML tag in a span, it means that we can control it easily via CSS.  By default it doesn&#8217;t display any differently if you have no specific span style defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colinseaman.com/2010/01/22/zend_form-easy-ways-to-customise-the-output/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Welcome</title>
		<link>http://www.colinseaman.com/2010/01/14/this-is-a-new-blog/</link>
		<comments>http://www.colinseaman.com/2010/01/14/this-is-a-new-blog/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:12:04 +0000</pubDate>
		<dc:creator>Colin Seaman</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Agencies]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[ROI]]></category>
		<category><![CDATA[XForms]]></category>
		<category><![CDATA[Zend Framework]]></category>

		<guid isPermaLink="false">http://wordpress.localhost.local/?p=14</guid>
		<description><![CDATA[Welcome to the new Colin Seaman Consultancy Ltd site.  In the coming weeks, I&#8217;ll be posting blogs about how to make the most of your business time and ideas, as well as many technical tips to help you out of a hole.
]]></description>
			<content:encoded><![CDATA[<p>Welcome to the new Colin Seaman Consultancy Ltd site.  In the coming weeks, I&#8217;ll be posting blogs about how to make the most of your business time and ideas, as well as many technical tips to help you out of a hole.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.colinseaman.com/2010/01/14/this-is-a-new-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
