<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Jorge Cortés</title>
	<atom:link href="http://www.jcortes.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jcortes.net</link>
	<description>Evolución</description>
	<lastBuildDate>Thu, 26 Nov 2009 05:37:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>The orange juice theory</title>
		<link>http://www.jcortes.net/2009/11/the-orange-juice-theory/</link>
		<comments>http://www.jcortes.net/2009/11/the-orange-juice-theory/#comments</comments>
		<pubDate>Thu, 26 Nov 2009 05:37:38 +0000</pubDate>
		<dc:creator>jorge.cortes</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.jcortes.net/?p=173</guid>
		<description><![CDATA[There was a man that wants to put a new business, the first and only rule was: It must to be simple.
As the time pass he though that selling orange juice will be the simplest and profiting business because he lives near of an orange farm so he could go and talk with the farmer [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_176" class="wp-caption alignright" style="width: 160px"><img class="size-thumbnail wp-image-176" title="Orange juice" src="http://www.jcortes.net/wp-content/uploads/2009/11/orange_juice2-150x150.jpg" alt="Oranges" width="150" height="150" /><p class="wp-caption-text">Orange juice</p></div>
<p>There was a man that wants to put a new business, the first and only rule was: It must to be simple.</p>
<p>As the time pass he though that selling orange juice will be the simplest and profiting business because he lives near of an orange farm so he could go and talk with the farmer and get a very good price.</p>
<p>So the business starts and this is what it happened.</p>
<p><span id="more-173"></span></p>
<p><strong>DAY ONE:</strong></p>
<ol>
<li> One employee</li>
<li> Six customers</li>
<li> Four sales</li>
<li> Two customer asking for apple juice</li>
</ol>
<p><strong>DAY TWO:</strong></p>
<ol>
<li> One employee</li>
<li> Twenty customers</li>
<li> Fifteen sales</li>
<li> Five customers asking for apple juice</li>
</ol>
<p><strong>DAY THREE:</strong></p>
<ol>
<li> One employee</li>
<li> Forty customers</li>
<li> Twenty eight sales</li>
<li> Twelve customers asking for apple juice</li>
</ol>
<p>At this point of the business the owner knows that he can&#8217;t continue working by itself so he hire more people to work at the company (yes now is a company).</p>
<p><strong>DAY FOUR:</strong></p>
<ol>
<li> The sales team (One employee)</li>
<li> The squeeze team (Two employees)</li>
<li> Eighty customers</li>
<li> Seventy one sales</li>
<li> Nine customers asking for apple juice</li>
</ol>
<p>There was a problem, several customers complains about their juice, they said the juice taste bad. So new team was created.</p>
<p><strong>DAY FIVE:</strong></p>
<ol>
<li> The sales team (One employee)</li>
<li> The squeeze team (Two employees)</li>
<li> The quality assurance team (Two employees)</li>
<li> The customers were a lot</li>
<li> There was still people asking for apple juice</li>
</ol>
<p>The owner hire more and more people, create new teams with funny names, the owner doesn&#8217;t even go to the juice place because he was busy with other company duties.</p>
<p><strong>DAY TWENTY EIGHT:</strong></p>
<ol>
<li> The sales team (Four employees)</li>
<li> The squeeze team (Twelve employees)</li>
<li> The quality assurance team (Seven employees)</li>
<li> The accountant team (Two employees)</li>
<li> More teams.</li>
<li> More and more people asking for apple juice (what&#8217;s wrong with this people)</li>
</ol>
<p>At the end he even hire consulting groups.</p>
<p>The conclusion is: &#8220;No meter how simple the things starts, you always finish with a complete mess and people asking for apple juice (Seriously, what&#8217;s wrong with this people).&#8221;</p>
<!-- Easy AdSense V2.41 -->
<!-- Post[count: 2] -->
<div class="ezAdsense adsense adsense-leadout" style="text-align:center;margin:12px;"><script type="text/javascript"><!--
google_ad_client = "pub-1843829130564710";
/* 468x60, creado 22/03/09 */
google_ad_slot = "4362362009";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></div>]]></content:encoded>
			<wfw:commentRss>http://www.jcortes.net/2009/11/the-orange-juice-theory/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>El patrón Singleton</title>
		<link>http://www.jcortes.net/2009/11/el-patron-singleton/</link>
		<comments>http://www.jcortes.net/2009/11/el-patron-singleton/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 20:54:22 +0000</pubDate>
		<dc:creator>jorge.cortes</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[patrones de diseño]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://www.jcortes.net/?p=163</guid>
		<description><![CDATA[Este patrón de diseño nos permite crear una sola instancia de una clase que puede ser accesada en cualquier parte de nuestro sistema, aunque puede ser tomado como si fuera una variable globals es algo diferente.
Normalmente el Singleton se utiliza cuando se requiere conservar propiedades durante el tiempo de vida de la applicación, es decir, [...]]]></description>
			<content:encoded><![CDATA[<p>Este patrón de diseño nos permite crear una sola instancia de una clase que puede ser accesada en cualquier parte de nuestro sistema, aunque puede ser tomado como si fuera una variable globals es algo diferente.</p>
<p>Normalmente el Singleton se utiliza cuando se requiere conservar propiedades durante el tiempo de vida de la applicación, es decir, en lo que dura la ejecución de la página actual.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> 
<span style="color: #000000; font-weight: bold;">class</span> UsersOnline
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000088;">$arrUsers</span> <span style="color: #339933;">=</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">private</span> static <span style="color: #000088;">$oInstance</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">function</span> __construct<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> static <span style="color: #000000; font-weight: bold;">function</span> getInstance<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$oInstance</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$oInstance</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> UsersOnline<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">self</span><span style="color: #339933;">::</span><span style="color: #000088;">$oInstance</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> setUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$numId</span><span style="color: #339933;">,</span> <span style="color: #000088;">$oUser</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">arrUsers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$numId</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000088;">$oUser</span><span style="color: #339933;">;</span>  
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getUser<span style="color: #009900;">&#40;</span><span style="color: #000088;">$numId</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #b1b100;">return</span> <span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">arrUsers</span><span style="color: #009900;">&#91;</span><span style="color: #000088;">$numId</span><span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

<p>Ahora veamos como se utiliza por medio de un pequeño trozo de código.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
<span style="color: #b1b100;">include_once</span> <span style="color: #0000ff;">'./UsersOnline.php'</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$oSingleton</span> <span style="color: #339933;">=</span> UsersOnline<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000088;">$oSingleton</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setUser</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">12345</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'name'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #0000ff;">'jorge'</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #990000;">unset</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$oSingleton</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000088;">$oOtherInstance</span> <span style="color: #339933;">=</span> UsersOnline<span style="color: #339933;">::</span><span style="color: #004000;">getInstance</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #990000;">var_dump</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$oOtherInstance</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getUser</span><span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">12345</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></td></tr></table></div>

<p>La salida del script anterior nos muestra que aunque se boro la instancia <em>$oSingleton</em> por medio de <strong>unset()</strong>, las propiedades siguen aun existiendo.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">array<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">1</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #7a0874; font-weight: bold;">&#123;</span>
  <span style="color: #7a0874; font-weight: bold;">&#91;</span><span style="color: #ff0000;">&quot;name&quot;</span><span style="color: #7a0874; font-weight: bold;">&#93;</span>=<span style="color: #000000; font-weight: bold;">&gt;</span>
  string<span style="color: #7a0874; font-weight: bold;">&#40;</span><span style="color: #000000;">5</span><span style="color: #7a0874; font-weight: bold;">&#41;</span> <span style="color: #ff0000;">&quot;jorge&quot;</span>
<span style="color: #7a0874; font-weight: bold;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jcortes.net/2009/11/el-patron-singleton/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ZendCon 2009</title>
		<link>http://www.jcortes.net/2009/11/zendcon-2009/</link>
		<comments>http://www.jcortes.net/2009/11/zendcon-2009/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 09:58:27 +0000</pubDate>
		<dc:creator>jorge.cortes</dc:creator>
				<category><![CDATA[Eventos]]></category>
		<category><![CDATA[Programación]]></category>
		<category><![CDATA[conferencias]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">http://www.jcortes.net/?p=158</guid>
		<description><![CDATA[Este año tuve la oportunidad de asistir al ZendCon 2009  y verdaderamente fue fantástico poder conocer a la gente detras de Zend y alguno que otro programador que hace posible que tengamos PHP funcionando.
Las platicas estuvieron geniales, aquí les dejo unas cuantas fotos del evento.
     
]]></description>
			<content:encoded><![CDATA[<p>Este año tuve la oportunidad de asistir al <a href="http://www.zendcon.com">ZendCon 2009</a>  y verdaderamente fue fantástico poder conocer a la gente detras de Zend y alguno que otro programador que hace posible que tengamos PHP funcionando.</p>
<p>Las platicas estuvieron geniales, aquí les dejo unas cuantas fotos del evento.</p>
<p><a href="http://farm3.static.flickr.com/2642/4062970865_4f8aca3c42.jpg" title="19102009150" rel="lightbox[158]"><img src="http://farm3.static.flickr.com/2642/4062970865_4f8aca3c42_t.jpg" alt="19102009150" width="75" height="100" class="slickr-post" /></a> <a href="http://farm3.static.flickr.com/2738/4063731482_36638a6ae7.jpg" title="21102009161" rel="lightbox[158]"><img src="http://farm3.static.flickr.com/2738/4063731482_36638a6ae7_t.jpg" alt="21102009161" width="100" height="75" class="slickr-post" /></a> <a href="http://farm4.static.flickr.com/3511/4062976155_0612a9ac5b.jpg" title="20102009158" rel="lightbox[158]"><img src="http://farm4.static.flickr.com/3511/4062976155_0612a9ac5b_t.jpg" alt="20102009158" width="100" height="75" class="slickr-post" /></a> <a href="http://farm3.static.flickr.com/2558/4062965127_8359d88983.jpg" title="20102009154" rel="lightbox[158]"><img src="http://farm3.static.flickr.com/2558/4062965127_8359d88983_t.jpg" alt="20102009154" width="100" height="75" class="slickr-post" /></a> <a href="http://farm3.static.flickr.com/2612/4062967867_fc6966aa1a.jpg" title="21102009159" rel="lightbox[158]"><img src="http://farm3.static.flickr.com/2612/4062967867_fc6966aa1a_t.jpg" alt="21102009159" width="100" height="75" class="slickr-post" /></a> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jcortes.net/2009/11/zendcon-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flickr@jcortes.net</title>
		<link>http://www.jcortes.net/2009/03/flickrjcortesnet/</link>
		<comments>http://www.jcortes.net/2009/03/flickrjcortesnet/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 07:49:41 +0000</pubDate>
		<dc:creator>jorge.cortes</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[fotos]]></category>

		<guid isPermaLink="false">http://www.jcortes.net/?p=137</guid>
		<description><![CDATA[Siguiendo con las actualizaciones de mi blog hoy instale el plugin para ligar mi cuenta de flickr con el blog: &#8220;¡Fotos a mí!&#8221;
  
]]></description>
			<content:encoded><![CDATA[<p>Siguiendo con las actualizaciones de mi blog hoy instale el plugin para ligar mi cuenta de flickr con el blog: &#8220;¡Fotos a mí!&#8221;</p>
<p><a title="S5000744" href="http://farm4.static.flickr.com/3656/3384665874_2e48debc23.jpg" rel="lightbox[137]"><img class="slickr-post" src="http://farm4.static.flickr.com/3656/3384665874_2e48debc23_t.jpg" alt="S5000744" width="100" height="75" /></a> <a title="S5000748" href="http://farm4.static.flickr.com/3430/3384668418_9e0341e7e0.jpg" rel="lightbox[137]"><img class="slickr-post" src="http://farm4.static.flickr.com/3430/3384668418_9e0341e7e0_t.jpg" alt="S5000748" width="100" height="75" /></a> <a title="S5000753" href="http://farm4.static.flickr.com/3420/3384670216_e7912a4ebf.jpg" rel="lightbox[137]"><img class="slickr-post" src="http://farm4.static.flickr.com/3420/3384670216_e7912a4ebf_t.jpg" alt="S5000753" width="75" height="100" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jcortes.net/2009/03/flickrjcortesnet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Syntax highlighting</title>
		<link>http://www.jcortes.net/2009/03/syntax-highlighting/</link>
		<comments>http://www.jcortes.net/2009/03/syntax-highlighting/#comments</comments>
		<pubDate>Sun, 22 Mar 2009 20:24:23 +0000</pubDate>
		<dc:creator>jorge.cortes</dc:creator>
				<category><![CDATA[Programación]]></category>
		<category><![CDATA[highlighting]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[syntax]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.jcortes.net/?p=94</guid>
		<description><![CDATA[Acábo de actualizar la version de mi wordpress,  además añadí un plugin nuevo para resaltar código, y este post es solo para realizar una prueba y ver como funciona.

1
2
3
&#60;?php
    echo &#34;Hi blog!&#34;;
?&#62;

]]></description>
			<content:encoded><![CDATA[<p>Acábo de actualizar la version de mi wordpress,  además añadí un plugin nuevo para resaltar código, y este post es solo para realizar una prueba y ver como funciona.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
</pre></td><td class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
    <span style="color: #b1b100;">echo</span> <span style="color: #0000ff;">&quot;Hi blog!&quot;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jcortes.net/2009/03/syntax-highlighting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
