<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Wahab's Blog</title>
	<atom:link href="http://hellowahab.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://hellowahab.wordpress.com</link>
	<description>A blog for programming lovers</description>
	<lastBuildDate>Mon, 26 Dec 2011 07:03:42 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='hellowahab.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://1.gravatar.com/blavatar/37225db261cd8ad65d8b76dfa808afea?s=96&#038;d=http%3A%2F%2Fs2.wp.com%2Fi%2Fbuttonw-com.png</url>
		<title>Wahab's Blog</title>
		<link>http://hellowahab.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://hellowahab.wordpress.com/osd.xml" title="Wahab&#039;s Blog" />
	<atom:link rel='hub' href='http://hellowahab.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Step by step guide for Zend</title>
		<link>http://hellowahab.wordpress.com/2011/12/22/214/</link>
		<comments>http://hellowahab.wordpress.com/2011/12/22/214/#comments</comments>
		<pubDate>Thu, 22 Dec 2011 07:14:28 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
				<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=214</guid>
		<description><![CDATA[Sorry for inconvenience; article is in raw state not yet finalized.       Introduction (Work in progress no to be published) Using any framework is easy but applying that to real world application can be hard and time consuming task. People do get bits and pieces of the framework from google and other search [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=214&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Sorry for inconvenience; article is in raw state not yet finalized. </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p>   <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Introduction (Work in progress no to be published) </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">Using any framework is easy but applying that to real world application can be hard and time consuming task. People do get bits and pieces of the framework from google and other search engines but will not be able to find a concrete example that can help them lay out the ground they need for their start-up in practical application of that framework.<br />
</span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Background </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">When I started working in Zend framework I find the documentation is more inclined towards getting familiarity with different classes and other aspect of the framework but not a single concrete development example was presented that can bridge the gap between hello world example and real practical example. So I started to work on this article that will not only help you get familiar with Zend framework but will also help you create a web application from scratch to end.<br />
</span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Some good reference     </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">There are some worth mentioning reference that people can look into, to enhance their knowledge and understanding<br />
</span></p>
<ul>
<li><a href="http://www.codeproject.com/KB/PHP/Zend_Framework/ZFC_Study_Guide_v1.pdf">Download ZFC_Study_Guide_v1.pdf &#8211; 2.56 MB </a> 
</li>
<li><a href="http://www.codeproject.com/KB/PHP/Zend_Framework/ZendFramework1.6.pdf">Download ZendFramework1.6.pdf &#8211; 4.4 MB </a>
		</li>
<li><a href="http://akrabat.com/zend-framework-tutorial-18/">http://akrabat.com/zend-framework-tutorial-18/</a>
		</li>
<li><a href="http://www.amazon.com/Zend-Framework-Action-Rob-Allen/dp/1933988320">http://www.amazon.com/Zend-Framework-Action-Rob-Allen/dp/1933988320</a> (Highly recommended)
</li>
</ul>
<p><a href="http://www.zend.com/en/webinar/Framework/webinar-ZF-Layout-20080319.flv"><span style="font-family:Times New Roman;font-size:12pt;">http://www.zend.com/en/webinar/Framework/webinar-ZF-Layout-20080319.flv</span></a><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Some Nice working examples:- </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<ul>
<li><a href="http://centurion-project.org/zend-cms-demo">http://centurion-project.org/zend-cms-demo</a>        
</li>
</ul>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>Pr-requisites </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">  Off-course you should have some familiarity with PHP. I am going to use ZendFramework-1.11.10 so I have uploaded the source as well to avoid any conflicts with future releases. You can also download the latest version here at <a href="http://www.zend.com/en/downloads/" title="http://www.zend.com/en/downloads/" target="_blank">http://www.zend.com/en/downloads/</a>. You can also download Zend server and Studio for ease of use. Setting up Zend framework is easy so i am letting it up to you. In case I receive any queries related to setup I will surely add some clarification. I also consider that you are familiar with MVC model as well.<br />
</span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:18pt;"><strong>So what you have set up till now  </strong></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;">You have Zend studio + Zend server and able to create a new project using Zend studio.  Now I will discuss the directory structure.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;"> <img src="http://hellowahab.files.wordpress.com/2011/12/122211_0710_1.png?w=604" alt="" /></span><span style="font-family:Courier New;font-size:10pt;"><br />
		</span><span style="font-family:Times New Roman;font-size:12pt;"><br />
		</span></p>
<ol>
<li>
<div><strong>application.ini </strong>purpose of this file is to contain all information related to configurations<strong><br />
				</strong>
			</div>
<ol>
<li>(Explained line by line
</li>
</ol>
</li>
</ol>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">[production] //// <em>All setting will related to production</em><br />
			</span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_startup_errors = 0 //// <em>Startup error :setting it to 1 will display errors</em><br />
			</span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_errors = 0 //// <em>display error :setting it to 1 will display errors</em><br />
			</span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">includePaths.library = APPLICATION_PATH &#8220;/../library&#8221; // Path for library </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">bootstrap.path = APPLICATION_PATH &#8220;/Bootstrap.php&#8221; // path for bootstrap file </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">bootstrap.class = &#8220;Bootstrap&#8221; // Class name for boot strap </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">appnamespace = &#8220;Application&#8221; // name space for application </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">resources.frontController.controllerDirectory = APPLICATION_PATH &#8220;/controllers&#8221; // directory for controllers </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">resources.frontController.params.displayExceptions = 0 // <span style="text-decoration:underline;"><em>front controller is among one of the core things that a person need to understand </em></span></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">[staging : production] // <em>having a colon &#8220;:&#8221; mean all the above configurations are inherited so you don&#8217;t need to explicitly set it here too. </em></span><span style="font-size:12pt;"><br />
			</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">[testing : production] </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_startup_errors = 1 </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_errors = 1 </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">[development : production] </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_startup_errors = 1 </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">phpSettings.display_errors = 1 </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="font-size:10pt;">resources.frontController.params.displayExceptions = 1 </span><span style="font-size:12pt;"><br />
			</span></span></p>
<p> <br />
 </p>
<ol>
<li>
<div><strong>Controllers <a href="http://framework.zend.com/manual/en/zend.controller.html">http://framework.zend.com/manual/en/zend.controller.html</a><br />
				</strong>
			</div>
<p><span style="font-family:Times New Roman;font-size:12pt;">Controller act as a bridge between Model and view. Zend claim that a &#8220;Zend_Controller_Front &#8221; act as a main controller that calls other controller on different request.<br />
</span></p>
<p><span style="font-family:Times New Roman;font-size:12pt;"><span style="text-decoration:underline;"><em>Note:- I am still unable to find this zend controller front so it vague for me as of now. </em></span><br />
				</span></p>
<ol>
<li>
<div><strong>Model:- </strong>
					</div>
<p><span style="font-family:Times New Roman;font-size:12pt;">Will help you create some model classed to perform CRUD (Create Read update delete) options. We will look into details as we proceed.<br />
</span></p>
</li>
<li>
<div><strong>View </strong>
					</div>
<p><span style="font-family:Times New Roman;font-size:12pt;">Section contains different view that can be rendered on demand. <span style="text-decoration:underline;">I always wonder how different views can be merged together to create a full fledge web page. </span><br />
						</span></p>
</li>
<li>
<div>BootStrap.php
</div>
<p><span style="font-family:Times New Roman;font-size:12pt;">Will help you put any boot time setting here.<br />
</span></p>
</li>
<li>
<div>Index.php
</div>
<p><span style="font-family:Times New Roman;font-size:12pt;">Index.php is the main file that will server all the request. Application environment is setup here and different paths are setup. Then a new &#8220;</span><span style="color:black;"><span style="font-family:Courier New;font-size:10pt;"><span style="background-color:lightgrey;">Zend_Application</span>&#8221; </span><span style="font-family:Times New Roman;font-size:12pt;">object is created </span></span><span style="font-family:Times New Roman;font-size:12pt;"><br />
						</span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">&lt;?php </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">// Define path to application directory </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">defined(&#8216;APPLICATION_PATH&#8217;) </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">|| define(&#8216;APPLICATION_PATH&#8217;, realpath(dirname(__FILE__) . &#8216;/../application&#8217;)); </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">// Define application environment </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">defined(&#8216;APPLICATION_ENV&#8217;) </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">|| define(&#8216;APPLICATION_ENV&#8217;, (getenv(&#8216;APPLICATION_ENV&#8217;) ? getenv(&#8216;APPLICATION_ENV&#8217;) : <span style="text-decoration:underline;">&#8216;production&#8217;</span>)); <span style="text-decoration:underline;"><strong>// Production here will tell to use production section in application.ini </strong></span></span><span style="font-size:12pt;"><br />
							</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">// Ensure library/ is on include_path </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">set_include_path(implode(PATH_SEPARATOR, array( </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">realpath(APPLICATION_PATH . &#8216;/../library&#8217;), </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">get_include_path(), </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">))); </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">/** Zend_Application */ </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">require_once &#8216;Zend/Application.php&#8217;; </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p> <br />
 </p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">// Create application, bootstrap, and run </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">$application = new Zend_Application( </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">APPLICATION_ENV, </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">APPLICATION_PATH . &#8216;/configs/application.ini&#8217; </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">); </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="font-family:Times New Roman;"><span style="color:black;font-size:10pt;">$application-&gt;bootstrap()-&gt;run(); </span><span style="font-size:12pt;"><br />
							</span></span></p>
<p><span style="color:black;font-family:Times New Roman;font-size:12pt;">Ok if you run the following url <a href="http://localhost/ZendStepByStep/public/index.php">http://localhost/ZendStepByStep/public/index.php you will be able to use the application.<br />
</a></span></p>
<p> <br />
 </p>
</li>
</ol>
<p><span style="color:blue;font-family:Times New Roman;text-decoration:underline;"><span style="font-size:18pt;"><strong>Real work start now:-l </strong></span><span style="font-size:12pt;"><br />
					</span></span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">    It seem really cool that now the app is running an you are able to access the URL but now you have accommodate it as per you needs and this is where you have to mold the things as per you need.<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">Let have a database configuration now:-<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">db.adapter = PDO_MYSQL (Php data objects)<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">db.config.host = localhost<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">db.config.username = root<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">db.config.password =<br />
</span></p>
<p><span style="color:blue;font-family:Times New Roman;font-size:12pt;text-decoration:underline;">db.config.dbname = zsbs<br />
</span></p>
<p> <br />
 </p>
<p> <br />
 </p>
</li>
</ol>
<p> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/214/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/214/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/214/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=214&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/12/22/214/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://www.zend.com/en/webinar/Framework/webinar-ZF-Layout-20080319.flv" length="0" type="video/x-flv" />
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>

		<media:content url="http://hellowahab.files.wordpress.com/2011/12/122211_0710_1.png" medium="image" />
	</item>
		<item>
		<title>Javascript wierdness</title>
		<link>http://hellowahab.wordpress.com/2011/12/10/javascript-wierdness/</link>
		<comments>http://hellowahab.wordpress.com/2011/12/10/javascript-wierdness/#comments</comments>
		<pubDate>Sat, 10 Dec 2011 10:14:25 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
		
		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=210</guid>
		<description><![CDATA[If you define a variable name similar to a function name it will behave uncertainly.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=210&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you define a variable name similar to a function name it will behave uncertainly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/210/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/210/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/210/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=210&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/12/10/javascript-wierdness/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>Zend Dispatch Process</title>
		<link>http://hellowahab.wordpress.com/2011/11/27/zend-dispatch-process/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/27/zend-dispatch-process/#comments</comments>
		<pubDate>Sun, 27 Nov 2011 12:19:33 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
		
		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=206</guid>
		<description><![CDATA[Here is a nice description of things happening behind the scene of the whole dispatch process in zend framework. http://www.filejungle.com/f/PxFgr5/zenddispatch_en.pdf &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=206&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here is a nice description of things happening behind the scene of the whole dispatch process in zend framework.</p>
<p><a title="www.filejungle.com/f/PxFgr5/zenddispatch_en.pdf" href="www.filejungle.com/f/PxFgr5/zenddispatch_en.pdf" target="_blank">http://www.filejungle.com/f/PxFgr5/zenddispatch_en.pdf</a></p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=206&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/27/zend-dispatch-process/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>Some important dlls</title>
		<link>http://hellowahab.wordpress.com/2011/11/24/some-important-dlls/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/24/some-important-dlls/#comments</comments>
		<pubDate>Thu, 24 Nov 2011 06:22:14 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
		
		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=199</guid>
		<description><![CDATA[Important Note:- All file extension need to be changed to dll Recatcha.dll (Version:- 1.0.0.0) Recaptcha<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=199&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Important Note:- All file extension need to be changed to dll</p>
<ol>
<li>Recatcha.dll (Version:- 1.0.0.0) <a href="http://hellowahab.files.wordpress.com/2011/11/recaptcha.doc">Recaptcha</a></li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/199/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/199/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/199/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=199&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/24/some-important-dlls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>Wahab Quotes</title>
		<link>http://hellowahab.wordpress.com/2011/11/12/wahab-quotes/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/12/wahab-quotes/#comments</comments>
		<pubDate>Sat, 12 Nov 2011 14:14:46 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
		
		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=195</guid>
		<description><![CDATA[Commitment is another name to sacrifices; You can&#8217;t be committed to a cause without willing to sacrifice for it. Success comes, when you refuse to fail. Commit with care; Commitments need to be fulfilled as well. زندگی مسکلات سے لڑنے کا نام ہے ، زندہ رہتے ہوے آسانیوں کو تلاش کرنا بیوکوفی  نہی تو اور [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=195&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<ol>
<li>Commitment is another name to sacrifices; You can&#8217;t be committed to a cause without willing to sacrifice for it.
</li>
<li>Success comes, when you refuse to fail.
</li>
<li>Commit with care; Commitments need to be fulfilled as well.
</li>
<li><span style="font-family:Arial;">زندگی</span><br />
			<span style="font-family:Arial;">مسکلات</span><br />
			<span style="font-family:Arial;">سے</span><br />
			<span style="font-family:Arial;">لڑنے</span><br />
			<span style="font-family:Arial;">کا</span><br />
			<span style="font-family:Arial;">نام</span><br />
			<span style="font-family:Arial;">ہے</span><br />
			<span style="font-family:Arial;">،</span><br />
			<span style="font-family:Arial;">زندہ</span><br />
			<span style="font-family:Arial;">رہتے</span><br />
			<span style="font-family:Arial;">ہوے</span><br />
			<span style="font-family:Arial;">آسانیوں</span><br />
			<span style="font-family:Arial;">کو</span><br />
			<span style="font-family:Arial;">تلاش</span><br />
			<span style="font-family:Arial;">کرنا</span><br />
			<span style="font-family:Arial;">بیوکوفی</span>  <span style="font-family:Arial;">نہی</span><br />
			<span style="font-family:Arial;">تو</span><br />
			<span style="font-family:Arial;">اور</span><br />
			<span style="font-family:Arial;">کیا</span><br />
			<span style="font-family:Arial;">ہے</span> ؟</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=195&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/12/wahab-quotes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>How to start web development as a career OR how to become a web developer</title>
		<link>http://hellowahab.wordpress.com/2011/11/11/how-to-start-web-development-as-a-career-or-how-to-become-a-web-developer/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/11/how-to-start-web-development-as-a-career-or-how-to-become-a-web-developer/#comments</comments>
		<pubDate>Fri, 11 Nov 2011 09:02:20 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
		
		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=187</guid>
		<description><![CDATA[It&#8217;s really insane; once you dive into the world of web development. You are amazed with the number of technologies available. The real problem occurs once you have to decide what to do. Web development is not just learning a single technology its a mixture/blend of several technologies. Not only you have to learn those [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=187&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s really insane; once you dive into the world of web development. You are amazed with the number of technologies available. The real problem occurs once you have to decide what to do. Web development is not just learning a single technology its a mixture/blend of several technologies. Not only you have to learn those technologies you have to decide this as well; which to learn first and which to learn later.</p>
<p>Creating of a web application span over several steps:-</p>
<ol>
<li>Inception of Idea/thoughts</li>
<li>Creating a mockup(design/wire-frame) , in which it is sketched what the web application will contain.</li>
<li>Once the design is finalized it is HTMLized (Html is created out of that design)</li>
<li>Once you create the HTML, it is ready to be used within you web forms.</li>
<li>Web forms do utilize client side and server side technologies.</li>
<li>Several other steps do include but these are the main steps</li>
</ol>
<p>Now we come to the point where to start:-</p>
<p>Different people when starting a thing have different level of experience so you can adapt it as per you need and adaptibility.</p>
<ol>
<li>I would prefer you should first of all start learning <strong>HTML</strong>. You should know all the basic elements of HTML and how to use them.</li>
<li>Once you are apt in HTML i would prefer learning <strong>Javascript</strong> and try to explore it as much you can because it the core client side language for html manipulation. Jquery, AJAX all are based on <strong>Javascript</strong>, so make it the second weapon of your choice.</li>
<li>Once you are done with Javascript now let play with <strong>CSS</strong>, it is like beautifying your html. BEWARE NOT TO USE ANY SERVER SIDE LANGUAGE UNTIL YOU MASTER ALL THESE THREE.</li>
<li>Once you are good at these 3 now you can use any server side language Asp.net, PHP or JSP. I would prefer using PHP as it will allow you to manipulate your HTML directly.</li>
</ol>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/187/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/187/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/187/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=187&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/11/how-to-start-web-development-as-a-career-or-how-to-become-a-web-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>Consuming dotnet based web service ( returing dataset ) in PHP (Zend).</title>
		<link>http://hellowahab.wordpress.com/2011/11/10/consuming-dotnet-based-web-service-returing-dataset-in-php-zend/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/10/consuming-dotnet-based-web-service-returing-dataset-in-php-zend/#comments</comments>
		<pubDate>Thu, 10 Nov 2011 08:54:55 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
				<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=176</guid>
		<description><![CDATA[Consuming a dotnet web service that return dataset can be a nightmare to consume. I tried to consume it and Google several time to find a solution due to inappropriate/incomplete  solution i am writing one. Here is a subset list of my useful search which you can use as a per-requisite:- http://stackoverflow.com/questions/279220/how-to-invoke-a-c-sharp-web-service-through-php http://php.net/manual/en/soapclient.soapcall.php http://superdotnet.codeplex.com/ http://stackoverflow.com/questions/2749954/asmx-web-service-returning-xml-instead-of-json-in-net-4-0 [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=176&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Consuming a dotnet web service that return dataset can be a nightmare to consume. I tried to consume it and Google several time to find a solution due to inappropriate/incomplete  solution i am writing one.</p>
<p>Here is a subset list of my useful search which you can use as a per-requisite:-</p>
<ol>
<li>http://stackoverflow.com/questions/279220/how-to-invoke-a-c-sharp-web-service-through-php</li>
<li>http://php.net/manual/en/soapclient.soapcall.php</li>
<li>http://superdotnet.codeplex.com/</li>
<li>http://stackoverflow.com/questions/2749954/asmx-web-service-returning-xml-instead-of-json-in-net-4-0</li>
<li>http://metrix.fcny.org/wiki/display/tips/How+to+Create+a+PHP+Client+for+a+.NET+and+SOAP-based+Web+Service+API</li>
<li>http://stackoverflow.com/questions/5282930/consuming-net-web-services-with-complex-types-in-php</li>
</ol>
<p>And here comes my solution:-</p>
<blockquote><p>
require_once(&#8216;Zend/Soap/Client.php&#8217;);</p>
<p>$url = &#8216;http://mywebservice/Service.asmx?wsdl&#8217;;<br />
$options = array<br />
(    &#8221;soap_version&#8221; =&gt; SOAP_1_1,<br />
&#8220;encoding&#8221; =&gt; &#8220;UTF-8&#8243;,<br />
);<br />
$client = new Zend_Soap_Client($url,$options);</p>
<p>$response = $client-&gt;GetBalanceSummary(<br />
array(<br />
&#8220;AccessKey&#8221;=&gt;&#8221;13264&#8243;,<br />
&#8220;AccountNo&#8221;=&gt;&#8221;4546&#8243;,<br />
&#8220;CustomerId&#8221;=&gt;&#8221;4654&#8243;,<br />
&#8220;Channel&#8221;=&gt;&#8221;acb&#8221;,<br />
&#8220;FundCode&#8221;=&gt;&#8221;aadd&#8221;,<br />
)<br />
)-&gt;GetBalanceSummaryResult;</p>
<p>$xml = simplexml_load_string($response-&gt;any);<br />
$testArray = $xml-&gt;xpath(&#8220;NewDataSet&#8221;);</p>
<p>$testArray2 = $testArray[0];<br />
var_dump($testArray2[0]-&gt;Table1);</p></blockquote>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/176/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/176/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/176/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=176&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/10/consuming-dotnet-based-web-service-returing-dataset-in-php-zend/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>How to create a cursor in MySql</title>
		<link>http://hellowahab.wordpress.com/2011/11/02/how-to-create-a-cursor-in-mysql/</link>
		<comments>http://hellowahab.wordpress.com/2011/11/02/how-to-create-a-cursor-in-mysql/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 07:17:45 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=170</guid>
		<description><![CDATA[I have had trouble creating in Mysql cursor so i decide to post this. Don&#8217;t use same name for cursor variable similar to Column name of the fetched recordset. -- -------------------------------------------------------------------------------- -- Routine DDL -- Note: comments before and after the routine body will not be stored by the server -- -------------------------------------------------------------------------------- DELIMITER $$ CREATE [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=170&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have had trouble creating in Mysql cursor so i decide to post this.</p>
<p><strong>Don&#8217;t use same name for cursor variable similar to Column name of the fetched recordset.</strong></p>
<pre>-- --------------------------------------------------------------------------------
-- Routine DDL
-- Note: comments before and after the routine body will not be stored by the server
-- --------------------------------------------------------------------------------
DELIMITER $$

CREATE DEFINER=`root`@`localhost` PROCEDURE `INVESTOR2PROFILE`(
)
BEGIN
DECLARE done INT DEFAULT 0;
DECLARE a CHAR(16);
DECLARE _PID INT;
DECLARE _AID INT;
DECLARE _CIC ,_IN ,_rn ,_ct,_AN ,_AT,_OI ,_AOD, _ATI ,_E ,_ISP varchar(45);
DECLARE cur1 CURSOR FOR SELECT CNIC,InvestorName,registrationNo,categoryType,AccountNumber,AccountTitle,OperatingInstruction,AccountOpeningDate,
ATT.AccountTypeID, Email, 'y' IsPrimary from temptableforbulkimport temp left join AccountTypes ATT
on temp.AccountType = ATT.AccountType;

DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = 1;

  OPEN cur1;

  read_loop: LOOP
    FETCH cur1 INTO _CIC ,_IN  ,_rn ,_ct,_AN ,_AT,_OI ,_AOD, _ATI ,_E ,_ISP;
    IF done THEN
      LEAVE read_loop;
    END IF;
    Select _CIC ;
    Select _IN  ;
    Select _rn;
    Select _ct;
    Select _AN ;
    Select _AT;
    Select _OI ;
    Select _AOD;
    Select _ATI ;
    Select _E ;
    Select _ISP;
    /**********************Create Profile**********************/
    INSERT INTO profiles(CNIC,ProfileName) VALUES (_CIC,_IN);
        Set _PID = LAST_INSERT_ID();
    /**********************Create Account**********************/
        INSERT INTO accounts(AccountNumber ,AccountTitle ,OperatingInstructions ,AccountOpeningDate , AccountTypeID) values (_AN ,_AT,_OI ,_AOD, _ATI);
        Set _AID = LAST_INSERT_ID();
    /**********************Create ProfileAccount**********************/
    select _PID;
    select _AID;
    INSERT INTO profileaccount(AccountID ,ProfileID,IsPrimary, Email) values (_AID ,_PID,_IsPrimary, _E);
    /**********************Create ProfileInvestor**********************/
    INSERT INTO ProfileInvestor(ReferenceID ,InvestorCategory,ProfileID) values (_rn ,_categoryType,_PID);
  END LOOP;

  CLOSE cur1;
END</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/170/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/170/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/170/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=170&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/11/02/how-to-create-a-cursor-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title></title>
		<link>http://hellowahab.wordpress.com/2011/10/27/168/</link>
		<comments>http://hellowahab.wordpress.com/2011/10/27/168/#comments</comments>
		<pubDate>Thu, 27 Oct 2011 07:33:28 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Zend]]></category>

		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=168</guid>
		<description><![CDATA[Client-side validation with Zend_Form Zend_Form is Zend Framework’s brand new tool for simplifying form creation, parsing, validation and filtering. There’s one big thing I want from any kind of form generation tool: The ability to let me combine my server-side validators with JavaScript validation on the client, or other such features. And here’s the thing: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=168&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h1><a title="Permanent Link: Client-side validation with Zend_Form" href="http://codeutopia.net/blog/2008/04/04/client-side-validation-with-zend_form/" rel="bookmark">Client-side validation with Zend_Form</a></h1>
<p>Zend_Form is Zend Framework’s brand new tool for simplifying form creation, parsing, validation and filtering.</p>
<p>There’s one big thing I want from any kind of form generation tool: The ability to let me combine my server-side validators with JavaScript validation on the client, or other such features.</p>
<p>And here’s the thing: Zend_Form <em>is</em> easily extendable to automatically generate JavaScript for validating fields on the client!</p>
<p>&nbsp;</p>
<h3>Decorators, go</h3>
<p>The key to this is the ability to give the form decorators. They can be easily used to perform tasks based on the fields in the form, such as seeing what validators they have and generating some JS.</p>
<p>We can easily do this with two decorators:</p>
<ul>
<li>A modified Form decorator to add an onsubmit event</li>
<li>Another decorator for looping through each form field and generating the JS code needed. Let’s call this JsValidation decorator.</li>
</ul>
<p>We will also need to write a bit of JavaScript that will be used for processing the code generated by the second decorator.</p>
<h3>The form decorator</h3>
<p>The form decorator is very simple. It only needs to set the onsubmit event and add our JavaScript file which will contain the helper code needed.</p>
<p><a href="http://codeutopia.net/code/library/CU/Form/Decorator/Form.php">Download this from CodeUtopia’s SVN repo</a></p>
<div>
<div>
<pre>&lt;?php
class CU_Form_Decorator_Form extends Zend_Form_Decorator_Form
{
    public function getOptions()
    {
        $this-&gt;setOption('onsubmit','return App.validate(this)');

        $baseUrl = Zend_Controller_Front::getInstance()-&gt;getBaseUrl();
        $this-&gt;getElement()-&gt;getView()-&gt;headScript()-&gt;appendFile($baseUrl . '/js/Validator.js');

        return parent::getOptions();
    }
}</pre>
</div>
</div>
<p>So that’s it. I will show how to use it later in the post.</p>
<h3>The JsValidation decorator</h3>
<p>The JsValidation decorator can simply generate a JavaScript object which contains arrays for each of the fields. The arrays will then contain objects which contain the validator’s name and parameters.</p>
<div>
<div>
<pre>//For example, our form has a field called "firstname" with validators NotEmpty and Alnum:
var MyForm = {
    firstname: [{
        name: 'NotEmpty',
        parameters: { }
    }, {
        name: 'Alnum',
        parameters: { allowWhiteSpace: true }
    }]
};</pre>
</div>
</div>
<p>So how do we go about generating such code?</p>
<p><a href="http://codeutopia.net/code/library/CU/Form/Decorator/JsValidation.php">Download this from CodeUtopia’s SVN repo</a></p>
<div>
<div>
<pre>&lt;?php
/**
 * Generates JS validation rules for form fields
 */
class CU_Form_Decorator_JsValidation extends Zend_Form_Decorator_Abstract
{
	/**
	 * The name of the form
	 * @var string
	 */
	protected $_formName;

	public function render($content)
	{
		$form = $this-&gt;getElement();
		$view = $form-&gt;getView();
		$this-&gt;_formName = $form-&gt;getName();

		if(!$this-&gt;_formName)
			$this-&gt;_formName = 'form';

		$script = "var Forms = Forms || { };\r\n"
				. "Forms." . $this-&gt;_formName . " = { };\r\n";

		foreach($form as $element)
		{
			$validators = $element-&gt;getValidators();

			if(count($validators) &gt; 0)
				$script .= $this-&gt;_buildValidationRules($element);
		}

		$view-&gt;inlineScript()-&gt;captureStart();
		echo $script;
		$view-&gt;inlineScript()-&gt;captureEnd();

		return $content;
	}

	/**
	 * Generate the JavaScript code for the validation rules
	 * @param Zend_Form_Element $element
	 * @return string
	 */
	protected function _buildValidationRules(Zend_Form_Element $element)
	{
		$name = $element-&gt;getName();
		$formName = $this-&gt;_formName;
		$validators = $element-&gt;getValidators();

		$rules = array();
		foreach($validators as $validator)
		{
			$class = get_class($validator);
			$params = $this-&gt;_buildValidatorParameters($class, $validator);
			$rules[] = "{ name: '$class', parameters: $params }";
		}

		if(count($rules) &gt; 0)
			$script = "Forms." . $this-&gt;_formName . ".$name = [ " . implode(', ', $rules) . " ];\r\n";

		return $script;
	}

	/**
	 * Generate parameters for a validator rule
	 * @param string $class The name of the validator class
	 * @param Zend_Validate_Interface $validator the validator
	 * @return string
	 */
	protected function _buildValidatorParameters($class, Zend_Validate_Interface $validator)
	{
		$params = '{}';
		switch($class)
		{
			case 'Zend_Validate_Alnum':
			case 'Zend_Validate_Alpha':
				$params = '{ allowWhitespace: ' . (($validator-&gt;allowWhiteSpace) ? 'true' : 'false') . ' } ';
				break;

			case 'Zend_Validate_Between':
				$params = '{ min: ' . $validator-&gt;getMin() . ', max: ' . $validator-&gt;getMax() . ' } ';
				break;
		}

		return $params;
	}
}</pre>
</div>
</div>
<p>Let’s look at each method. Starting from the top, the render method is called when the form is rendered, so we just use this to do our thing. First we grab some variables and define the JS Forms variable that will act as a namespace for our form rules.</p>
<p>In case we have multiple forms, we use the Forms || { } to create it based on the old one if it exists. We also use the form’s name to store the actual rules, so be sure to give your form a name if you have more than one per page – otherwise their rules may collide etc.</p>
<p>Then it’s simply looping over each form field, generating code if necessary.</p>
<p>the _buildValidationRules method generates JS code for each validator in an element. It pretty much just loops over each validator and returns the code.</p>
<p>Finally, the _buildValidatorParameters method is used to generate the parameters for each validator. Since Zend_Validate does not specify a way to get all the parameters a validator may have, we’re just using a switch and looking at each validator class type on its own. This switch can be easily extended by adding more validators. You can also easily create a custom class based on this one and then override this method to do the same.</p>
<p>If you look at the switch, you’ll notice both Alnum and Alpha have the same code. This is because they both share the same parameters. You can actually do this with some validators, and many validators don’t even have any special parameters, so you won’t need a case for them.</p>
<h3>The JavaScript code</h3>
<p>Of course, we will also need that Validator.js file mentioned in the Form helper. Without that, our rule definitions would just sit in our page doing nothing.</p>
<p><a href="http://codeutopia.net/code/JS/Validator.js">Download this from CodeUtopia’s SVN repo</a></p>
<div>
<div>
<pre>var App = App || { };

App.validate = function(form)
{
	var formName = (form.name)
	             ? form.name
	             : 'form';

	var rules = Forms[formName];

	var formValidates = true;

	for(var key in rules)
	{
		var element = form[key];
		var ruleset = rules[key];

		var value = (element.nodeName == 'INPUT')
		          ? element.value
		          : element.innerHTML;

		for(var i in ruleset)
		{
			var validatorName = ruleset[i].name;
			var elementValidates = App.Validator[validatorName](value, ruleset[i].parameters);

			if(elementValidates)
			{
				//You can replace this with whatever you want to happen to invalid fields.
				YAHOO.util.Dom.removeClass(element, 'invalid');
			}
			else
			{
				//Again, replace if you aren't using YUI.
				YAHOO.util.Dom.addClass(element, 'invalid');

				//but not this
				formValidates = false;
				break;
			}
		}
	}

	return formValidates;
}

App.Validator = {
	Zend_Validate_NotEmpty: function(value, parameters)
	{
		if(value != '')
			return true;

		return false;
	},

	Zend_Validate_Alnum: function(value, parameters)
	{
		if(parameters.allowWhiteSpace)
			return value.match(/^[a-z0-9\s]*$/i);
		else
			return value.match(/^[a-z0-9]*$/i);
	}
};</pre>
</div>
</div>
<p>Again, let’s go through the code step by step.</p>
<p>First, we’re defining the App namespace. Similar to how the Forms variable was defined, we’re making sure that if it exists, we’ll just use the existing one. It’s good practice to namespace your JS code so that it does not interfere with others.</p>
<p>Next, we define the validate function. It looks at the validation rules created by the JsValidation decorator and loops through them. It takes each field and their value and calls each validator defined for the element. I have left some Yahoo UI library specific code there, which you can replace with your own if you aren’t using YUI. It’s nothing major, simply adding a CSS class “invalid” to fields which fail validation.</p>
<p>In the end the function returns if the form validates or not. This is so that if the validation fails, the form will not get submitted.</p>
<p>Next, in the App.Validator namespace we define our JS versions of Zend_Validate classes. I have added two examples, Zend_Validate_NotEmpty and Zend_Validate_Alnum. NotEmpty simply looks if the value was empty and Alnum uses regular expressions to see if the value only contains alphanumeric characters, and if the allowWhiteSpace parameter is set, it also allows that.</p>
<p>Based on those two you should be able to implement your own validators, but as always, feel free to ask if anything is unclear.</p>
<h3>Using the decorators</h3>
<p>Finally we have all the code we need to actually create an example!</p>
<p>I’m not going to deal with creating forms with Zend_Form here. If you need help with that, there’s some good information in the Zend_Form Webinar slides you can find at <a href="http://www.zend.com/en/resources/webinars/framework">Zend Framework Webinars site</a>, and there’s also <a href="http://akrabat.com/2008/02/21/simple-zend_form-example/">a good introductionary article to Zend_Form at Rob Allen’s blog</a>.</p>
<p>To use the new decorators, you will need to replace the old Form decorator and add the JsValidation decorator, like this:</p>
<div>
<div>
<pre>//Replace Form decorator with our own
$form-&gt;removeDecorator('Form');
$form-&gt;addDecorator(new CU_Form_Decorator_Form());

//Add JsValidation
$form-&gt;addDecorator(new CU_Form_Decorator_JsValidation());</pre>
</div>
</div>
<p>And that’s it! You now have client-side validation in your form. Do note that you will need to have both HeadScript and InlineScript view helpers’ contents echoed in your view. Otherwise the JavaScript code will not be shown.</p>
<p>You will probably have to define some more validators in JS and to the switch in the PHP code, but other than that, this is a working solution.</p>
<p>I have tested this code myself and it worked, but if you encounter any issues, please post a comment. Also, if you create any JS code for validators, I encourage you to share your code in the comments so that everyone can benefit.</p>
<p>Copied from http://codeutopia.net/blog/2008/04/04/client-side-validation-with-zend_form/</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/168/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/168/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/168/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=168&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/10/27/168/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
		<item>
		<title>Multi statement Stored Procedure in MySQL</title>
		<link>http://hellowahab.wordpress.com/2011/10/24/multi-statement-stored-procedure-in-mysql/</link>
		<comments>http://hellowahab.wordpress.com/2011/10/24/multi-statement-stored-procedure-in-mysql/#comments</comments>
		<pubDate>Mon, 24 Oct 2011 11:26:39 +0000</pubDate>
		<dc:creator>Owner</dc:creator>
				<category><![CDATA[Mysql]]></category>

		<guid isPermaLink="false">http://hellowahab.wordpress.com/?p=164</guid>
		<description><![CDATA[I tried different syntax to find out multi statement sp in mysql and a co-worker help me find this. DELIMITER $$ CREATE PROCEDURE Mubashir ( parameter1 VARCHAR(255), parameter2 INTEGER ) BEGIN insert into accounttype(accounttype) select distinct AccountType from ublois.temptableforbulkimport; SELECT * from temptableforbulkimport; END$$ DELIMITER ; &#160;<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=164&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I tried different syntax to find out multi statement sp in mysql and a co-worker help me find this.</p>
<p>DELIMITER $$</p>
<p>CREATE PROCEDURE Mubashir<br />
(<br />
parameter1 VARCHAR(255),<br />
parameter2 INTEGER<br />
)<br />
BEGIN<br />
insert into accounttype(accounttype) select distinct AccountType from ublois.temptableforbulkimport;</p>
<p>SELECT * from temptableforbulkimport;<br />
END$$</p>
<p>DELIMITER ;</p>
<p>&nbsp;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/hellowahab.wordpress.com/164/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/hellowahab.wordpress.com/164/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/hellowahab.wordpress.com/164/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=hellowahab.wordpress.com&amp;blog=5502995&amp;post=164&amp;subd=hellowahab&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://hellowahab.wordpress.com/2011/10/24/multi-statement-stored-procedure-in-mysql/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/80be37cae5ef94a4829270cdf867d44b?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">hellowahab</media:title>
		</media:content>
	</item>
	</channel>
</rss>
