<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>JLoe.net</title>
	
	<link>http://blog.jloe.net</link>
	<description>Life is like a box of chocolates</description>
	<lastBuildDate>Fri, 25 Dec 2009 16:31:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/jwloe" /><feedburner:info uri="jwloe" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><geo:lat>1</geo:lat><geo:long>103</geo:long><feedburner:emailServiceId>jwloe</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><item>
		<title>Zend Caveats</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/POHQa-izERg/</link>
		<comments>http://blog.jloe.net/2009/12/24/zend-caveats/#comments</comments>
		<pubDate>Thu, 24 Dec 2009 08:41:40 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Personal]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=504</guid>
		<description><![CDATA[
			
				
			
		
Ever gets frustrated during your coding? I&#8217;m pretty sure the answer is a big YES especially if you&#8217;re new with the programming language you&#8217;re trying to develop or you might have forgotten the old programming language you used to. Likewise, most of the time we get frustrated when there is a stumbling block during your development [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/' rel='bookmark' title='Permanent Link: Start ORM with LINQ in .Net Framework'>Start ORM with LINQ in .Net Framework</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/-Dh53fza922yRBOqWdHAsabsyto/0/da"><img src="http://feedads.g.doubleclick.net/~a/-Dh53fza922yRBOqWdHAsabsyto/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/-Dh53fza922yRBOqWdHAsabsyto/1/da"><img src="http://feedads.g.doubleclick.net/~a/-Dh53fza922yRBOqWdHAsabsyto/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F24%2Fzend-caveats%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F24%2Fzend-caveats%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Ever gets frustrated during your coding? I&#8217;m pretty sure the answer is a big YES especially if you&#8217;re new with the programming language you&#8217;re trying to develop or you might have forgotten the old programming language you used to. Likewise, most of the time we get frustrated when there is a stumbling block during your development especially when the deadline is imminent. The expression &#8220;Argh!!&#8221; or banging on a table are common to convey the frustration. :)</p>
<p>Anyway, here I&#8217;m going to share with some of my encounters that I can still recall during my past development using <a title="Click to find out more" href="http://framework.zend.com/" target="_blank">Zend Framework</a>.</p>
<p><strong>Controller</strong></p>
<ul>
<li><code>$this-&gt;_forward()</code> somehow reset protected variables upon two consecutive executions. Unfortunately I am unable to recall the exact situation during the encounter.</li>
<li>Avoid using <code>Zend_Form_Element_Submit-&gt;setAttrib('value','submit')</code> but rather to use <code>Zend_Form_Element_Submit-&gt;setValue()</code>.</li>
<li><code>$this-&gt;url( array( 'controler' =&gt; 'control', 'action' =&gt; 'action' ))</code> will only set or replace the specified parameters and retain other parameters of the current url.  In this example, the function will only set the controller name and action name with &#8216;control&#8217; and &#8216;action&#8217; respectively. Thus if there&#8217;s additional parameter in the url, say <em>id</em>, then the id and its value will be retained in the new url.</li>
<li>If your code needs to access variable(s) within a Controller,  then put your code within an override function <em>preDispatch()</em> instead of <em>init()</em>. Function <em>init()</em> does not allow your code to access the desired variable within the Controller.</li>
</ul>
<p><strong>Database</strong></p>
<ul>
<li>To order your query result, use <code>$select-&gt;order()</code> instead of <code>$select-&gt;fetch($query, $order)</code>.</li>
<li>Use <code>$db-&gt;select()-&gt;setIntegrityCheck(false)</code> if you encounter the following error message.<br/>
<pre name="code" class="php">
Multiple SQL statements are not allowed (SELECT ...; DELETE..;)
$db-&gt;select()-&gt;join()
Exception information:
Message: Select query cannot join with another table
</pre>
<p>You may refer to this <a title="Click to find out more" href="http://www.zendframeworkinaction.com/2008/01/30/zend_db_table_abstract-in-version-15/" target="_blank">site</a> for more information.</li>
</ul>
<p>Hope this post helps settle down your unhealthy frustration. Enjoy! :)</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/' rel='bookmark' title='Permanent Link: Start ORM with LINQ in .Net Framework'>Start ORM with LINQ in .Net Framework</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=POHQa-izERg:XGqy0WGJzIk:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=POHQa-izERg:XGqy0WGJzIk:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=POHQa-izERg:XGqy0WGJzIk:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=POHQa-izERg:XGqy0WGJzIk:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=POHQa-izERg:XGqy0WGJzIk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/POHQa-izERg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/12/24/zend-caveats/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/12/24/zend-caveats/</feedburner:origLink></item>
		<item>
		<title>Start ORM with LINQ in .Net Framework</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/58athz-gqMc/</link>
		<comments>http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 15:19:16 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[linq]]></category>
		<category><![CDATA[orm]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=960</guid>
		<description><![CDATA[
			
				
			
		
In this post, I&#8217;m gonna show you how you can kick start your development with LINQ, new extension to .NET Framework that encompasses language-integrated query, set, and transform operations.
If you are unfamiliar with the terms ORM and LINQ then refer to the following articles to help you understand the idea and the purpose behind them.

ORM [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/WgN6v-LnCcUWH6YbGz2H7HiXUMA/0/da"><img src="http://feedads.g.doubleclick.net/~a/WgN6v-LnCcUWH6YbGz2H7HiXUMA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WgN6v-LnCcUWH6YbGz2H7HiXUMA/1/da"><img src="http://feedads.g.doubleclick.net/~a/WgN6v-LnCcUWH6YbGz2H7HiXUMA/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F23%2Fstart-orm-with-linq-in-net-framework%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F23%2Fstart-orm-with-linq-in-net-framework%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>In this post, I&#8217;m gonna show you how you can kick start your development with LINQ, new extension to .NET Framework that encompasses language-integrated query, set, and transform operations.</p>
<p>If you are unfamiliar with the terms ORM and LINQ then refer to the following articles to help you understand the idea and the purpose behind them.</p>
<ul>
<li><a title="Click to get the explanation from wikipedia" href="http://en.wikipedia.org/wiki/Object-
<p>relational_mapping" target="_blank">ORM (Object Relational Mapping)</a></li>
<li><a title="Click to learn more about LINQ from Microsoft." href="http://msdn.microsoft.com/en-
<p>us/netframework/aa904594.aspx" target="_blank">LINQ (Language Integrated Query)</a></li>
</ul>
<p>I have heard of LINQ years back but did not have a chance to give it a test-drive since its first release. For your information LINQ was first introduced in .NET 3.0 and had been evangelized long before its public release.</p>
<p>Without going further into unnecessary explanation, I&#8217;m going to start guiding you on how to start LINQ in .Net.</p>
<p>To make things simple and easy to follow, let&#8217;s first create a console application project from your Visual Studio. Once the new project is created, then add a new Reference <em>System.Data.Linq</em> into the project from the Solution Explorer under .NET tab. If you are unable to find the specified reference then .NET 3.0 Framework is not yet installed on your PC. Please install the required Framework prior to proceeding to the next steps below. You may then verify the new reference under References tree node in your Solution Explorer.</p>
<p>Next is to create a simple class to represent a Person which, for the sake of simplicity, only consists of several attributes like Title, Name, Country. I have created a sample class for your reference as shown below.</p>
<pre name="code" class="c#">
using System;
using System.Collections.Generic;
using System.Data.Linq.Mapping;
using System.Linq;
using System.Text;

namespace JLoeConsole
{
   [Table(Name = "Person")]
   class Person
   {
      private string _title;
      [Column(Storage = "_title", Name = "Title")]
      public string Title
      {
         get { return _title; }
         set { _title = value; }
      }

      private string _name;
      [Column(Storage = "_name", Name = "Name")]
      public string Name
      {
         get { return _name; }
         set { _name = value; }
      }

      private string _country;
      [Column(Storage = "_country", Name = "Country")]
      public string Country
      {
         get { return _country; }
         set { _country = value; }
      }
   }
}
</pre>
<p>As you may notice, I have included a reference <em>System.Data.Linq.Mapping</em> into the class header. This is to enable the use of attribute <code>[Table(Name = "Person")]</code> as well as <code>[Column(Storage = "_title", Name = "Title")]</code>.</p>
<p><code>[Table(Name = "Person")]</code> is used to let LINQ know that the class <em>Person</em> maps to a database table named &#8220;Person&#8221; whereas <code>[Column(Storage = "_title", Name = "Title")]</code> tells LINQ to store the value of a column &#8220;Title&#8221; in the table &#8220;Person&#8221; into a variable named &#8220;_title&#8221;. Notice that <em>_title</em> property is also declared in the class as the storage. The same explanation goes to the rest of the properties.</p>
<p>At this juncture, we just completed the creation of a simple mapping class or ORM class.</p>
<p>Next step is to open the default driver class <em>Program.cs</em> and complete the project with the following codes. The codes need to be inserted in the driver function <code>static void Main(string[] args){ ... }</code>.</p>
<pre name="code" class="c#">
// Set your connection string below.
string connectionString = @"";

// Initialize DataContext class for LINQ
// with the specified connection string
DataContext db = new DataContext(connectionString);

// Create a new instance of Table class
// to contain list of persons
Table&lt;Person&gt; Persons = db.GetTable&lt;Person&gt;();

// Below is the Lambda expressions for LINQ
// to search people who live in Singapore
var persons =
   from p in Persons
   where p.Country == "SINGAPORE"
   select p;

// Print names of all the person who stay in Singapore
foreach (Person person in persons)
{
   Console.WriteLine(person.Name);
}
</pre>
<p>I hope the comments inside the codes above are sufficient to help you understand. Just in case you&#8217;re not sure what to fill in for your connection string you may refer to this <a title="Click to get the right connection string" href="http://www.connectionstrings.com/" target="_blank">site</a> for clue.</p>
<p>Well I can say that, with these codes inside your project, the application is now ready for your build or debug. Hopefully you don&#8217;t encounter any issue following these steps and this example gives you a good start into your exploration of LINQ.</p>
<p>Last but not least, since Christmas and New year is just a few days away from the time I&#8217;m writing this post, I would like to wish you a Wonderful Christmas and Joyful New Year. Happy Holiday! :)</p>
<p>I would also like to give my token of appreciation to the following sites.</p>
<ul>
<li><a title="Click to find out more" href="http://www.technospot.net/blogs/linq-tutorial-with-dot-net-framework-30/" target="_blank">LINQ Tutorial with Dot Net Framework 3.0 and 3.5</a></li>
<li><a title="Click to find out more" href="http://msdn.microsoft.com/en-us/vcsharp/aa336746.aspx" target="_blank">101 LINQ Samples</a></li>
</ul>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=58athz-gqMc:VWEQKcllpyE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=58athz-gqMc:VWEQKcllpyE:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=58athz-gqMc:VWEQKcllpyE:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=58athz-gqMc:VWEQKcllpyE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=58athz-gqMc:VWEQKcllpyE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/58athz-gqMc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/</feedburner:origLink></item>
		<item>
		<title>Simple Steps to Start WCF with Visual Studio 2008</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/-KJGmWKL4KQ/</link>
		<comments>http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/#comments</comments>
		<pubDate>Sat, 19 Dec 2009 10:21:12 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wcf]]></category>
		<category><![CDATA[windows communication foundation]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=908</guid>
		<description><![CDATA[
			
				
			
		
WCF, as you may have known, stands for Windows Communication Foundation. It is an interface provided in .NET framework for building connected and service-oriented application to support Service Oriented Architecture, in short SOA. However I won&#8217;t dig into detail about WCF and the relevant topics such as SOA. If you are interested to find out [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/' rel='bookmark' title='Permanent Link: Start ORM with LINQ in .Net Framework'>Start ORM with LINQ in .Net Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/download-torrent-from-web/' rel='bookmark' title='Permanent Link: Download Torrent from Web'>Download Torrent from Web</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/03/16/microsoft-visual-c-debug-library/' rel='bookmark' title='Permanent Link: Microsoft Visual C++ Debug Library'>Microsoft Visual C++ Debug Library</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/_6X9PsrFz7klKXs0PxoyiMIs47o/0/da"><img src="http://feedads.g.doubleclick.net/~a/_6X9PsrFz7klKXs0PxoyiMIs47o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/_6X9PsrFz7klKXs0PxoyiMIs47o/1/da"><img src="http://feedads.g.doubleclick.net/~a/_6X9PsrFz7klKXs0PxoyiMIs47o/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F19%2Fsimple-steps-to-start-wcf-with-visual-studio-2008%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F12%2F19%2Fsimple-steps-to-start-wcf-with-visual-studio-2008%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>WCF, as you may have known, stands for Windows Communication Foundation. It is an interface provided in .NET framework for building connected and service-oriented application to support Service Oriented Architecture, in short SOA. However I won&#8217;t dig into detail about WCF and the relevant topics such as SOA. If you are interested to find out more about this technology, check out the <a title="Click to read the WCF whitepaper" href="http://msdn.microsoft.com/en-us/library/dd943056.aspx" target="_blank">WCF whitepaper</a> or feel free to ask <a title="Click to ask Uncle Google" href="http://www.google.com" target="_blank">Uncle Google</a> for help ;).</p>
<p>The objective of this post is to assist and demonstrate you on how you can start WCF using Microsoft Visual Studio 2008 in just few simple steps. FYI I just started experimenting this technology yesterday so forgive me should any of these steps are not achievable.</p>
<p>Before I start, please make sure you have the following installed on your computer.</p>
<ul>
<li>Internet Information Services</li>
<li>Microsoft Visual Studio 2008</li>
</ul>
<p>To start, first of course is to launch Microsoft Visual Studio 2008 which is then followed by creating a new project. Next is to select one of the available Web Templates, that is <em>WCF Service Application</em>. Refer to Figure 1 below.﻿</p>
<div id="attachment_914" class="wp-caption aligncenter" style="width: 447px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-New-Project2.gif"><img class="size-full wp-image-914  " title="Figure 1 - Create New Project" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-New-Project2.gif" alt="Figure 1 - Create New Project" width="437" height="318" /></a><p class="wp-caption-text">Figure 1 - Create New Project</p></div>
<p>As depicted in figure 1, I chose C# as my preferred programming language for this project. If you prefer otherwise, then expand your desired language from the <em>Project types</em> panel and locate the same project <em>WCF Service Application</em> from the tree. Then type your preferred name. For this case <em>JLoeService</em> is used as the project name. Finally click <em>Ok</em> to confirm. Upon confirmation you should expect to see the following screenshot.</p>
<div id="attachment_916" class="wp-caption alignleft" style="width: 185px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Solution-Explorer.gif"><img class="size-full wp-image-916" title="Figure 2 - Solution Explorer" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Solution-Explorer.gif" alt="Figure 2 - Solution Explorer" width="175" height="202" /></a><p class="wp-caption-text">Figure 2 - Solution Explorer</p></div>
<p>As depicted on the left, a new project called <em>JLoeService</em> is created along with the necessary files: <em>IService1.cs</em>, <em>Service1.svc</em>, <em>Service1.svc.cs</em>, and <em>Web.config</em>. <em>IService1.cs</em> refers to an interface or the service contract provided by the application. <em>Service1.svc</em> is merely a service markup whereas <em>Service1.svc.cs</em> contains the code implementation of the contract defined in <em>IService1.cs</em>. Finally <em>Web.config</em> stores all your application settings or configuration values such as connection string, service declaration, etc. I will not explain here on some of advanced features you can define in <em>Web.config</em> like transforming the service envelop to JSON. JSON stands for Java Script Object Notation and is very popular for integration with AJAX (Asynchronous JavaScript and XML). The collaboration gives the most lightweight interaction for data interchange between web client and server.</p>
<p>Enough for that. Now lets try to build and run the new project in Debug mode by clicking Play button in the toolbar or press F5. If there is a prompt like shown in figure 3 and figure 4, click <em>Ok</em> and <em>Yes</em> respectively to ignore.</p>
<div id="attachment_922" class="wp-caption aligncenter" style="width: 346px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Debugging-Prompt.gif"><img class="size-full wp-image-922 " title="Figure 3 - Debugging Not Enabled" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Debugging-Prompt.gif" alt="Figure 3 - Debugging Not Enabled" width="336" height="151" /></a><p class="wp-caption-text">Figure 3 - Debugging Not Enabled</p></div>
<div id="attachment_923" class="wp-caption aligncenter" style="width: 394px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Script-Debugging-Prompt.gif"><img class="size-full wp-image-923 " title="Figure 4 - Script Debugging Prompt" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Script-Debugging-Prompt.gif" alt="Figure 4 - Script Debugging Prompt" width="384" height="160" /></a><p class="wp-caption-text">Figure 4 - Script Debugging Prompt</p></div>
<div id="attachment_925" class="wp-caption alignleft" style="width: 234px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Development-Server.gif"><img class="size-full wp-image-925  " title="Figure 5 - ASP .NET Development Server" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Development-Server.gif" alt="Figure 5 - ASP .NET Development Server" width="224" height="74" /></a><p class="wp-caption-text">Figure 5 - ASP .NET Development Server</p></div>
<p>Upon successful build, please take note of  the URL of ASP .NET Development Server is running as depicted in a tool tip located on top of your Windows task bar. In this example, the development server is running at http://localhost:2105/. A successful build could then be verified by a launch of new Internet Explorer or other default browser with a new page as illustrated in figure 6 and figure 7. Figure 7 is achieved by clicking <em>Service1.svc</em> from the figure 6.</p>
<div id="attachment_926" class="wp-caption aligncenter" style="width: 397px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Internet-Explorer.gif"><img class="size-full wp-image-926 " title="Figure 6 - Directory Listing" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Internet-Explorer.gif" alt="Figure 6 - Directory Listing" width="387" height="237" /></a><p class="wp-caption-text">Figure 6 - Directory Listing</p></div>
<div id="attachment_927" class="wp-caption aligncenter" style="width: 398px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Service1-Service.gif"><img class="size-full wp-image-927 " title="Figure 7 - Service1 Service" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Service1-Service.gif" alt="Figure 7 - Service1 Service" width="388" height="185" /></a><p class="wp-caption-text">Figure 7 - Service1 Service</p></div>
<p>With this address, proxy class and contract could be generated by <em>svcutil.exe</em> which will be used by a client to access the service. <em>Svcutil.exe</em> could be located inside <em>C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin</em> folder. To generate the files, use your command prompt and move the current directory to the specified folder and run the command &#8220;<em>svcutil.exe http://localhost:2105/Service1.svc?wdsl</em>&#8220;. The execution will generate two new files and they are <em>Service1.cs</em> and <em>output.config</em>.</p>
<div id="attachment_930" class="wp-caption aligncenter" style="width: 459px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Command-Prompt.gif"><img class="size-full wp-image-930 " title="Figure 8 - Svcutil.exe on Command Prompt" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Command-Prompt.gif" alt="Figure 8 - Svcutil.exe on Command Prompt" width="449" height="104" /></a><p class="wp-caption-text">Figure 8 - Svcutil.exe on Command Prompt</p></div>
<p>Next step is to create a simple client to access the service. To begin with, a new client project has to be created. Here I&#8217;m going to create a console application called <em>JLoeConsole</em>. To create, stop the running project in previous step by clicking the Stop button and then click <em>File &gt; Add &gt; New Project</em> from the menu bar to create a new Console Application and click <em>Ok</em> to confirm.</p>
<div id="attachment_931" class="wp-caption aligncenter" style="width: 488px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Console-Application.gif"><img class="size-full wp-image-931 " title="Figure 9 - Create Console Application" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Console-Application.gif" alt="Figure 9 - Create Console Application" width="478" height="313" /></a><p class="wp-caption-text">Figure 9 - Create Console Application</p></div>
<p>Upon creation, move the generated proxy files: <em>Service1.svc</em> and <em>output.config</em> to the folder where the console application was previously created. As an example, I&#8217;m going to move the files from <em>C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin</em> to my project folder <em>D:\Jonathan Documents\Visual Studio 2008\Projects\JLoeService\JLoeConsole</em>.</p>
<div id="attachment_933" class="wp-caption alignleft" style="width: 205px"><a href="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Include-Files.gif"><img class="size-full wp-image-933 " title="Figure 10 - Include Files in Project" src="http://blog.jloe.net/wp-content/uploads/2009/12/WCF-Include-Files.gif" alt="Figure 10 - Include Files in Project" width="195" height="188" /></a><p class="wp-caption-text">Figure 10 - Include Files in Project</p></div>
<p>Remember to rename <em>output.config</em> to <em>app.config</em> as the default configuration file for any console application. And finally include these files into the project. To include, first select the <em>Show All Files</em> in the Solution Explorer, select the two hidden files, right-click, and select <em>Include In Project</em> from the right-click menu. After the inclusion we need to include new references as these references are required for the compilation. Those references are <em>System.Runtime.Serialization</em> and <em>System.ServiceModel</em>. To include these references, right click on the References under <em>JLoeConsole</em> tree, select the mentioned references in the <em>.NET</em> tab, and click <em>Ok</em>. Next we need to write some codes into the main function in <em>Program.cs</em>. Copy and paste the following codes into the function.</p>
<pre name="code" class="C#">static void Main(string[] args)
{
   Service1Client client = new Service1Client();
   string output = client.GetData( 10 );
   Console.WriteLine( output );
}</pre>
<p>Now the project is ready for compilation. Select <em>Build &gt; Build JLoeConsole</em> from menu bar to compile. A successful build is indicated by a text &#8220;<em>Build succeeded</em>&#8221; located at the bottom left of  the status bar.</p>
<p>Finally both the service and the client are now ready for testing. To test, the service needs to run before the execution of client. To run the service, simply press the Play button or press F5 on the <em>JLoeService</em> project and ignore any warning prompts. Let the Internet Explorer run indefinitely to simulate as the running service. Last is to execute the client <em>JLoeConsole.exe</em> located in <em>bin/Debug</em> folder using Command Prompt. Before the execution, make sure the current directory in your Command Prompt point to the folder where the compiled <em>JLoeConsole.exe</em> is resided. And finally, execute the command <em>JLoeConsole.exe</em>. By then you should expect an output from the execution. That is &#8220;You entered: 10&#8243; as an output in your Command Prompt. This indicates that the console application <em>JLoeConsole</em> has successfully communicated with the service <em>JLoeService</em>.</p>
<p>Lastly I hope the above explanation is easy to follow and you&#8217;re able to accomplish what I&#8217;ve accomplished without any unexpected encounters. I also hope this sample can help you kick-start your development on WCF. Feel free to download this example from this <a title="Click to download WCF sample files." href="http://blog.jloe.net/wp-content/uploads/2009/12/JLoeService.zip" target="_blank">link</a>. Have fun! :)</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/23/start-orm-with-linq-in-net-framework/' rel='bookmark' title='Permanent Link: Start ORM with LINQ in .Net Framework'>Start ORM with LINQ in .Net Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/download-torrent-from-web/' rel='bookmark' title='Permanent Link: Download Torrent from Web'>Download Torrent from Web</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/03/16/microsoft-visual-c-debug-library/' rel='bookmark' title='Permanent Link: Microsoft Visual C++ Debug Library'>Microsoft Visual C++ Debug Library</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=-KJGmWKL4KQ:OOm1jaOK4x8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=-KJGmWKL4KQ:OOm1jaOK4x8:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=-KJGmWKL4KQ:OOm1jaOK4x8:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=-KJGmWKL4KQ:OOm1jaOK4x8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=-KJGmWKL4KQ:OOm1jaOK4x8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/-KJGmWKL4KQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/</feedburner:origLink></item>
		<item>
		<title>Hey, I am still alive!</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/AbH4duDAIsM/</link>
		<comments>http://blog.jloe.net/2009/11/11/hey-i-am-still-alive/#comments</comments>
		<pubDate>Wed, 11 Nov 2009 13:19:18 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=904</guid>
		<description><![CDATA[
			
				
			
		
As the title says, yeah I&#8217;m still alive. :)
I just started working in a new company and have been really busy with the new stuff going on in my new company. Things have been going really fast and it&#8217;s coming to my three months at the time I&#8217;m writing this post.
All I can say more [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/g-f4jAkoBsL1p5yyD3YR2Xvh1E4/0/da"><img src="http://feedads.g.doubleclick.net/~a/g-f4jAkoBsL1p5yyD3YR2Xvh1E4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/g-f4jAkoBsL1p5yyD3YR2Xvh1E4/1/da"><img src="http://feedads.g.doubleclick.net/~a/g-f4jAkoBsL1p5yyD3YR2Xvh1E4/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F11%2F11%2Fhey-i-am-still-alive%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F11%2F11%2Fhey-i-am-still-alive%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>As the title says, yeah I&#8217;m still alive. :)</p>
<p>I just started working in a new company and have been really busy with the new stuff going on in my new company. Things have been going really fast and it&#8217;s coming to my three months at the time I&#8217;m writing this post.</p>
<p>All I can say more challenges are coming in my new company, be it the technology or people management skills. I&#8217;m sure <span style="text-decoration: underline;">everything happens for a purpose</span>.</p>
<p>Anyway stay tuned for my new posts. I will try to put as much information as I can if time permits. For now let&#8217;s just enjoy and learn something for the last several days before the year of 2009 ends. And yeah time flies so better make <span style="text-decoration: underline;">use of these times thoughtfully and wisely</span>.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=AbH4duDAIsM:BEZO0H55BMU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=AbH4duDAIsM:BEZO0H55BMU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=AbH4duDAIsM:BEZO0H55BMU:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=AbH4duDAIsM:BEZO0H55BMU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=AbH4duDAIsM:BEZO0H55BMU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/AbH4duDAIsM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/11/11/hey-i-am-still-alive/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/11/11/hey-i-am-still-alive/</feedburner:origLink></item>
		<item>
		<title>SQL Queries Performance Findings on MySql</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/rNebN7a0S7Y/</link>
		<comments>http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/#comments</comments>
		<pubDate>Tue, 11 Aug 2009 09:02:43 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[finding]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[sql query]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=728</guid>
		<description><![CDATA[
			
				
			
		
Recently I was given a chance to get my mind and fingers into optimizing some heavy SQL queries on MySQL server. These examples are taken from real queries. I must admit that I am not an expert on this SQL stuff but I would like to share my useful findings in optimizing these SQL queries. [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
<li><a href='http://blog.jloe.net/2009/06/15/web-performance-best-practices/' rel='bookmark' title='Permanent Link: Web Performance Best Practices'>Web Performance Best Practices</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/OwB_jcy7qFFIYhvdqFWmCl8JxmI/0/da"><img src="http://feedads.g.doubleclick.net/~a/OwB_jcy7qFFIYhvdqFWmCl8JxmI/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OwB_jcy7qFFIYhvdqFWmCl8JxmI/1/da"><img src="http://feedads.g.doubleclick.net/~a/OwB_jcy7qFFIYhvdqFWmCl8JxmI/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F08%2F11%2Fsql-queries-performance-findings-on-mysql%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F08%2F11%2Fsql-queries-performance-findings-on-mysql%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Recently I was given a chance to get my mind and fingers into optimizing some heavy SQL queries on <a href="http://www.mysql.com/" title="Click to the MySQL official site">MySQL</a> server. These examples are taken from real queries. I must admit that I am not an expert on this SQL stuff but I would like to share my useful findings in optimizing these SQL queries. Details of the queries, mainly table names, have been removed for clarity and security reasons. So check them out.</p>
<pre name="code" class="sql">
SELECT pig.*, pdt.*, ph.*
FROM pig, pdt, ph
WHERE
	LOWER( pdt.Status ) = 'active' AND
	pig.pid = pdt.pid AND
	pdt.pid = ph.pid AND
	pdt.SearchFriendlyUrl = 'xxx-xxx-xxx'
</pre>
<p>Showing rows 0 &#8211; 5 (6 total, Query took 4.5421 sec)</p>
<pre name="code" class="sql">
SELECT pig.*, pdt.*, ph.*
FROM
	(
		SELECT *
		FROM pdt
		WHERE
			SearchFriendlyUrl = 'xxx-xxx-xxx' AND
			LOWER(Status) = 'active'
	) pdt
	INNER JOIN pig ON pig.pid = pdt.pid
	INNER JOIN ph ON ph.pid = pdt.pid
</pre>
<p>Showing rows 0 &#8211; 5 (6 total, Query took 0.0107 sec)</p>
<p>Here my optimization strategy was to reduce the number of rows returned by the joined tables as much as possible and then to join the tables using INNER JOIN clause instead of WHERE clause.</p>
<pre name="code" class="sql">
SELECT
	pdt.*,
	dtd.name as ProductType,
	IFNULL
	(
		(
			SELECT GROUP_CONCAT( dtd.name SEPARATOR ' ' )
			FROM pt
				INNER JOIN dtd on pt.tid = dtd.tid
				INNER JOIN dv on dv.vid = dtd.vid AND LOWER( dv.name ) = 'travel type'
			WHERE
				pt.pid = pdt.pid AND
				LOWER( dtd.name ) != 'classic'
			GROUP BY pt.pid
			LIMIT 1
		),
		'Travel'
	) TravelType,
	(
		SELECT country.Name countryName
		FROM pt
			INNER JOIN country ON country.TId = pt.TId
		WHERE pt.PId = pdt.PId and country.vid = 6
		ORDER BY field( countryName, 'Multi-Country' ) DESC
		LIMIT 1
	) ProductCountry
FROM pdt, ptx, dtd, dv
WHERE
	pdt.pid IN
	(
		SELECT pId
		FROM pdr
		WHERE
			pdr.pId = pdr.pId AND
			pdr.parent = '156'
	) AND
	ptx.pid = pdt.pId AND
	dtd.tid = ptx.tid AND
	LOWER( pdt.Status ) = 'active' AND
	dtd.vid = dv.vid AND
	LOWER( dv.name ) = 'product type';
</pre>
<p>Showing rows 0 &#8211; 1 (2 total, Query took 3.0657 sec)</p>
<pre name="code" class="sql">
SELECT
	pdt . * ,
	dtd.name AS ProductType,
	IFNULL
	(
		(
			SELECT GROUP_CONCAT( dtd.name SEPARATOR ' ' )
			FROM pt
				INNER JOIN dtd ON pt.tid = dtd.tid
				INNER JOIN dv ON dv.vid = dtd.vid
			WHERE
				pt.pid = pdt.pid AND
				LOWER( dtd.name ) != 'classic' AND
				LOWER( dv.name ) = 'travel type'
			GROUP BY pt.pid
			LIMIT 1
		),
		'Travel'
	) TravelType,
	(
		SELECT country.Name countryName
		FROM pt
			INNER JOIN country ON country.TId = pt.TId
		WHERE
			pt.PId = pdt.PId AND
			country.vid =6
		ORDER BY field( countryName, 'Multi-Country' ) DESC
		LIMIT 1
	) ProductCountry
FROM pdr
	INNER JOIN pdt ON pdr.pid = pdt.pid
	INNER JOIN ptx ON pdt.pid = ptx.pid
	INNER JOIN dtd ON ptx.tid = dtd.tid
	INNER JOIN dv ON dtd.vid = dv.vid
WHERE
	pdr.parent = '156' AND
	LOWER( pdt.Status ) = 'active' AND
	LOWER( dv.name ) = 'product type'
ORDER BY pId
</pre>
<p>Showing rows 0 &#8211; 1 (2 total, Query took 0.0047 sec)</p>
<p>If you look carefully at the query above, I have removed the use of IN clause from the previous query. This is proven to have improved the performance by 99.8% from 3.0657 sec to 0.0047 sec. Well it&#8217;s clear that the improvement gained was remarkably significant.</p>
<pre name="code" class="sql">
SELECT *
FROM
	(
		SELECT *
		FROM pd
		WHERE LOWER( status ) = 'active'
	) pd
	INNER JOIN
	(
		SELECT *
		FROM pe
		WHERE parent = '857'
	) pe ON pd.pid = pe.pId
</pre>
<p>Showing rows 0 &#8211; 1 (2 total, Query took 0.1062 sec)</p>
<pre name="code" class="sql">
SELECT *
FROM pd
	INNER JOIN pe ON pd.pid = pe.pId
WHERE
	pe.parent = '857' AND
	LOWER( pd.Status ) = 'active'
</pre>
<p>Showing rows 0 &#8211; 1 (2 total, Query took 0.0008 sec)</p>
<p>Again, looking at the numbers the improvement once again was quite significant. This is achieved by using WHERE clause in the main query instead of in each of the joined tables. This is apparently opposite to my discussion on the first example.</p>
<p>Well, I won&#8217;t go into detail on why and how these figures come from as I don&#8217;t think I have the capability to explain the logic behind the numbers. I will probably leave the assumption to you now. I hope these examples may help you in producing more efficient SQL queries during your development. Have fun!</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
<li><a href='http://blog.jloe.net/2009/06/15/web-performance-best-practices/' rel='bookmark' title='Permanent Link: Web Performance Best Practices'>Web Performance Best Practices</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=rNebN7a0S7Y:RlI-OsxXJ64:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=rNebN7a0S7Y:RlI-OsxXJ64:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=rNebN7a0S7Y:RlI-OsxXJ64:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=rNebN7a0S7Y:RlI-OsxXJ64:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=rNebN7a0S7Y:RlI-OsxXJ64:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/rNebN7a0S7Y" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/</feedburner:origLink></item>
		<item>
		<title>PHP ZipArchive corrupted</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/ERBErWL7g94/</link>
		<comments>http://blog.jloe.net/2009/07/06/php-ziparchive-corrupted/#comments</comments>
		<pubDate>Mon, 06 Jul 2009 06:47:17 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Troubleshoot]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[fix]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php_zip]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[ZipArchieve]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=592</guid>
		<description><![CDATA[
			
				
			
		
If you experienced a corrupted zip file produced by ZipArchive on WampServer you probably have come to the right place. Apparently there has been a discussion on this long time ago but looks like Wampserver still uses the old php_zip.dll.
Well, nothing much to write about as it&#8217;s quite straightforward. You might want to try downloading [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/06/22/image-manipulation-in-php/' rel='bookmark' title='Permanent Link: Image Manipulation in PHP'>Image Manipulation in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/03/16/microsoft-visual-c-debug-library/' rel='bookmark' title='Permanent Link: Microsoft Visual C++ Debug Library'>Microsoft Visual C++ Debug Library</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Zi4JgWi1l3aCzCTMTcujm1hNzks/0/da"><img src="http://feedads.g.doubleclick.net/~a/Zi4JgWi1l3aCzCTMTcujm1hNzks/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Zi4JgWi1l3aCzCTMTcujm1hNzks/1/da"><img src="http://feedads.g.doubleclick.net/~a/Zi4JgWi1l3aCzCTMTcujm1hNzks/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F07%2F06%2Fphp-ziparchive-corrupted%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F07%2F06%2Fphp-ziparchive-corrupted%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>If you experienced a corrupted zip file produced by ZipArchive on WampServer you probably have come to the right place. Apparently there has been a <a title="Discussion on the issue" href="http://pecl.php.net/bugs/bug.php?id=9278" target="_blank">discussion</a> on this long time ago but looks like Wampserver still uses the old php_zip.dll.</p>
<p>Well, nothing much to write about as it&#8217;s quite straightforward. You might want to try downloading the latest binary file <a title="Click to download" href="http://blog.jloe.net/wp-content/uploads/2009/07/jloe_php_zip.zip">here</a> to solve the issue. :)</p>
<p>Sources:</p>
<ul>
<li><a title="Click to check the site" href="http://pecl.php.net/bugs/bug.php?id=9278" target="_blank">Images files added with ZipArchive::addFile corrupt</a></li>
<li><a title="Click to check the site" href="http://www.mail-archive.com/php-bugs@lists.php.net/msg121851.html" target="_blank">Zip becomes corrupt when using ZipArchive</a></li>
<li><a title="Click to check the site" href="http://www.justskins.com/forums/39506-new-archive-corrupt-with-ziparchive-addfile-method-55114-2.html" target="_blank">Archive corrupt with ZipArchive::addFile method</a></li>
</ul>
<div id="_mcePaste" style="overflow: hidden; position: absolute; left: -10000px; top: 44px; width: 1px; height: 1px;">
<h1 id="toc-zip-becomes-corrupt-when-using-ziparchive"><span class="subject">Zip becomes corrupt when using ZipArchive</span></h1>
</div>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/06/22/image-manipulation-in-php/' rel='bookmark' title='Permanent Link: Image Manipulation in PHP'>Image Manipulation in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/03/16/microsoft-visual-c-debug-library/' rel='bookmark' title='Permanent Link: Microsoft Visual C++ Debug Library'>Microsoft Visual C++ Debug Library</a></li>
<li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/20/quick-and-easy-way-to-create-model-class-in-php/' rel='bookmark' title='Permanent Link: Quick and Easy Way to Create Model Class in PHP'>Quick and Easy Way to Create Model Class in PHP</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ERBErWL7g94:B6S5AdszdAg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ERBErWL7g94:B6S5AdszdAg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ERBErWL7g94:B6S5AdszdAg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ERBErWL7g94:B6S5AdszdAg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ERBErWL7g94:B6S5AdszdAg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/ERBErWL7g94" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/07/06/php-ziparchive-corrupted/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/07/06/php-ziparchive-corrupted/</feedburner:origLink></item>
		<item>
		<title>Matt Mullenweg speaks about Improving Web Performance</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/Gq9WCxVVVGg/</link>
		<comments>http://blog.jloe.net/2009/07/03/matt-mullenweg-speaks-about-improving-web-performance/#comments</comments>
		<pubDate>Fri, 03 Jul 2009 06:15:56 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[web performance]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wp]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=813</guid>
		<description><![CDATA[
			
				
			
		
Interesting and quite a coincidence I must say, to see another thought about web performance by Matt Mullenweg as recently I posted several posts about web performance: Web Performance Best Practices and One-Cent Tips to Increase Site Performance. For anyone who doesn&#8217;t know who is Matt Mullenweg, read more about him from Wikipedia. In short, [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/' rel='bookmark' title='Permanent Link: One-Cent Tips to Increase Site Performance'>One-Cent Tips to Increase Site Performance</a></li>
<li><a href='http://blog.jloe.net/2009/06/15/web-performance-best-practices/' rel='bookmark' title='Permanent Link: Web Performance Best Practices'>Web Performance Best Practices</a></li>
<li><a href='http://blog.jloe.net/2009/05/13/ways-to-publicize-your-personal-blog/' rel='bookmark' title='Permanent Link: Ways to Publicize Your Personal Blog'>Ways to Publicize Your Personal Blog</a></li>
<li><a href='http://blog.jloe.net/2009/06/30/typogriph-the-minimal-wordpress-theme/' rel='bookmark' title='Permanent Link: Typogriph the Minimal Wordpress theme'>Typogriph the Minimal Wordpress theme</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/retiring-snap-shots%e2%84%a2-plugin-for-wordpressorg/' rel='bookmark' title='Permanent Link: Retiring Snap Shots™ Plugin for Wordpress.org'>Retiring Snap Shots™ Plugin for Wordpress.org</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/fwen7b3qv7L5B7VH7P5SGjDJDDA/0/da"><img src="http://feedads.g.doubleclick.net/~a/fwen7b3qv7L5B7VH7P5SGjDJDDA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/fwen7b3qv7L5B7VH7P5SGjDJDDA/1/da"><img src="http://feedads.g.doubleclick.net/~a/fwen7b3qv7L5B7VH7P5SGjDJDDA/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F07%2F03%2Fmatt-mullenweg-speaks-about-improving-web-performance%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F07%2F03%2Fmatt-mullenweg-speaks-about-improving-web-performance%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Interesting and quite a coincidence I must say, to see <a title="Velocity and the Bottom line" href="http://ma.tt/2009/07/velocity-and-the-bottom-line/" target="_blank">another thought about web performance</a> by Matt Mullenweg as recently I posted several posts about web performance: <a title="Web Performance Best Practices" href="http://blog.jloe.net/2009/06/15/web-performance-best-practices/" target="_blank">Web Performance Best Practices</a> and <a title="One-Cent Tips to Increase Site Performance" href="http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/" target="_blank">One-Cent Tips to Increase Site Performance</a>. For anyone who doesn&#8217;t know who is Matt Mullenweg, read more about him from <a title="Read more about Matt Mullenweg" href="http://en.wikipedia.org/wiki/Matt_Mullenweg" target="_blank">Wikipedia</a>. In short, he is the co-founder of a well-known software most bloggers used &#8211; <a title="Wordpress site" href="http://wordpress.org" target="_blank">Wordpress</a>, and also a young entrepreneur living in San Fransisco. You may also want to check <a title="Matt Mullenweg" href="http://ma.tt/" target="_blank">his blog</a>.</p>
<p>There is a video of his recent talk in a technology conference where he spoke about how web performance is important and also shared his experience on handling these issues, mainly about his experiences in Wordpress and how the need for speed is really important.</p>
<p>Matt first talked about how Wordpress handles the 404 &#8211; aka Not Found page &#8211; causes a lot of performance overhead due to the fact that the 404 page generated by Wordpress is apparently database driven, unlike other static 404 pages. Matt also talked about how easy for developer to create a Wordpress plug-in and how these millions of plug-ins can contribute to the performance issue by introducing redundancies: multiple and identical javascript file inclusions in the HTML header. Therefore Wordpress created a new function for plug-in developers as a way to eliminate these redundancies.</p>
<p>He also spoke about how a millisecond can save time of people around the world <strong>collectively</strong>. He took a real example of his website <a title="WordPress.com" href="http://wordpress.com" target="_blank">WordPress.com</a> where millions of bloggers have been using as their blog sites and explained how a small performance efficiency or improvement can indirectly promote a more eco-friendly environment: saving servers processing time thus less power consumption.</p>
<p>Interesting issue he raised is also on his experience when Wordpress made a total revamp of its user interface and apparently they faced a lot of issues when viewed on Internet Explorer which I believe most web developers have been having as a painful and frustrating task which we are forced to conform :P.</p>
<p>He also highlighted a few times on his favourite quote by Joe Clark that reads &#8220;We&#8217;ve upped our standards, up yours&#8221; which was coined at the beginning of the adoption of web standards. Anyway, check the video below for a full coverage of his talk.</p>
<p><object style="width: 500px; height: 305px;" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="500" height="305" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://blip.tv/play/AYGM9CCLqzQ" /><embed style="width: 500px; height: 305px;" type="application/x-shockwave-flash" width="500" height="305" src="http://blip.tv/play/AYGM9CCLqzQ"></embed></object></p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/' rel='bookmark' title='Permanent Link: One-Cent Tips to Increase Site Performance'>One-Cent Tips to Increase Site Performance</a></li>
<li><a href='http://blog.jloe.net/2009/06/15/web-performance-best-practices/' rel='bookmark' title='Permanent Link: Web Performance Best Practices'>Web Performance Best Practices</a></li>
<li><a href='http://blog.jloe.net/2009/05/13/ways-to-publicize-your-personal-blog/' rel='bookmark' title='Permanent Link: Ways to Publicize Your Personal Blog'>Ways to Publicize Your Personal Blog</a></li>
<li><a href='http://blog.jloe.net/2009/06/30/typogriph-the-minimal-wordpress-theme/' rel='bookmark' title='Permanent Link: Typogriph the Minimal Wordpress theme'>Typogriph the Minimal Wordpress theme</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/retiring-snap-shots%e2%84%a2-plugin-for-wordpressorg/' rel='bookmark' title='Permanent Link: Retiring Snap Shots™ Plugin for Wordpress.org'>Retiring Snap Shots™ Plugin for Wordpress.org</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=Gq9WCxVVVGg:JXOJy_8N-E4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=Gq9WCxVVVGg:JXOJy_8N-E4:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=Gq9WCxVVVGg:JXOJy_8N-E4:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=Gq9WCxVVVGg:JXOJy_8N-E4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=Gq9WCxVVVGg:JXOJy_8N-E4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/Gq9WCxVVVGg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/07/03/matt-mullenweg-speaks-about-improving-web-performance/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/07/03/matt-mullenweg-speaks-about-improving-web-performance/</feedburner:origLink></item>
		<item>
		<title>Typogriph the Minimal Wordpress theme</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/GqGwZUZwirY/</link>
		<comments>http://blog.jloe.net/2009/06/30/typogriph-the-minimal-wordpress-theme/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 08:48:33 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[WordPress]]></category>
		<category><![CDATA[typogriph]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[wordpress theme]]></category>
		<category><![CDATA[wp]]></category>
		<category><![CDATA[wp theme]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=745</guid>
		<description><![CDATA[
			
				
			
		
Obvious enough, I just changed my theme from Fusion to a cleaner and lightweight theme called Typogriph as I had been looking around for a simple yet nice theme that suits my need. And finally came down to Typogriph as my best choice. There may be other popular theme called Thesis which most notable bloggers [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/25/display-excerpt-in-wordpress/' rel='bookmark' title='Permanent Link: Display Excerpt in WordPress'>Display Excerpt in WordPress</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/retiring-snap-shots%e2%84%a2-plugin-for-wordpressorg/' rel='bookmark' title='Permanent Link: Retiring Snap Shots™ Plugin for Wordpress.org'>Retiring Snap Shots™ Plugin for Wordpress.org</a></li>
<li><a href='http://blog.jloe.net/2009/04/29/most-useful-wordpress-plugins/' rel='bookmark' title='Permanent Link: Most Useful WordPress Plugins'>Most Useful WordPress Plugins</a></li>
<li><a href='http://blog.jloe.net/2009/05/13/ways-to-publicize-your-personal-blog/' rel='bookmark' title='Permanent Link: Ways to Publicize Your Personal Blog'>Ways to Publicize Your Personal Blog</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/AS7hBversaIZcudKEUIMabbQXbE/0/da"><img src="http://feedads.g.doubleclick.net/~a/AS7hBversaIZcudKEUIMabbQXbE/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/AS7hBversaIZcudKEUIMabbQXbE/1/da"><img src="http://feedads.g.doubleclick.net/~a/AS7hBversaIZcudKEUIMabbQXbE/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F30%2Ftypogriph-the-minimal-wordpress-theme%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F30%2Ftypogriph-the-minimal-wordpress-theme%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Obvious enough, I just changed my theme from <a title="Check fusion theme" href="http://wordpress.org/extend/themes/fusion" target="_blank">Fusion</a> to a cleaner and lightweight theme called <a title="Click to check the Typogriph theme" href="http://wp-content-themes.com/typogriph-a-free-fluid-wordpress-27-theme/150" target="_blank">Typogriph</a> as I had been looking around for a simple yet nice theme that suits my need. And finally came down to Typogriph as my best choice. There may be other popular theme called <a title="Click to check the Thesis theme" href="http://diythemes.com/thesis/" target="_blank">Thesis</a> which most notable bloggers have been using but unfortunately this theme doesn&#8217;t come for free. It is priced at $87 for personal use and $164 for developer&#8217;s option. You can check the price in detail <a title="Thesis price detail" href="http://diythemes.com/thesis/get-thesis/" target="_blank">here</a>.</p>
<p>The stuff that I like about this theme are:</p>
<h2 id="toc-minimalist">Minimalist</h2>
<p>Typogriph has a clean and minimal look and feel which hopefully results in more lightweight pages in order to give a <a title="Read on my tips to improve site performance" href="http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/" target="_blank">faster loading and browsing experience</a> &#8211; without relying so much on catchy images as well as heavy style sheet to appeal your readers.</p>
<h2 id="toc-just-a-switch">Just a Switch</h2>
<p>Changing to Typogriph from<a title="Check fusion theme" href="http://wordpress.org/extend/themes/fusion" target="_blank"></a> Fusion is just like pressing a switch. There was no hassle or other settings to make your pages to work correctly. With my activated plug-ins and just one or two tweaks to my <a title="Click to read more" href="http://wordpress.org/extend/plugins/adsense-manager/" target="_blank">AdSense</a> widgets and there I have it, my new theme.</p>
<h2 id="toc-fluid">Fluid</h2>
<p>Typogriph is a fluid theme which means that it makes full use of reader&#8217;s browser real estate and automatically adjusted when re-sized. This is definitely beneficial to meet various screen resolutions.</p>
<h2 id="toc-browser-compatibility">Browser Compatibility</h2>
<p>Tested to render well across various browsers like Firefox, IE (6, 7, 8), Apple Safari, and Google Chrome.</p>
<p><br />
On the contrary Typogriph does not render your page links well if you have pages as sub of other pages. The links were a mess so I had to fix that by moving sub pages as parent pages to quickly solve it. And everything else was acceptable and I love the arrangement of the widgets on the front page that showcases all my desired widgets, recent comments, and most popular posts.</p>
<p>In case you&#8217;re interested to explore other minimalist themes. Here are the sites I stumbled to.</p>
<ul>
<li><a title="Click to read more" rel="bookmark" href="http://speckyboy.com/2009/04/20/40-stylish-minimal-and-clean-free-wordpress-themes/" target="_blank">40 Stylish, Minimal and Clean Free Wordpress Themes</a></li>
<li><a title="Click to read more" href="http://www.cssjuice.com/18-minimalist-design-wordpress-themes/" target="_blank">18 Minimalist Design Wordpress Themes</a></li>
</ul>
<p>So how you feel about this theme? Let me know ;)</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/25/display-excerpt-in-wordpress/' rel='bookmark' title='Permanent Link: Display Excerpt in WordPress'>Display Excerpt in WordPress</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/retiring-snap-shots%e2%84%a2-plugin-for-wordpressorg/' rel='bookmark' title='Permanent Link: Retiring Snap Shots™ Plugin for Wordpress.org'>Retiring Snap Shots™ Plugin for Wordpress.org</a></li>
<li><a href='http://blog.jloe.net/2009/04/29/most-useful-wordpress-plugins/' rel='bookmark' title='Permanent Link: Most Useful WordPress Plugins'>Most Useful WordPress Plugins</a></li>
<li><a href='http://blog.jloe.net/2009/05/13/ways-to-publicize-your-personal-blog/' rel='bookmark' title='Permanent Link: Ways to Publicize Your Personal Blog'>Ways to Publicize Your Personal Blog</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=GqGwZUZwirY:GdNlgzf3jIw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=GqGwZUZwirY:GdNlgzf3jIw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=GqGwZUZwirY:GdNlgzf3jIw:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=GqGwZUZwirY:GdNlgzf3jIw:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=GqGwZUZwirY:GdNlgzf3jIw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/GqGwZUZwirY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/06/30/typogriph-the-minimal-wordpress-theme/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/06/30/typogriph-the-minimal-wordpress-theme/</feedburner:origLink></item>
		<item>
		<title>Image Manipulation in PHP</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/UEq3LVisG4w/</link>
		<comments>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 08:49:17 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[gd]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[image manipulation]]></category>
		<category><![CDATA[image processing]]></category>
		<category><![CDATA[imagemagick]]></category>
		<category><![CDATA[imagick]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php_gd2]]></category>
		<category><![CDATA[php_imagick]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[wampserver]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=665</guid>
		<description><![CDATA[
			
				
			
		
Sometimes there is a need to do simple image manipulation for certain web projects. Take for example a popular site called Flickr. Flickr is an image hosting site that allows online community to store pictures for others to view. And for some cases some uploaders may have big image files and hence a site like [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/download-torrent-from-web/' rel='bookmark' title='Permanent Link: Download Torrent from Web'>Download Torrent from Web</a></li>
<li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Lp36Y7DyiZSrGnyyvDpAMnfHKeU/0/da"><img src="http://feedads.g.doubleclick.net/~a/Lp36Y7DyiZSrGnyyvDpAMnfHKeU/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Lp36Y7DyiZSrGnyyvDpAMnfHKeU/1/da"><img src="http://feedads.g.doubleclick.net/~a/Lp36Y7DyiZSrGnyyvDpAMnfHKeU/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F22%2Fimage-manipulation-in-php%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F22%2Fimage-manipulation-in-php%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Sometimes there is a need to do simple image manipulation for certain web projects. Take for example a popular site called <a title="Click to go to Flickr" href="http://www.flickr.com/" target="_blank">Flickr</a>. Flickr is an image hosting site that allows online community to store pictures for others to view. And for some cases some uploaders may have big image files and hence a site like Flickr definitely needs some image processing to reduce the actual image into a smaller dimension, hence smaller file size, to allow quick view before actually downloading the actual size.</p>
<p>I&#8217;ve been working with <a title="Click to check about Zend Framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> quite sometime for web projects. I found it&#8217;s quite interesting to find that Zend Framework does not have any class to perform image manipulation even though a proposal for Zend_Image had been submitted to Zend community as a wrapper of existing PHP interfaces: <a title="Click to read more about GD." href="http://www.boutell.com/gd/" target="_blank">GD</a> and <a title="Click here to read about ImageMagick" href="http://www.imagemagick.org/" target="_blank">ImageMagick</a> but unfortunately <a title="Zend_Image proposal" href="http://framework.zend.com/wiki/display/ZFPROP/Zend_Image+Proposal+-+Davey+Shafik" target="_blank">the proposal</a> was not considered.</p>
<p>And for your information, GD which stands for &#8216;Gif Draw&#8217; is a standard PHP installation, unlike ImageMagick. If you wish to utilize these libraries, you need to have php extensions called php_gd2 and php_imagick respectively installed and enabled on the web server.</p>
<p>The noticeable difference between GD and ImageMagick is that GD simply does not support image format like <a title="Click to check more about TIFF" href="http://en.wikipedia.org/wiki/Tagged_Image_File_Format" target="_blank">TIFF</a> (Tagged Image File Format). If TIFF is not your issue then go for GD. And if you wish to make your development easier, you may be interested to use <a title="Click to download Thumbnail class" href="http://www.ajaxray.com/blog/2008/09/12/image-manipulation-in-zend-framework-with-php-thumbnailer-class-v20/" target="_blank">Thumbnail class</a> by our fellow developer. But if you&#8217;re looking into ImageMagick I&#8217;m going to show you the steps (from <a title="Click here to see the original post." href="http://sg.php.net/manual/en/imagick.setup.php" target="_blank">another site</a>) on how to install ImageMagick on your Windows web server as Windows installation is a bit tricky since &#8220;pecl install imagick&#8221; does NOT work properly.</p>
<ol>
<li>Download and install ImageMagick software from <a href="http://www.imagemagick.org/script/binary-releases.php#windows" target="_blank">http://www.imagemagick.org/script/binary-releases.php#windows</a>.</li>
<li>Download pecl-5.2-dev.zip (choose the version relevant to your PHP) from <a href="http://snaps.php.net/win32/" target="_blank">http://snaps.php.net/win32/</a></li>
<li>Copy php_imagick.dll from the archive you&#8217;ve downloaded to your PHP extension folder.</li>
<li>Add the following line to php.ini (in the extensions section):<br />
extension=php_imagick.dll</p>
<p>or on <a href="http://www.wampserver.com/en/" target="_blank" title="Click to go to WampServer official site">WampServer</a> click WampServer icon on taskbar, go to PHP &gt; php.ini and add the above entry.</li>
<li>Restart your server.</li>
<li>Try this example script below to verify your installation.
<pre name="code" class="php">header('Content-type: image/tif');

$image = new Imagick('example.tif');
// Create thumbnail for the specified image file.
$image-&gt;thumbnailImage(100, 0);

echo $image;</pre>
<p>The script should display the image thumbnail with a maximum width of 100 pixels.</li>
</ol>
<p>If you find the above steps are difficult to follow you may want to download php_imagick.dll <a title="Click to download" href="http://blog.jloe.net/wp-content/uploads/2009/06/php_imagick.zip">here</a> and start from step 3. And if you need help with these libraries, check the manual pages for <a title="Click to see the manual page." href="http://us3.php.net/manual/en/ref.image.php" target="_blank">GD</a> and <a title="Click to see the manual page." href="http://us3.php.net/manual/en/book.imagick.php" target="_blank">ImageMagick</a>.</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/04/23/start-soap-with-zend-framework/' rel='bookmark' title='Permanent Link: Start SOAP with Zend Framework'>Start SOAP with Zend Framework</a></li>
<li><a href='http://blog.jloe.net/2009/05/05/read-remote-content-or-file-using-zend/' rel='bookmark' title='Permanent Link: Read Remote Content or File using Zend'>Read Remote Content or File using Zend</a></li>
<li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
<li><a href='http://blog.jloe.net/2009/05/23/download-torrent-from-web/' rel='bookmark' title='Permanent Link: Download Torrent from Web'>Download Torrent from Web</a></li>
<li><a href='http://blog.jloe.net/2009/12/24/zend-caveats/' rel='bookmark' title='Permanent Link: Zend Caveats'>Zend Caveats</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=UEq3LVisG4w:8niTpsfub7o:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=UEq3LVisG4w:8niTpsfub7o:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=UEq3LVisG4w:8niTpsfub7o:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=UEq3LVisG4w:8niTpsfub7o:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=UEq3LVisG4w:8niTpsfub7o:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/UEq3LVisG4w" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/06/22/image-manipulation-in-php/</feedburner:origLink></item>
		<item>
		<title>Web Performance Best Practices</title>
		<link>http://feedproxy.google.com/~r/jwloe/~3/ezRm_XO2uQg/</link>
		<comments>http://blog.jloe.net/2009/06/15/web-performance-best-practices/#comments</comments>
		<pubDate>Mon, 15 Jun 2009 07:29:56 +0000</pubDate>
		<dc:creator>Jonathan</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[best practices]]></category>
		<category><![CDATA[firefox add-on]]></category>
		<category><![CDATA[how to]]></category>
		<category><![CDATA[page speed]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[web performance]]></category>
		<category><![CDATA[website]]></category>

		<guid isPermaLink="false">http://blog.jloe.net/?p=621</guid>
		<description><![CDATA[
			
				
			
		
Following-up my previous post on how to increase site performance. I received an email from my lead about a Firefox add-on named &#8220;Page Speed&#8221; that helps analyze a site performance.
In brief, Page Speed is an open-source Firefox/Firebug Add-on. Webmasters and web developers can use Page Speed to evaluate the performance of their web pages and [...]


Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/07/03/matt-mullenweg-speaks-about-improving-web-performance/' rel='bookmark' title='Permanent Link: Matt Mullenweg speaks about Improving Web Performance'>Matt Mullenweg speaks about Improving Web Performance</a></li>
<li><a href='http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/' rel='bookmark' title='Permanent Link: One-Cent Tips to Increase Site Performance'>One-Cent Tips to Increase Site Performance</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
<li><a href='http://blog.jloe.net/2009/06/22/image-manipulation-in-php/' rel='bookmark' title='Permanent Link: Image Manipulation in PHP'>Image Manipulation in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/Doogse96AQbkzyCS9hTzDoYV7tw/0/da"><img src="http://feedads.g.doubleclick.net/~a/Doogse96AQbkzyCS9hTzDoYV7tw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Doogse96AQbkzyCS9hTzDoYV7tw/1/da"><img src="http://feedads.g.doubleclick.net/~a/Doogse96AQbkzyCS9hTzDoYV7tw/1/di" border="0" ismap="true"></img></a></p><div class="tweetmeme_button" style="float:right;margin-left:10px;">
			<a href="http://api.tweetmeme.com/share?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F15%2Fweb-performance-best-practices%2F"><br />
				<img src="http://api.tweetmeme.com/imagebutton.gif?url=http%3A%2F%2Fblog.jloe.net%2F2009%2F06%2F15%2Fweb-performance-best-practices%2F&amp;source=jwloe&amp;style=normal" height="61" width="50" /><br />
			</a>
		</div>
<p>Following-up <a href="/2009/05/28/one-cent-tips-to-increase-site-performance/">my previous post</a> on how to increase site performance. I received an email from my lead about a Firefox add-on named &#8220;Page Speed&#8221; that helps analyze a site performance.</p>
<p>In brief, <a href="http://code.google.com/speed/page-speed/">Page Speed</a> is an open-source Firefox/Firebug Add-on. Webmasters and web developers can use Page Speed to evaluate the performance of their web pages and to get suggestions on how to improve them.</p>
<p>Page Speed works by performing several tests on a site&#8217;s web server configuration and front-end code. These tests are based on a set of best practices known to enhance web page performance. Webmasters who run Page Speed on their pages get a set of scores for each page, as well as helpful suggestions on how to improve its performance.</p>
<p>But that&#8217;s not all, the good stuff is its article <a href="http://code.google.com/speed/page-speed/docs/rules_intro.html">&#8220;Performance Best Practices&#8221;</a> which explains in detail all aspects on what needs to be done to improve your site: from network (DNS, server settings) to browser layer (CSS, JavaScript, image, compression) which extends <a href="/2009/05/28/one-cent-tips-to-increase-site-performance/">my previous post</a> in greater detail.</p>
<p>However these best practices may not be the complete solutions, in my opinion. If your site deals with dynamic content, there should be programming logic behind the content. This means whoever creates the logic has to utilize the best logic for highest efficiency in terms of computation. And if your site deals with a database, optimizing the queries to the designated database is also required.</p>
<p>Ultimately basic rules for programming are to avoid redundancy and to distribute computation load whenever possible.</p>


<p>Don't leave just yet! You may also be interested to take a quick look at my other posts.<ol><li><a href='http://blog.jloe.net/2009/07/03/matt-mullenweg-speaks-about-improving-web-performance/' rel='bookmark' title='Permanent Link: Matt Mullenweg speaks about Improving Web Performance'>Matt Mullenweg speaks about Improving Web Performance</a></li>
<li><a href='http://blog.jloe.net/2009/05/28/one-cent-tips-to-increase-site-performance/' rel='bookmark' title='Permanent Link: One-Cent Tips to Increase Site Performance'>One-Cent Tips to Increase Site Performance</a></li>
<li><a href='http://blog.jloe.net/2009/08/11/sql-queries-performance-findings-on-mysql/' rel='bookmark' title='Permanent Link: SQL Queries Performance Findings on MySql'>SQL Queries Performance Findings on MySql</a></li>
<li><a href='http://blog.jloe.net/2009/06/22/image-manipulation-in-php/' rel='bookmark' title='Permanent Link: Image Manipulation in PHP'>Image Manipulation in PHP</a></li>
<li><a href='http://blog.jloe.net/2009/12/19/simple-steps-to-start-wcf-with-visual-studio-2008/' rel='bookmark' title='Permanent Link: Simple Steps to Start WCF with Visual Studio 2008'>Simple Steps to Start WCF with Visual Studio 2008</a></li>
</ol></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ezRm_XO2uQg:EcySiF_N7Sg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/jwloe?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ezRm_XO2uQg:EcySiF_N7Sg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ezRm_XO2uQg:EcySiF_N7Sg:D7DqB2pKExk" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/jwloe?d=dnMXMwOfBR0" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/jwloe?i=ezRm_XO2uQg:EcySiF_N7Sg:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/jwloe?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/jwloe?a=ezRm_XO2uQg:EcySiF_N7Sg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/jwloe?d=yIl2AUoC8zA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/jwloe/~4/ezRm_XO2uQg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://blog.jloe.net/2009/06/15/web-performance-best-practices/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://blog.jloe.net/2009/06/15/web-performance-best-practices/</feedburner:origLink></item>
	</channel>
</rss>
