<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/rss2full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><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" version="2.0">

<channel>
	<title>Mellow Morning</title>
	
	<link>http://www.mellowmorning.com</link>
	<description>Blogging the world of IT and Business</description>
	<pubDate>Sun, 11 May 2008 14:11:42 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5.1</generator>
	<language>en</language>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/MellowMorning" type="application/rss+xml" /><feedburner:emailServiceId xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">1161075</feedburner:emailServiceId><feedburner:feedburnerHostname xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">http://www.feedburner.com</feedburner:feedburnerHostname><item>
		<title>Have a Cookie</title>
		<link>http://www.mellowmorning.com/2008/02/07/have-a-cookie/</link>
		<comments>http://www.mellowmorning.com/2008/02/07/have-a-cookie/#comments</comments>
		<pubDate>Thu, 07 Feb 2008 14:27:22 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Prototype]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2008/02/07/have-a-cookie/</guid>
		<description><![CDATA[Here a nice little cookie wrapper. It&#8217;s mainly based on the Quirksmode code with some nice Prototype style.
Have a look:
var cookieJar = Class.create();
cookieJar.prototype = {
initialize: function() {},
write: function(name,value,days) {
if (days) {
var date = new Date();
date.setTime(date.getTime()+(days*24*60*60*1000));
var expires = "; expires="+date.toGMTString();
}
else var expires = '';
document.cookie = name + '=' + value + expires + '; path=/';
},
writeJSON: function(name,value,days) [...]]]></description>
			<content:encoded><![CDATA[<p>Here a nice little cookie wrapper. It&#8217;s mainly based on the <a href="http://www.quirksmode.org/js/cookies.html" target="_blank">Quirksmode</a> code with some nice Prototype style.</p>
<p>Have a look:</p>
<p><code>var cookieJar = Class.create();<br />
cookieJar.prototype = {<br />
initialize: function() {},<br />
write: function(name,value,days) {<br />
if (days) {<br />
var date = new Date();<br />
date.setTime(date.getTime()+(days*24*60*60*1000));<br />
var expires = "; expires="+date.toGMTString();<br />
}<br />
else var expires = '';<br />
document.cookie = name + '=' + value + expires + '; path=/';<br />
},<br />
writeJSON: function(name,value,days) {<br />
var JSONvalue = $H(value).toJSON();<br />
this.write(name,JSONvalue,days);<br />
},<br />
read: function(name) {<br />
var nameEQ = name + '=';<br />
var ca = document.cookie.split(';');<br />
for(var i=0;i &lt; ca.length;i++) {<br />
var c = ca[i];<br />
while (c.charAt(0)==&#8217; &#8216;) c = c.substring(1,c.length);<br />
if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);<br />
}<br />
return false;<br />
},<br />
readJSON: function(name) {<br />
var value = this.read(name) || &#8216;{}&#8217;;<br />
value = value.evalJSON();<br />
return value;<br />
},<br />
erase: function (name) {<br />
this.create(name,&#8221;",-1);<br />
}<br />
};<br />
cJar = new cookieJar();</code></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/231012170" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2008/02/07/have-a-cookie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Design Patterns</title>
		<link>http://www.mellowmorning.com/2008/01/30/design-patterns/</link>
		<comments>http://www.mellowmorning.com/2008/01/30/design-patterns/#comments</comments>
		<pubDate>Wed, 30 Jan 2008 18:29:27 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2008/01/30/design-patterns/</guid>
		<description><![CDATA[Just a link this time, great reference on design patterns:
http://www.mcdonaldland.info/2007/11/28/40/
]]></description>
			<content:encoded><![CDATA[<p>Just a link this time, great reference on design patterns:<br />
<a href="http://www.mcdonaldland.info/2007/11/28/40/">http://www.mcdonaldland.info/2007/11/28/40/</a></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/226038770" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2008/01/30/design-patterns/feed/</wfw:commentRss>
		</item>
		<item>
		<title>A new job! - but no Symfony</title>
		<link>http://www.mellowmorning.com/2008/01/20/a-new-job-but-no-symfony/</link>
		<comments>http://www.mellowmorning.com/2008/01/20/a-new-job-but-no-symfony/#comments</comments>
		<pubDate>Sun, 20 Jan 2008 22:43:04 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2008/01/20/a-new-job-but-no-symfony/</guid>
		<description><![CDATA[Note: We are actively seeking to hire exceptional PHP programmers. More on the job offering at the bottom of this posts.
After one of my posts got featured on Ajaxian many interesting offers hit my mailbox.  One of them was actually from a startup right here in Rotterdam called ZeroBubble. I was happily surprised to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Note</strong>: We are actively seeking to hire exceptional PHP programmers. More on the job offering at the bottom of this posts.</p>
<p><a href="http://www.zerobubble.nl" target="_blank" title="Zero Bubble"><img src="http://www.mellowmorning.com/wp-content/uploads/2008/01/logo-zerobubble.gif" alt="Zero Bubble" style="padding: 5px; float: right" /></a>After one of my posts got featured on <a href="http://www.ajaxian.com/">Ajaxian</a> many interesting offers hit my mailbox.  One of them was actually from a startup right here in Rotterdam called ZeroBubble. I was happily surprised to find an IT startup in Rotterdam. Especially since after talking to them it became clear that they operate at the highest level of technical possibilities and have an absolutely amazing team. Two months ago I happily joined their ranks.</p>
<p><a href="http://www.youtellme.com" title="YouTellMe"><img src="http://www.mellowmorning.com/wp-content/uploads/2008/01/logo-youtellme.gif" alt="YouTellMe" style="padding: 5px; float: right; margin-right: -20px" /></a></p>
<p>The project we are working on is called YouTellMe. I don&#8217;t want to share too much about it right now, but surely I will have plenty of exciting blog posts coming up in the next months.<br />
Currently we are working with some of the nicest tech on the net. To give some examples: our admin interface is written entirely in ExtJs, the site&#8217;s search is powered by Lucene, we use prototype 1.6 for great object extending, for ajax functionality we use yahoo history manager to keep it bookmarkable, the entire site has been optimized according to the Yslow principles and we are doing some interesting things with openSocial. Given all these you can&#8217;t help but wonder why we aren&#8217;t using Symfony.</p>
<h3>Why no Symfony?</h3>
<p>Personally I am a huge fan of the Symfony framework. The team at Sensio has done an absolutely amazing job. My opinion on the framework is best described by these blog posts <a href="http://www.mellowmorning.com/2007/08/18/ten-reasons-why-symfony-rocks-part-1/" target="_blank">Part1</a>, <a href="http://www.mellowmorning.com/2007/09/08/ten-reasons-why-symfony-rocks-part-2/" target="_blank">Part2</a>. However the current project we are working on has some special requirements. First of all the application&#8217;s calculations are very harsh on the servers. Combine this with a large amount of AJAX and you have some serious performance issues. The calculation speed has been pretty optimized by a colleague of mine, who wrote a python daemon for the task. Still it is essential to keep the PHP framework&#8217;s overhead to a minimum. Prior to my employment at this company it was decided that Symfony would be too slow to handle the task. This is a topic which often nags Symfony.</p>
<p>I am curious how fast Symfony can be. For the YouTellMe site I need a bootstrapped and blazingly fast framework. In the coming weeks I&#8217;ll be setting up some tests too see how Symfony compares to our home build framework. As a starters I&#8217;ll definitely relieve Symfony from the ORM and fancy routing. From there on I will need to test to see which components are slow and can be removed. The clean and flexible programming in Symfony should make this easy to do.</p>
<p>Our current framework is very lightweight. It even does not do auto loading. I for one have no clue what the speed gain is from not using auto loading and it would also be interesting to test it. The MVC structure is entirely home build, but the rest of the features use Zend.</p>
<p>If there are readers of this blog, which have gone through the process of stripping Symfony, be sure to leave some tips in the comments!</p>
<h4 id="jobs">Jobs at ZeroBubble</h4>
<p>ZeroBubble is currently recruiting talented PHP programmers in the Rotterdam area. We are located in the Beurs World Trade center. If you are into the latest technology and like to work with great people, software and hardware be sure to email me at thierry [at] zerobubble [dot] nl or my boss at joost [at] zerobubble [dot] nl. As mentioned we work with fun software such as Ext Js, Lucene, Zend, object oriented js with Prototype 1.6, yahoo history, Yslow principles and openSocial.<br />
We are looking for both full and partime PHP programmers. Python, ExtJs, prototype, server admin, subversion and memcached knowledge are all nice extras. As a main quality though, you have to be excited about building a unique and amazing web application.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/220049460" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2008/01/20/a-new-job-but-no-symfony/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Is the php native json_encode really broken?</title>
		<link>http://www.mellowmorning.com/2007/12/20/is-the-php-native-json_encode-really-broken/</link>
		<comments>http://www.mellowmorning.com/2007/12/20/is-the-php-native-json_encode-really-broken/#comments</comments>
		<pubDate>Thu, 20 Dec 2007 23:48:32 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/12/20/is-the-php-native-json_encode-really-broken/</guid>
		<description><![CDATA[It sure seems so:
The php:
var_dump(array('mynumber'=&#62;42.2));
var_dump(json_encode(array('mynumber'=&#62;42.2)));
The result:
array(1) {
["mynumber"]=&#62;
float(42,2)
}
string(17) &#8220;{&#8221;mynumber&#8221;:42,2}&#8221;
Notice the 42,2.
&#8216;42,2&#8242; or &#8220;42.2&#8243; or 42.2 would have all been fine, but 42,2 obviously invalidates your json object.
The problem seems to arise from my &#8216;nl&#8217; internationalization setting in php. I&#8217;m guessing the same problem will occur with any language which uses the comma for decimal separations.
Currently I [...]]]></description>
			<content:encoded><![CDATA[<p>It sure seems so:</p>
<p>The php:<br />
<code>var_dump(array('mynumber'=&gt;42.2));<br />
var_dump(json_encode(array('mynumber'=&gt;42.2)));</code></p>
<p>The result:<br />
<code>array(1) {<br />
["mynumber"]=&gt;<br />
float(42,2)<br />
}<br />
string(17) &#8220;{&#8221;mynumber&#8221;:42,2}&#8221;</code></p>
<p>Notice the 42,2.<br />
&#8216;42,2&#8242; or &#8220;42.2&#8243; or 42.2 would have all been fine, but 42,2 obviously invalidates your json object.</p>
<p>The problem seems to arise from my &#8216;nl&#8217; internationalization setting in php. I&#8217;m guessing the same problem will occur with any language which uses the comma for decimal separations.</p>
<p>Currently I am solving this problem by typecasting my number to a string, but there has to be a better approach.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/203704761" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/12/20/is-the-php-native-json_encode-really-broken/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Pake: propel-build-all-save-mysql</title>
		<link>http://www.mellowmorning.com/2007/11/11/pake-propel-build-all-save-mysql/</link>
		<comments>http://www.mellowmorning.com/2007/11/11/pake-propel-build-all-save-mysql/#comments</comments>
		<pubDate>Sun, 11 Nov 2007 23:54:48 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/11/pake-propel-build-all-save-mysql/</guid>
		<description><![CDATA[I tended to use fixtures in order to save my data before propel-build-all commands. In a discussion on syncing development database structure with production, Mike mentioned he uses mysqldumps. This is actually not a bad idea, given that it is faster and less error prone (propel will never bug you). The downside is off course [...]]]></description>
			<content:encoded><![CDATA[<p>I tended to use fixtures in order to save my data before <a href="http://www.symfony-project.com/cookbook/1_0/cli">propel-build-all</a> commands. In a discussion on <a href="http://groups.google.com/group/symfony-users/browse_thread/thread/21456f8db6c99d9">syncing development database structure with production</a>, Mike mentioned he uses mysqldumps. This is actually not a bad idea, given that it is faster and less error prone (propel will never bug you). The downside is off course that it only works for mysql.</p>
<p>Here 3 Pake tasks to automate your mysql dumping:</p>
<ol>
<li>mysql-dump-data</li>
<li>mysql-load-data</li>
<li>propel-build-all-save-mysql</li>
</ol>
<p><a href="http://www.mellowmorning.com/wp-content/uploads/2007/11/sfdumpmysqldata.zip" title="sfDumpMysqlData">Download all three pake tasks</a>. To install them simply copy the file to myproject/data/tasks/</p>
<p>You will have to edit the file to configure your database settings.</p>
<p>Note that this is only a temporary solution. I personally would be very happy to see Propel making database structure changes.</p>
<p>I didn&#8217;t see any manual on creating Pake tasks. Improvements and suggestions are more than welcome.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/183301312" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/11/11/pake-propel-build-all-save-mysql/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CSS Vista is great</title>
		<link>http://www.mellowmorning.com/2007/11/10/css-vista-is-great/</link>
		<comments>http://www.mellowmorning.com/2007/11/10/css-vista-is-great/#comments</comments>
		<pubDate>Sat, 10 Nov 2007 21:31:16 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Css]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/10/css-vista-is-great/</guid>
		<description><![CDATA[For those trying to debug their CSS in Internet Explorer (if you still support that browser)
Have a look  at CSS vista, it is free and helped me a great deal.

]]></description>
			<content:encoded><![CDATA[<p>For those trying to debug their CSS in Internet Explorer (if you still support that browser)</p>
<p>Have a look  at <a href="http://litmusapp.com/labs">CSS vista</a>, it is free and helped me a great deal.<br />
<img src="http://litmusapp.com/images/labs-cssvista.gif" /></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/182835417" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/11/10/css-vista-is-great/feed/</wfw:commentRss>
		</item>
		<item>
		<title>CommentHub.com - Developed with Symfony</title>
		<link>http://www.mellowmorning.com/2007/11/08/commenthubcom-developed-with-symfony/</link>
		<comments>http://www.mellowmorning.com/2007/11/08/commenthubcom-developed-with-symfony/#comments</comments>
		<pubDate>Thu, 08 Nov 2007 21:54:02 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/08/commenthubcom-developed-with-symfony/</guid>
		<description><![CDATA[CommentHub.com has been developed with Symfony and is currently in Alpha testing. Needless to say it is a great pleasure to use Symfony and new features are being added effortlessly.
CommentHub.com aims to raise the standard in online commenting and make it more social. Commenting has become an important aspect of the internet, however a central [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mellowmorning.com/wp-content/uploads/2007/11/commenthub-logo.png" style="padding: 0pt 5px 5px 0pt; float: right" alt="CommentHub" />CommentHub.com has been developed with <a href="http://www.symfony-project.com/" target="_blank">Symfony</a> and is currently in Alpha testing. Needless to say it is a great pleasure to use Symfony and new features are being added effortlessly.</p>
<p>CommentHub.com aims to raise the standard in online commenting and make it more social. Commenting has become an important aspect of the internet, however a central system has not been available so far. CommentHub offers a plug and play comment system for your website. Whether it is your blog or any other page, you can add an advanced comment system in a minute.  Currently it supports the following features:</p>
<ul>
<li>Fast Ajax commenting</li>
<li>Threaded comments</li>
<li>Voting on comments</li>
<li>Gravatar images</li>
<li>Edit capabilities</li>
<li>Spam prevention and protection</li>
<li>Distinct look for admin comments</li>
<li>New comment notification emails for admins</li>
<li>Comment RSS Feed</li>
<li>Login (to remember email, name and site across websites)</li>
</ul>
<p>Stronger email integration, personal RSS feeds and social features are all under development. Furthermore the system is already supporting templates. An interface to upload CSS templates will be available soon.</p>
<p>To see the comments in action just scroll down to the bottom of this page. Another example (with more comments) may be found by looking at my <a href="http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/" target="_blank">previous post</a>.</p>
<p>Currently it is rather bootstrapped and in Alpha testing. To try it out for your website you can register for a webmaster account <a href="http://www.commenthub.com/register-identity-and-website" target="_blank">here</a> (Enter mellow as your invitation code). The product is still under heavy development. Feature request, bug reports and comments are more than welcome.</p>
<p>To have a sneak peak at how easy the implementation actually is, view <a href="http://www.commenthub.com/getting-started-with-commenthub" target="_blank">getting started with CommentHub</a>. Plugins for major blogging systems will soon be available. (If anyone feels like contributing some plugins, it would be greatly appreciated.)</p>
<p>Thanks to Symfony for making the development such a pleasure.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/181856511" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/11/08/commenthubcom-developed-with-symfony/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Updated cross site ajax plugin for Prototype</title>
		<link>http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/</link>
		<comments>http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 22:08:19 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[Prototype]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/</guid>
		<description><![CDATA[The first post on my cross site ajax plugin for Prototype (1.5.0) was received with great enthusiasm. It was very nice to see my own work on the great Ajaxian website and the delicious front page. Since that post the quality of the plug-in has improved quite a bit. Especially cross browser compatibility improved. I [...]]]></description>
			<content:encoded><![CDATA[<p>The first post on my <a href="http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/">cross site ajax plugin for Prototype</a> (1.5.0) was received with great enthusiasm. It was very nice to see my own work on the great <a href="http://ajaxian.com/">Ajaxian</a> website and the delicious front page. Since that post the quality of the plug-in has improved quite a bit. Especially cross browser compatibility improved. I made a test page to evaluate this; <a href="http://www.mellowmorning.com/wp-content/uploads/2007/11/testcrosssiteajax.html" title="Test" target="_blank">have a look to test your own browser</a>. Furthermore <a href="http://browsershots.org/http://www.commenthub.com/testCrossSiteAjax.html" target="_blank">some 14 screen shots</a> show that the compatibility is good.</p>
<p>Here the new version: <a href="http://www.mellowmorning.com/wp-content/uploads/2007/11/transport.js" title="Transport - Cross site ajax plugin for prototype" target="_blank">Download the cross site ajax plugin</a>.</p>
<p>The syntax remains exactly the same:</p>
<p><code>new Ajax.Request(url, {<br />
method: 'GET',<br />
crossSite: true,<br />
onLoading: function() {<br />
//things to do at the start<br />
},<br />
onSuccess: function(transport) {<br />
//things to do when everything goes well<br />
},<br />
onFailure: function(transport) {<br />
//things to do when we encounter a failure<br />
}<br />
});</code></p>
<h4>Cross Browser Compatibility</h4>
<p>First of all thanks to <a href="http://cixar.com/tracs/javascript" target="_blank">Kris Kowal</a> and Gary Gurevich for spotting the problems with Safari. Prior to the changes the plugin used three different methods to detect the loading of the script element. For Safari and Konqueror a sequential script technique was used. This technique has now been replaced with the polling technique, like in <a href="http://cows-ajax.sourceforge.net/">COWS</a>. So the following three solutions are used.</p>
<p>1.) For IE it used its proprietary onreadystatechange event<br />
2.) For Safari and Konqueror it uses the polling technique<br />
3.) For Firefox and Opera it uses the standard onload event</p>
<h4>Timing problems</h4>
<p>In addition to the cross browser compatibility problems I noticed another complication. In Prototype 1.5.0 the onLoading, onSuccess etc., are generally fired by running the onreadystatechange function. However this is not the case for a transport status below 2. Actually the onLoading event is triggered by a delayed function after the open command. I didn&#8217;t realize this initially. However if you have a script which loads rather fast it will result in onSuccess executing before onLoading. This issue was fixed by calling respondToReadyState directly.</p>
<h4>Points of Improvement</h4>
<p>Firstly the current implementation detects browsers, not capabilities. This might create problems with future or buggy versions of browsers.<br />
Secondly the usage of a global variable to indicate transport status makes it impossible to handle simultaneous requests nicely.<br />
Thirdly the script currently does not clean up the script nodes.</p>
<p>If these points turn out to be troublesome, I will use a modified version of COWS for the transport aspects.</p>
<h4>Conclusion</h4>
<p>The new version of this plug-in is widely cross browser compatible. Currently it is suitable for a large variety of applications. It is however not yet ready to deal with simultaneous requests.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/181302591" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Google at the Campus</title>
		<link>http://www.mellowmorning.com/2007/11/07/google-at-the-campus/</link>
		<comments>http://www.mellowmorning.com/2007/11/07/google-at-the-campus/#comments</comments>
		<pubDate>Wed, 07 Nov 2007 16:48:18 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Events]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/11/07/google-at-the-campus/</guid>
		<description><![CDATA[I was so surprised to see a stand from Google at the Erasmus campus today. Usually we don&#8217;t see too many hi-tech companies visiting a business university. Google has an amazing brand name amongst students, this was very clear from the crazy amount of attention they got. The staff from Google was representing their Dublin [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.mellowmorning.com/wp-content/uploads/2007/11/google_sm.gif" alt="Google" style="padding: 10px; float: left" />I was so surprised to see a stand from Google at the Erasmus campus today. Usually we don&#8217;t see too many hi-tech companies visiting a business university. Google has an amazing brand name amongst students, this was very clear from the crazy amount of attention they got. The staff from Google was representing their Dublin headquarters. Working benefits seem pretty amazing over there.</p>
<p>Good job Google! (why don&#8217;t other tech companies do this?)</p>
<p>The movie they recommended us to watch:</p>
<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/aOZhbOhEunY&#038;rel=1"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/aOZhbOhEunY&#038;rel=1" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/181174870" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/11/07/google-at-the-campus/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Using php to dynamically generate conflict free css</title>
		<link>http://www.mellowmorning.com/2007/10/29/using-php-to-dynamically-generate-conflict-free-css/</link>
		<comments>http://www.mellowmorning.com/2007/10/29/using-php-to-dynamically-generate-conflict-free-css/#comments</comments>
		<pubDate>Mon, 29 Oct 2007 15:30:21 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Css]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/29/using-php-to-dynamically-generate-conflict-free-css/</guid>
		<description><![CDATA[This little blog has been getting a lot of coverage lately thanks to a write up by Ajaxian. Developing with Symfony is great and always gives you a lot to think and write about.
For my new product I was having a CSS conflict. This tends to happen when you include your own html and css [...]]]></description>
			<content:encoded><![CDATA[<p>This little blog has been getting a lot of coverage lately thanks to a write up by <a href="http://ajaxian.com/archives/introducing-a-cross-site-ajax-plugin-for-prototype" target="_blank">Ajaxian</a>. Developing with Symfony is great and always gives you a lot to think and write about.</p>
<p>For my new product I was having a CSS conflict. This tends to happen when you include your own html and css into someone else&#8217;s website. For instance if you have a widget as such:</p>
<p>html</p>
<p><code>&lt;div id="mywidget"&gt;<br />
&lt;h1&gt;My hello world widget&lt;/h1&gt;<br />
&lt;/div&gt;</code></p>
<p>css</p>
<p><code>H1 {<br />
color:green;<br />
font-size:20px;<br />
}</code></p>
<p>The solution to this problem is quite straightforward, you simply specify your css selector as div#mywidget H1. However, what if you want to allow people to customize the looks of your widget. Now you could off course ask them to include the div#mywidget part, but chances are this will give problems.</p>
<p>Since I was already using the great sfCombineFilterPlugin an easy solution was available. (If you didn&#8217;t use the <a href="http://trac.symfony-project.com/wiki/sfCombineFilterPlugin">sfCombineFilterPlugin</a> yet, go check it out immediately. Also have a look at <a href="http://developer.yahoo.com/yslow/">Yahoo&#8217;s Yslow</a>)</p>
<p>The sfCombineFilterPlugin uses php to gzip, minify and cache your css and javascript. Here is how to extend that behavior to include the #mywidget specification. (Assuming you have sfCombineFilter installed)</p>
<h4>Step 1: open your .htaccess</h4>
<p>Just below the RewriteBase instruction add:<br />
<code># if we are retrieving javascript or css<br />
RewriteRule ^css/packed/prepend/(.*\.css) /sfCombineFilterPlugin/combine.php?type=css&amp;prepend=1&amp;files=$1<br />
RewriteRule ^css/packed/(.*\.css) /sfCombineFilterPlugin/combine.php?type=css&amp;files=$1<br />
RewriteRule ^js/packed/(.*\.js) /sfCombineFilterPlugin/combine.php?type=javascript&amp;files=$1</code></p>
<h4>Step 2: add this class to the top of web/sfCombineFilter/combine.php</h4>
<p>Partly based on <a href="http://www.phpclasses.org/browse/package/1289.html">CSS parser class</a>.</p>
<pre class="code">
class prependCss
{

    public static function prependCssString($str) {
        // Remove comments
        $str = preg_replace("//*(.*)?*//Usi", "", $str);

        $parts = explode("}",$str);
        if(count($parts) &gt; 0) {
            foreach($parts as $part) {
                list($keystr,$codestr) = explode("{",$part);
                $keys = explode(",",trim($keystr));
                $newkeys = array();
                if(count($keys) &gt; 0) {
                    foreach($keys as $key) {
                        if(strlen($key) &gt; 0) {
                            $key = (!strstr($key, '#mywidget')) ? '#mywidget'.$key : $key;
                            $newkeys[] = $key;
                        }
                    }
                    $keystr = implode(&#8217;, &#8216;,$newkeys);
                }
                if(!empty($keystr)) //needed for spaces behind last }
                $rules[] = $keystr . &#8221; {&#8221; . $codestr . &#8220;}&#8221;;
            }
            $prependedCss = implode(&#8221;n&#8221;, $rules);
        }
        //
        return $prependedCss;
    }

    public static function prependCssFile($filename) {
        if(file_exists($filename)) {
            return self::prependCssString(file_get_contents($filename));
        } else {
            return false;
        }
    }
}</pre>
<h4>Step 3: hack around in combine.php</h4>
<p>below $minify_js add:<br />
<code>if($_GET['prepend']==1)<br />
$prepend = true;</code></p>
<p>change the stuff below this comment to:<br />
<code>// Get contents of the files<br />
$contents = '';<br />
reset($elements);<br />
foreach ($files as $path) {<br />
if($prepend &amp;&amp; $_GET['type'] == &#8216;css&#8217;) {<br />
$contents .= &#8220;\n\n&#8221; . prependCss::prependCssFile($path);<br />
} else {<br />
$contents .= &#8220;\n\n&#8221; . file_get_contents($path);<br />
}<br />
}</code></p>
<p>And finally just change your urls to css/packed/prepend/yourcss.css (if you are using relative paths in your css you might need to add an ../)</p>
<h4>Conclusion</h4>
<p>Using this technique your css will load without any problems in third party sites. This comes in very useful when creating widgets or greasemonkey scripts.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/176712906" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/29/using-php-to-dynamically-generate-conflict-free-css/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Introducing a cross site ajax plugin for Prototype</title>
		<link>http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/</link>
		<comments>http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/#comments</comments>
		<pubDate>Thu, 25 Oct 2007 20:59:59 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Javascript]]></category>

		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Prototype]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/</guid>
		<description><![CDATA[Update: there have been some improvements to this plugin. Have a look at this post regarding the update. Thanks for the feedback!
After some days of hard labor, I finished my cross site Ajax plugin for the prototype framework 1.5.0. (Download Plugin Here) While working on a new product of mine I realized I needed cross [...]]]></description>
			<content:encoded><![CDATA[<p>Update: there have been some improvements to this plugin. Have a look at <a href="http://www.mellowmorning.com/2007/11/07/updated-cross-site-ajax-plugin-for-prototype/">this post regarding the update</a>. Thanks for the feedback!</p>
<p>After some days of hard labor, I finished my cross site Ajax plugin for the <a href="http://prototypejs.org/" target="_blank">prototype framework</a> 1.5.0. (<a href="http://www.mellowmorning.com/wp-content/uploads/2007/10/transport.js" title="Transport Class" target="_blank">Download Plugin Here</a>) While working on a new product of mine I realized I needed cross site Ajax, which is not supported in the Prototype framework.</p>
<p>During cross site Ajax requests the standard <a href="http://en.wikipedia.org/wiki/XMLHttpRequest" target="_blank">XmlHttpRequest</a> approach breaks down. The problem is that XmlHttpRequest is bounded by the same site policy. Fortunately the script tag has the freedom to do as it pleases.</p>
<p>Some other libraries such as <a href="http://manual.dojotoolkit.org/WikiHome/DojoDotBook/Book25" target="_blank">dojo</a> and <a href="http://" target="_blank">jquery</a> do support the script method for doing Ajax. There is even a project on source-forge called <a href="http://cows-ajax.sourceforge.net/tech.php" target="_blank">COWS</a>, which is dedicated to this purpose. This plugin is an adaptation of the jquery plugin, but modeled to look like an XmlHttpRequest. The credits of the original code go to <a href="http://trainofthoughts.org/blog/" target="_blank">Ralf S. Engelschall</a> , which amazingly achieved to make it nicely cross browser compatible. This plugin supports FF, IE, Safari, Opera and Konqueror, but has only been properly tested in FF and IE.</p>
<p>Prototype&#8217;s structured way of doing Ajax was my main reason to choose the prototype framework. Furthermore it is also included in <a href="http://www.mellowmorning.com/2007/08/18/ten-reasons-why-symfony-rocks-part-1/" target="_blank">the</a> <a href="http://www.mellowmorning.com/2007/09/08/ten-reasons-why-symfony-rocks-part-2/" target="_blank">great</a> <a href="http://www.symfony-project.com/" target="_blank">Symfony framework</a>. In Prototype Ajax requests are written like this:</p>
<p><code>new Ajax.Request('myurl', {<br />
method: 'GET',<br />
crossSite: true,<br />
parameters: Form.serialize(obj),<br />
onLoading: function() {<br />
//things to do at the start<br />
},<br />
onSuccess: function(transport) {<br />
//things to do when everything goes well<br />
},<br />
onFailure: function(transport) {<br />
//things to do when we encounter a failure<br />
}<br />
});</code></p>
<p>The cross site plugin simply allows you to do Ajax cross site, by specifying crossSite: true (line 3 of the above example). I will now cover some technical aspects of the plugin, but if you just want to start using it simply skip to the plug and play instructions below.</p>
<h4>How it works - Technical Aspects</h4>
<p>This plugin uses the dynamic script tag technique. This basically means that we insert new &lt;script&gt; tags into the Dom. Since this script tag is not bound to the same site you can send and receive data in the Ajax way. In its most basic form the javascript would be like this:</p>
<p><code>this.node = document.createElement('SCRIPT');</code><br />
<code> this.node.type = 'text/javascript';<br />
this.node.src = 'http://www.serversite.com';<br />
var head = document.getElementsByTagName('HEAD')[0];<br />
head.appendChild(this.node);</code></p>
<p>In order to make it very easy to use with Prototype, or any other library for that matter, I decided to mimic the functions of the <a href="http://en.wikipedia.org/wiki/XMLHttpRequest" target="_blank">XmlHttpRequest</a>. This is easily achieved by implementing the functions open, send and onreadystatechange. Furthermore I needed to specify the variables readyState and status in order to support prototype&#8217;s onLoad, onSucces and onFailure.</p>
<p>Detecting the loading of a script element is not that easy. Browsers such as Safari and Konqueror simply give no indication of this at all. One <a href="http://web.archive.org/web/20070125203701/http://blog.slimc.com/dojo-penetrates-prototype/" target="_blank">common</a> <a href="http://ajaxian.com/archives/prototype-extension-dynamic-script-pattern-support" target="_blank">solution</a> to dealing with this is to use <a href="http://remysharp.com/2007/04/12/how-to-detect-when-an-external-library-has-loaded/" target="_blank">an interval</a> and perform a check. The work at <a href="http://trainofthoughts.org/blog/2007/04/12/jquery-plugin-xsajax/" target="_blank">TrainOfThoughts</a> however takes the beautiful approach of inserting a helper script. This exploits the fact that the dynamically added scripts are executed in sequence. This approach makes the plugin nicely cross browser compatible.</p>
<p>Detecting failure is rather cumbersome for the script technique. As far as I know there is no way to read the headers on the incoming file, or to inspect its contents through javascript. This leaves us with the rather blunt approach of setting a global variable using the server output. It works, but it could be prettier.</p>
<h4>Plug and Play implementation instructions</h4>
<p>Firstly you need to load the plugin javascript file: <a href="http://www.mellowmorning.com/wp-content/uploads/2007/10/transport.js" title="Transport Class" target="_blank">download cross site ajax plugin for the prototype framework 1.5.0.</a></p>
<p>Secondly you need to change your regular prototype Ajax request, by ensuring that you instruct it to use the crossSite and GET methods, as such (observe line 2 and 3):</p>
<p><code>new Ajax.Request(baseurl+'/comment/giveratingjs', {<br />
method: 'GET',<br />
crossSite: true,<br />
parameters: Form.serialize(obj),<br />
onLoading: function() {<br />
//things to do at the start<br />
},<br />
onSuccess: function(transport) {<br />
//things to do when everything goes well<br />
},<br />
onFailure: function(transport) {<br />
//things to do when we encounter a failure<br />
}<br />
});</code></p>
<p>Thirdly you might need to rewrite some of your javascript code to accommodate the instant execution of the scripts.</p>
<p>Fourthly, if you want to use onFailure for any of your scripts you need to send some javascript instructions back from the server. You need to do this both on success and on failure (since a global variable is used). This is the javascript variable you need to set:</p>
<p><code>'var _xsajax$transport_status =  200;' Or<br />
'var _xsajax$transport_status =  404;'</code></p>
<h4>Symfony specific tips</h4>
<p>Symfony detects if it receives a XmlHttpRequest and automatically turns off your debug bar and layout.  Unfortunately it is not so kind to the script technique. So in your action you need to do this manually:</p>
<p><code>sfConfig::set('sf_web_debug', false);<br />
$this-&gt;setLayout(false);</code></p>
<p>Furthermore your validation files by default only look at POST variables (this one tricked me). To instruct them to look at both, simply mention</p>
<p><code>methods:     [post, get]</code></p>
<p>at the top of your validation.yml</p>
<p>Since you will probably want to send html to the browser, I would suggest you put this little function (found in the symfony escape helpers) in your toolbox.</p>
<p><code>public static function esc_js($value) {<br />
return addcslashes($value, "\0..\37\\'\"\177..\377\/");<br />
}</code></p>
<h4>Conclusion</h4>
<p>The dynamic script tag technique opens up a wide range of possibilities. Personally I am very glad with the results and would like to thank <a href="http://trainofthoughts.org/blog/" target="_blank">Ralf S. Engelschall</a> for his <a href="http://trainofthoughts.org/blog/2007/04/12/jquery-plugin-xsajax/" target="_blank">superb cbc work</a>. Unfortunately I didn&#8217;t include an example this time. You will have to wait for the products&#8217; launch:). Comments and improvements are always appreciated. Enjoy your cross site scripting!</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/175033257" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/25/introducing-a-cross-site-ajax-plugin-for-prototype/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Symfony &amp; Gravatars - easy implementation</title>
		<link>http://www.mellowmorning.com/2007/10/19/symfony-gravatars-easy-implementation/</link>
		<comments>http://www.mellowmorning.com/2007/10/19/symfony-gravatars-easy-implementation/#comments</comments>
		<pubDate>Fri, 19 Oct 2007 13:01:59 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/19/symfony-gravatars-easy-implementation/</guid>
		<description><![CDATA[Lets start with a small explanation. Gravatars are so called &#8216;globally recognized avatars&#8217;. Basically it is an open directory for avatars. If you didn&#8217;t get one yet, feel free to head over to www.gravatar.com.
The implementation of gravatars for your site is already extremely easy. However if you are fortunate enough to be using Symfony, it [...]]]></description>
			<content:encoded><![CDATA[<p>Lets start with a small explanation. Gravatars are so called &#8216;globally recognized avatars&#8217;. Basically it is an open directory for avatars. If you didn&#8217;t get one yet, feel free to head over to <a href="http://site.gravatar.com/">www.gravatar.com</a>.</p>
<p>The <a href="http://site.gravatar.com/site/implement">implementation </a>of gravatars for your site is already extremely easy. However if you are fortunate enough to be using Symfony, it becomes a real piece of cake. Quite a few people already use gravatars, including the <a href="http://www.symfony-project.com/blog/2007/10/18/two-years-of-symfony">Symfony blog</a>. This number will probably increase quite a bit, given the recent <a href="http://www.techcrunch.com/2007/10/17/automattic-acquires-gravatar/">purchase of the company by Automattic</a>.</p>
<p>Gravatars are attached to an email address. Lets assume your program is already setting and getting the email addresses. All you need to get up and running with Gravatars is these simple 3 steps.</p>
<p><strong>1. Extend your setEmail to do setGravatar as well</strong></p>
<p>(somewhere in lib/Comment.php)</p>
<pre class="code">function setEmail($input) {

$this-&gt;setGravatar(md5($input));

parent::setEmail($input);

}</pre>
<p><strong>2. When getting the Gravatar, retrieve the full image code</strong></p>
<p>(somewhere in lib/Comment.php)</p>
<p><code>    function getGravatar() {<br />
$md5email = parent::getGravatar();<br />
$size = 45;<br />
$rating = 'R'; // possible values [ G | PG | R | X ]<br />
$url = &#8216;&lt;img width=&#8217;.$size.&#8217;px height=&#8217;.$size.&#8217;px class=&#8221;gravatar&#8221; src=&#8221;http://www.gravatar.com/avatar.php?gravatar_id=&#8217;.$md5email.&#8217;&amp;rating=&#8217;.$rating.&#8217;&amp;size=35&#8243; alt=&#8221;gravatar&#8221; /&gt;&#8217;;<br />
return $url;<br />
}</code></p>
<p><strong>3. In your view template</strong></p>
<p>Simply do: $comment-&gt;getGravatar();</p>
<p>DONE!</p>
<p>Have a look at the result:<br />
<img src="http://www.mellowmorning.com/wp-content/uploads/2007/10/comment-with-gravatar.PNG" alt="Gravatar implementation" /></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/172056594" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/19/symfony-gravatars-easy-implementation/feed/</wfw:commentRss>
		</item>
		<item>
		<title>We love FireFox, 76%</title>
		<link>http://www.mellowmorning.com/2007/10/11/we-love-firefox-76/</link>
		<comments>http://www.mellowmorning.com/2007/10/11/we-love-firefox-76/#comments</comments>
		<pubDate>Thu, 11 Oct 2007 08:22:44 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/11/we-love-firefox-76/</guid>
		<description><![CDATA[A few days ago I noticed a bug in the Digg-this plugin for my blog. The javascript with this plugin was causing errors with Internet Explorer. The problem must have been around for a week or so, before I noticed it. Now my site doesn&#8217;t get too many visitors, but I would have expected someone [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago I noticed a bug in the Digg-this plugin for my blog. The javascript with this plugin was causing errors with Internet Explorer. The problem must have been around for a week or so, before I noticed it. Now my site doesn&#8217;t get too many visitors, but I would have expected someone to complain about it.</p>
<p>Looking in my stats it becomes clear why no-one has. Though only a small and insignificant sample, the traffic at my blog is strongly IE averse. Just have a look at the stats:</p>
<p style="text-align: center"><img src="http://www.mellowmorning.com/wp-content/uploads/2007/10/browseroverview.png" alt="Overview of important browsers" /></p>
<p style="text-align: center"><img src="http://www.mellowmorning.com/wp-content/uploads/2007/10/browsergraph.png" alt="Pie Chart of Overview" /></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/168328024" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/11/we-love-firefox-76/feed/</wfw:commentRss>
		</item>
		<item>
		<title>How the Rubicon Project is innovating Google’s online advertising business</title>
		<link>http://www.mellowmorning.com/2007/10/08/how-the-rubicon-project-is-innovating-googles-online-advertising-business/</link>
		<comments>http://www.mellowmorning.com/2007/10/08/how-the-rubicon-project-is-innovating-googles-online-advertising-business/#comments</comments>
		<pubDate>Mon, 08 Oct 2007 22:01:15 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[Business]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/08/how-the-rubicon-project-is-innovating-googles-online-advertising-business/</guid>
		<description><![CDATA[Update: In the comments the founder of the Rubicon Project indicated that they will not be working directly with advertisers. My misperception was based on the TechCrunch write-up. The article below is based on the assumption that they would approach both sides of the problem. Since this is not the case, take this into account [...]]]></description>
			<content:encoded><![CDATA[<p align="left"><strong>Update:</strong> In the comments the founder of the Rubicon Project indicated that they will not be working directly with advertisers. My misperception was based on the <a href="http://www.techcrunch.com/2007/10/08/rubicon-project-launches-a-network-of-ad-networks/">TechCrunch write-up</a>. The article below is based on the assumption that they would approach both sides of the problem. Since this is not the case, take this into account when reading the post.</p>
<p><a href="http://www.mellowmorning.com/2007/10/08/how-the-rubicon-project-is-innovating-googles-online-advertising-business/rubicon/" rel="attachment wp-att-32" title="Rubicon"><img src="http://www.mellowmorning.com/wp-content/uploads/2007/10/picture-191.png" style="margin: 10px; float: right" alt="Rubicon" /></a></p>
<p align="left">The <a href="http://www.rubiconproject.com/">Rubicon Project</a> is by far the most promising, exciting and revolutionizing startup of the moment. Their business has the potential to completely change the entire web-advertising industry.<br />
They are trying to become an intermediary (of intermediaries) by offering:</p>
<ul>
<li>Publishers: automated ad revenue optimization between networks</li>
<li>Advertisers: a central point to setup online advertising (<strong>wrong</strong>)</li>
</ul>
<p>They display it in a graphical way in their <a href="http://www.rubiconproject.com/files/demo/flash.html">beta overview video</a>.</p>
<p><img src="http://www.mellowmorning.com/wp-content/uploads/2007/10/rubicon.png" alt="Rubicon Industry Value Chain Position" /></p>
<h4> The Changing Industry</h4>
<p>An intermediary like Rubicon profoundly changes the competitive landscape for ad networks such as Google Adsense.</p>
<p>Currently startups in the ad network business face a so called chicken and egg problem. Even if you have a technically great product, you will still need advertisers to get publishers and vice-versa. The advertising and sales efforts required in this industry are substantial and present a major obstacle for new companies to enter the market.</p>
<p>Now imagine a new market where Rubicon is the intermediary. Any new advertising network could instantly get its product of the ground by joining Rubicon. No longer are millions in capital needed for sales and promotion. When a startup is able to outperform the market incumbents, in terms of matching advertisements with visitors, it has its road to success paved. Not only does this benefit those startups, it also gives Rubicon&#8217;s clients access to the best performing advertising solutions.</p>
<p>Google was the first to get the match between ads and viewers <a href="http://www.techcrunch.com/2007/10/05/googles-share-of-us-online-ads-hits-40-percent/">somewhat right</a>. Eager to be next in line seems to be the currently hyped Facebook, with its <a href="http://online.wsj.com/article/SB118783296519606151.html">personalized advertising</a>. My impression is that the current solutions are tremendously under-performing. When an intermediary, be it Rubicon, establishes a position for themselves, innovation in online advertising will boom.</p>
<p>An intermediary like Rubicon changes the balance between required core competences for ad networks. The focus moves from sales&amp;marketing to clever algorithms, extensive data and intelligent models to match the advertisements with the viewers. The market&#8217;s changes effectively open up this 27 billion industry to a far larger array of entrepreneurs.</p>
<h4>Google&#8217;s Perspective</h4>
<p>Rubicon effectively lowers the barriers to entry into this Google Adsense dominated market. In the new market situation it will be harder for Google to stay ahead of its competition. This fact makes you wonder, will Google move to the Rubicon position or remain where it is. Or in other words, will it defend its sales competence or its ability to match visitors with advertisements?</p>
<p>If Rubicon succeeds we will soon have some very interesting entrepreneurial possibilities ahead. I certainly wish them the best of luck. Given the experience and progress of the founding team, I think they have a good shot.</p>
<p>@<a href="http://www.founderblog.com/">Frank</a>, Good luck starting your sixth company!</p>
<h4 style="margin-top: 40px">Recommended Readings:</h4>
<p><a href="http://www.techcrunch.com/2007/10/08/rubicon-project-launches-a-network-of-ad-networks/">Techcrunch coverage of Rubicon</a></p>
<p><a href="http://www.rubiconproject.com/about-us">Rubicon about page</a></p>
<p><a href="http://www.founderblog.com/">Blog of Frank Addante</a> (I subscribed to it, great readings)</p>
<p><a href="http://www.founderblog.com/2007/10/what-is-rubicon-project-part-ii-solving.html">http://www.founderblog.com/2007/10/what-is-rubicon-project-part-ii-solving.html</a></p>
<p><a href="http://www.founderblog.com/2007/10/what-is-rubicon-project.html">http://www.founderblog.com/2007/10/what-is-rubicon-project.html</a></p>
<p><a href="http://www.rubiconproject.com/files/demo/flash.html">Rubicon beta overview video</a></p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/167137451" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/08/how-the-rubicon-project-is-innovating-googles-online-advertising-business/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Ajax for unique usernames</title>
		<link>http://www.mellowmorning.com/2007/10/05/ajax-for-unique-usernames/</link>
		<comments>http://www.mellowmorning.com/2007/10/05/ajax-for-unique-usernames/#comments</comments>
		<pubDate>Fri, 05 Oct 2007 13:27:50 +0000</pubDate>
		<dc:creator>tschellenbach</dc:creator>
		
		<category><![CDATA[PHP]]></category>

		<category><![CDATA[Symfony]]></category>

		<category><![CDATA[Web Development]]></category>

		<guid isPermaLink="false">http://www.mellowmorning.com/2007/10/05/ajax-for-unique-usernames/</guid>
		<description><![CDATA[I always enjoy the logical thinking required for programming. For Symfony it is really nice how it all just flows together. I wanted to implement an ajax check for unique usernames. Something similar like how you see it on Twitter. Lets get started:
First create a validator in lib/validators/sfUniqueUserValidator.class.php

&#60;?php
class sfUniqueUserValidator extends sfValidator
{
public function execute (&#38;$value, &#38;$error)
{
//check [...]]]></description>
			<content:encoded><![CDATA[<p>I always enjoy the logical thinking required for programming. For Symfony it is really nice how it all just flows together. I wanted to implement an ajax check for unique usernames. Something similar like how you see it on Twitter. Lets get started:</p>
<p>First create a validator in lib/validators/sfUniqueUserValidator.class.php</p>
<pre class="code">
&lt;?php
class sfUniqueUserValidator extends sfValidator
{
public function execute (&amp;$value, &amp;$error)
{
//check if the username exists
$c = new Criteria();
$c-&gt;add(sfGuardUserPeer::USERNAME, $value);
$user = sfGuardUserPeer::doSelect($c);
if (!empty($user))
{
$error = $this-&gt;getParameter('user_error');

return false;
}

return true;
}

public function initialize ($context, $parameters = null)
{
// Initialize parent
parent::initialize($context);

// Set default parameters value
$this-&gt;setParameter('user_error', 'This username is taken');

// Set parameters
$this-&gt;getParameterHolder()-&gt;add($parameters);

return true;
}
}</pre>
<p>Then in your view template use:</p>
<pre class="code">&lt;?php echo observe_field('rusername', array(
      'update'   =&gt; 'userstatus',
      'url'      =&gt; 'sfGuardAuth/checkuser',
      'with' =&gt; "'id='+$('rusername').value",
  )) ?&gt;</pre>
<p>this will monitor an input field called rusername, and submit its value to the sfGuardAuth/checkuser internal url.</p>
<p>And to glue it all together, in the actions:</p>
<pre class="code">  public function executeCheckuser()
  {
     $username = $this-&gt;getRequestParameter('id');
     $userValidator = new sfUniqueUserValidator();
     $userValidator-&gt;initialize($this-&gt;getContext());
     $error='none';
     if (!$userValidator-&gt;execute($username,$error))
     return $this-&gt;renderText($username.' is taken');

     return $this-&gt;renderText($username.' is available'); 

  }</pre>
<p>Enjoy!</p>
<p>Ps. any tips for posting code in wordpress would be greatly appreciated, for me it does the strangest types of things.</p>
<img src="http://feeds.feedburner.com/~r/MellowMorning/~4/165702636" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.mellowmorning.com/2007/10/05/ajax-for-unique-usernames/feed/</wfw:commentRss>
		</item>
	</channel>
</rss><!-- Dynamic Page Served (once) in 0.587 seconds --><!-- Cached page served by WP-Cache -->
