<?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"
	>

<channel>
	<title>?WEB? &#187; Software</title>
	<atom:link href="http://whatwebwhat.com/category/technology/software/feed/" rel="self" type="application/rss+xml" />
	<link>http://whatwebwhat.com</link>
	<description>WhatWebWhat / Marc Worrell / Freelance Pragmatic Innovation</description>
	<pubDate>Fri, 13 Nov 2009 18:34:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
	<language>en</language>
			<item>
		<title>Zotonic — A quick overview</title>
		<link>http://whatwebwhat.com/2009/07/01/zotonic-a-quick-overview/</link>
		<comments>http://whatwebwhat.com/2009/07/01/zotonic-a-quick-overview/#comments</comments>
		<pubDate>Tue, 30 Jun 2009 22:44:49 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[Web Projects]]></category>

		<category><![CDATA[cms]]></category>

		<category><![CDATA[erlang]]></category>

		<category><![CDATA[semantic web]]></category>

		<category><![CDATA[zophrenic]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=252</guid>
		<description><![CDATA[In an earlier installment I wrote about the reasons why we started building the content management system Zotonic using the programming language Erlang.  In this installment I will give a quick overview of the data model and the basic building blocks of Zotonic.
Modules, the basic building block
A Zotonic web site is made of different [...]]]></description>
			<content:encoded><![CDATA[<p>In an <a href="http://whatwebwhat.com/2009/06/16/zotonic-erlang-powered-cms/">earlier installment</a> I wrote about the reasons why we started building the <a href="http://zotonic.com/">content management system Zotonic</a> using the programming language Erlang.  In this installment I will give a quick overview of the data model and the basic building blocks of Zotonic.</p>
<h3 style="clear: none">Modules, the basic building block</h3>
<p>A Zotonic web site is made of different functional parts:</p>
<ul>
<li>Controllers, in fact Webmachine resources.</li>
<li>Templates, all what you see. Templates can include other templates.</li>
<li>Screen components, <em>scomps</em>, those are templates with their own little controller.</li>
<li>Actions, everything that you can do with buttons, forms, jQuery effects etc.</li>
<li>Validators, used to check submitted input elements.</li>
<li>Css, Javascript, static images.  Those are all put in <em>lib</em> directories.</li>
<li>Dispatch rules. They map a request url to the correct controller.</li>
<li>And a bunch of supporting Erlang code to make it all work.</li>
</ul>
<p>A module contains one or more of the above items.  All templates, actions, validations, css, javascript, dispatch rules and scomps are contained in modules.  Modules have a priority and can overrule components of modules with lower priority.</p>
<p>Modules are directories with at least one Erlang module implementing a <em>gen_server</em> that manages the module.  Subdirectories in the module contain all the templates, Webmachine resources, dispatch rules, actions etc.</p>
<p>Modules communicate with each other using notifications.  Modules can be activated or deactivated using the admin interface (which is implemented using multiple modules).</p>
<h3>Data Model</h3>
<p>The data model is inspired by semantic web triple stores. But then adapted to make it work with a relational database and usual CMS interfaces and methods.  </p>
<p>All (ok, most) data in Zotonic is a resource.  Resources are connected with edges, creating a directed graph of information.  Every edge has also a predicate.  The predicate defines the meaning of the edge.  For example <em>author</em>, as in the author of an article.</p>
<p><img src="http://whatwebwhat.com/wp-content/uploads/2009/07/zophrenic-article-image-person-300x175.png" alt="" title="Zophrenic - article with some objects" width="300" height="175" style="float: none" /></p>
<p>For example, a news article is a resource.  The image of the news article is another resource, connected to the article with an edge, and so is the author of the article, the place the article is happening etc.</p>
<p>You could say that Zotonic has only two tables.  A resource table and an edge table.</p>
<p>Resources are typed using a hierarchical category system.  Some predefined resource categories are: text, news, image, video, sound, person, group, predicate, category and other.</p>
<h4>A Data Resource</h4>
<p>A resource has some fixed fields and can have any additional fields.  The fixed fields are:</p>
<ul>
<li>Id, an unique integer.</li>
<li>Title.</li>
<li>Slug. Used to make understandable uris</li>
<li>Introduction, a short abstract used in lists.</li>
<li>Body, the textual body of a resource.  A body contains HTML.</li>
<li>Unique name, used by the system to find resources by name instead of id.</li>
<li>Featured flag, to show things at important places on your site.</li>
<li>Published flag.</li>
<li>Publication period.  From when till when a resource is published.</li>
<li>Uri. The originating uri of the resource when it is imported from another site.</li>
<li>Authoritative flag.  Defines if the resource is imported or created locally.</li>
<li>Category, defines what the resource represents.  For example a person, article, event, image or video.</li>
<li>Group. Editors work together in groups, all content belonging to a group can be edited by editors in that group.</li>
<li>Visibility level.  Defines if the resource is viewable by the group, community or the world.</li>
</ul>
<p>All textual fields (except name and uri) can be multilingual.  Any resource can have multiple extra data fields.  Think of a date range, name or address.</p>
<p>In the next article I will show a bit of a template.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2009/07/01/zotonic-a-quick-overview/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Zotonic — A pragmatic and modern CMS</title>
		<link>http://whatwebwhat.com/2009/06/16/zotonic-erlang-powered-cms/</link>
		<comments>http://whatwebwhat.com/2009/06/16/zotonic-erlang-powered-cms/#comments</comments>
		<pubDate>Tue, 16 Jun 2009 13:28:24 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[ajax]]></category>

		<category><![CDATA[cms]]></category>

		<category><![CDATA[comet]]></category>

		<category><![CDATA[erlang]]></category>

		<category><![CDATA[semantic web]]></category>

		<category><![CDATA[Web Projects]]></category>

		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=235</guid>
		<description><![CDATA[We built a new content management system which will be released as open source.  The CMS is loosely based on Semantic Web principles and builds upon our experience building web sites, content management systems and programming in general.  We call it Zotonic.
Zotonic enables hosting very popular sites on simple hardware.
I will write a [...]]]></description>
			<content:encoded><![CDATA[<p>We built a new content management system which will be released as open source.  The CMS is loosely based on Semantic Web principles and builds upon our experience building web sites, content management systems and programming in general.  <a href="http://zotonic.com/">We call it Zotonic</a>.</p>
<p>Zotonic enables hosting very popular sites on simple hardware.</p>
<p>I will write a couple of articles highlighting aspects of Zotonic.  Today I focus on the reason we built a new CMS and on performance aspects.  In other articles I will highlight the general design of Zotonic, the template system, modules, screen components, form handling, and adding logic (actions) to the templates. </p>
<h3>Why?</h3>
<p>Yet another CMS?  Why?  Because the current crop of open source content management systems don&#8217;t do what we want them to do. What do we want to do?  We have a simple list of requirements:</p>
<ul>
<li>Flexible and easy to learn template system;</li>
<li>Separation of logic, viewer and data store (MVC);</li>
<li>Rich data model, easy to add knowledge to the data;</li>
<li>Easy to make highly interactive web sites;</li>
<li>High performance from a single machine for simple hosting;</li>
<li>Future proof, easy to integrate with XMPP and other services;</li>
<li>Easily extensible with modules;</li>
<li>Able to handle push notifications with Comet;</li>
<li>Easy and fun to program the back end.</li>
</ul>
<h3>The Open Source building blocks of Zotonic </h3>
<p>Zotonic would not be possible without the contributions of many open source projects:</p>
<ul>
<li>Django like template engine (an adapted version of <a href="http://code.google.com/p/erlydtl/">ErlyDTL</a>);</li>
<li>HTTP protocol handler and abstraction with <a href="http://bitbucket.org/justin/webmachine/wiki/Home">Webmachine</a>;</li>
<li>Event driven user interface based on <a href="http://www.nitrogenproject.com/">Nitrogen</a>;</li>
<li>The best scalable open source database around: <a href="http://www.postgresql.org/">PostgreSQL</a>;</li>
<li>A great CSS framework: <a href="http://code.google.com/p/atatonic-css-framwork/">Atatonic</a>;</li>
<li><a href="http://jquery.com/">jQuery</a> for the user interface.</li>
<li><a href="http://glozer.net/src/epgsql/">epgsql</a> For connecting to the database; and</li>
<li><a href="http://github.com/archaelus/esmtp/tree/master">esmtp</a> For sending e-mail.</li>
</ul>
<p>Zotonic is written in the programming language <a href="http://erlang.org">Erlang</a>.  In the next section I explain why we use this programming language.</p>
<h3>What is a web site anyway?  Or why we choose Erlang</h3>
<p>Once upon a time a website was a collection of manually edited HTML pages and some images.  All was fine.</p>
<p>Then search was added to the site, necessitating extra programs running on the server on behalf of a web site visitor.  </p>
<p>Then those pages started to be filled with content from a database, nothing changed much except that editing and searching got a lot easier.</p>
<p>And then we started to let the visitor react, interact and upload information to the server.  Not only the visitor was allowed to interact, also machines got their own interface to talk to the server.  Web 2.0 with APIs and user generated content took off.</p>
<p>Nowadays a web site is talking in many different ways to humans and machines.  It is collecting information from multiple sources and actively submitting new articles to other sites or machines.  The web server gives the visitor more and more ways to access the stored information. People are using RSS readers, widgets, desktop applications, other web sites and so on.</p>
<p>The web server evolved from a simple machine serving some pages to a complex switchboard connected to many different servers and services.  The web server constantly sifts through information and storing it on behalf of its users.  It constantly generates different representations of its own stored information, let is be as HTML pages, RDF documents, Atom entries, XMPP messages or API result sets.</p>
<p>This new web server is an <i>always on</i> machine.  Not a simple server reacting to requests from a web browser.</p>
<p>This new web server is way more dynamic than yesterdays database based HTML generator.  It needs to stay connected with other servers, it needs to have all those connections open and active at all times.  It even needs to <i>push</i> information to the web browsers of visitors. </p>
<p>This new web server needs a different approach and programming model which becomes more and more like a information switchboard with thousands of open connections to other machines and web browsers.</p>
<p>Erlang was created to program telephone switches.  Its programming model and features are a natural match to this new kind of web/information server.  Besides its natural match to the problem domain it was also created to make very robust systems that are <i>always on</i>.  No need to reboot an Erlang system for a program update. </p>
<p>That is why we choose Erlang.  To create a robust web server that can be like a spider in the web of information.  And one that is still easy to program and extend.</p>
<h3>Performance: Scale up?  Scale out?  Scale in!</h3>
<p>The current generation of computers are so fast that we can play multi user video games on a single machine, whilst surfing the web, checking our mail and what not.  Why should we be happy with generating a couple of web pages per second from a machine that is so capable?  How green is that?</p>
<p>We have quite a lot of experience building content management systems and web sites in general.  What did we learn?  For one thing: when you want high performance <i>and</i> flexibility <i>and</i> less machines, then you are in a lot of trouble.</p>
<h4>Usage scenario</h4>
<p>Our usage scenario is:</p>
<ul>
<li>A fairly popular web site experiencing periodic surges of visitors;</li>
<li>The web site uses modern technologies like Ajax and Comet; and </li>
<li>Multiple web sites on a single server.</li>
</ul>
<p>So we are <i>not</i> targeting the new Flickr or similar sites.  They need custom built software, not an off the shelf CMS.  We <i>are</i> targeting the other 99 or so percent of the web sites.</p>
<h4>PHP</h4>
<p>PHP is the most popular language for building web sites.</p>
<p>For every request PHP wakes up and starts finding out where he is, where the code is, what the code is, where the database is, etc. etc.  It does this again, and again, and again.  Even when nothing is changed.  This <i>share nothing</i> approach is nice when handling a single request, or when scaling out (adding more machines).  It is not nice when you want to handle lots of requests from a single machine.</p>
<h4>Ruby on Rails and Django</h4>
<p>Other scaling problems arise with Python (Django) and Ruby (on Rails).  Typically they are single threaded, that is they use only one thread of those 32 or more hardware threads that are available on modern hardware. That is solved by having more independent processes, each handling requests one by one.  Those processes need to communicate with each other, adding more processes and complexity for caching systems etc.</p>
<h4> Zotonic </h4>
<p>Thanks to Erlang, Zotonic is completely multi threaded and scales linearly when adding more cores.  All information about the web site is kept in memory and easily shared between requests.  When two requests need the same html fragment then that fragment can be only rendered once.  Note that this is not caching, which Zotonic handles as well, but a simple prevention for doing the same thing twice at the same time.</p>
<p>Zotonic typically serves 100 to 500 dynamic pages per second on normal of the shelf hardware.  Which is enough for the fast majority of web sites.</p>
<p>Zotonic can serve a complete page before a Joomla/Drupal/WordPress site has even loaded its PHP code.  With a Zotonic server you can serve either many more sites, or many more visitors per site.</p>
<p>Later more about the architecture of Zotonic and how to use Zotonic.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2009/06/16/zotonic-erlang-powered-cms/feed/</wfw:commentRss>
		</item>
		<item>
		<title>WordPress Image resize plugin</title>
		<link>http://whatwebwhat.com/2008/11/06/wordpress-image-resize-plugin/</link>
		<comments>http://whatwebwhat.com/2008/11/06/wordpress-image-resize-plugin/#comments</comments>
		<pubDate>Thu, 06 Nov 2008 13:39:31 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[image]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=220</guid>
		<description><![CDATA[I just published a small plugin for WordPress.  I use it to dynamically resize and crop photos on this site.
WordPress resizes uploaded images to two different sizes.  A thumbnail and a medium format.  In most  designs you would really like to control how an image is used on the page.  [...]]]></description>
			<content:encoded><![CDATA[<p>I just published a small plugin for WordPress.  I use it to dynamically resize and crop photos on this site.</p>
<p>WordPress resizes uploaded images to two different sizes.  A thumbnail and a medium format.  In most  designs you would really like to control how an image is used on the page.  Sometimes it will be a small cropped thumbnail, another time a bit bigger, or a nice medium format on the post pages themselves.</p>
<p>The <tt>wok-imager</tt> plugin enables this without you resizing the images for WordPress.</p>
<p>Tested with PHP 5.2 and WordPress 2.7 and 2.6.3.  Many thanks to <a href="http://www.timbenniks.com/">Tim Benniks</a> for testing it with WordPress 2.7.</p>
<h2>Installation</h2>
<p>Short version:</p>
<p><code>cd wp-content/plugins/<br />
svn checkout http://wp-wok-imager.googlecode.com/svn/trunk/ wok-imager<br />
Go to the admin page of your site and install the plugin.<br />
</code></p>
<h2>How it works</h2>
<p>Just add an image element in your page:</p>
<p><code><br />
   &lt;img src="/wp-content/uploads/file.jpg" width="100" height="100" filter="crop,gray" /&gt;<br />
</code></p>
<p>The wok-imager will scan your generated page upon serving, apply the width, height and filters to the image and change the tag into something like:</p>
<p><code><br />
  &lt;img src="/wp-content/uploads/wok-imager/file.jpg/4ee630a60ec7feb605516ac5b98972d1.jpg" width="100" height="100" /&gt;<br />
</code></p>
<p>When you don&#8217;t supply the crop filter then the width and height are the maximum bounding rectangle of the image. The resulting image has either the given width or the given height but is never bigger than the given width and height. You can also supply just the width or the height to make the resized image unbounded in respectively the height or the width.</p>
<h2>Available filters</h2>
<p>You can combine multiple filters by separating then with a comma. For example &#8220;crop,flip,gray&#8221;.</p>
<dl>
<dt>crop</dt>
<dd>
Crops the image to the size given by the width and height attribute. Default is a center crop. You can have a crop aligning to the top, bottom, left or right by adding two extra letters (cropcc). The first letter defines how to align vertically and the second how to align horizontally. Valid values are t,c,b and l,c,r respectively.</p>
<p>Examples:</p>
<p><tt>crop</tt> center crop<br />
<tt>cropcc</tt> center crop<br />
<tt>croptl</tt> upper left corner<br />
<tt>cropbr</tt> lower right corner
</dd>
<dt>scale</dt>
<dd>
Allow the image to be upscaled. Per default wok-imager does not allow an image to be resized to bigger dimensions than the width and height of the original image.
</dd>
<dt>flip</dt>
<dd>
Horizontal flip of the image, swaps left and right.
</dd>
<dt>flop</dt>
<dd>
Vertical flop of the image, swaps top and bottom.
</dd>
<dt>blur</dt>
<dd>
Gaussian blur of the image.
</dd>
<dt>smooth</dt>
<dd>
Smoothen the resulting image. Default is a smooth factor of 6 is used. You can supply another with eg. smooth=4.
</dd>
<dt>bright</dt>
<dd>
Correct the brightness. Default is a brightness factor of 50. You can supply another with eg. bright=100.
</dd>
<dt>contrast</dt>
<dd>
Correct the contrast. Default is a brightness factor of -10. You can supply another with eg. contrast=-50.
</dd>
<dt>gray</dt>
<dd>
Convert the image to grayscale.
</dd>
<dt>sepia</dt>
<dd>
Convert the image to sepia.
</dd>
<dt>colorize</dt>
<dd>
You have to supply the three rgb colors with this filter. For example: filter=&#8221;colorize=100:100:100&#8243;
</dd>
<dt>negate</dt>
<dd>
Negate all colors, makes the image look like a color negative,
</dd>
<dt>q=quality</dt>
<dd>
Sets the quality of the jpeg conversion. When you don&#8217;t supply the quality then the quality depends on the size of the resulting image. The smaller the image the higher the quality setting.
</dd>
</dl>
<h2>Imager plugins</h2>
<p>You can add your own imager plugins. There are two examples in the imager-plugin directory.</p>
<dl>
<dt>deleted</dt>
<dd>
Adds a translucent red cross on top of your image.
</dd>
<dt>example</dt>
<dd>
Adds a small text on top of your image.
</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/11/06/wordpress-image-resize-plugin/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Open Source Projects</title>
		<link>http://whatwebwhat.com/2008/10/24/open-source-projects/</link>
		<comments>http://whatwebwhat.com/2008/10/24/open-source-projects/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 09:34:04 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[depcached]]></category>

		<category><![CDATA[oauth]]></category>

		<category><![CDATA[Open Source]]></category>

		<category><![CDATA[verso wiki]]></category>

		<category><![CDATA[wiki]]></category>

		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=196</guid>
		<description><![CDATA[Marc Worrell maintains a couple of Open Source projects.  Most notably are:

OAuth-PHP
OAuth-PHP is a PHP library implementing both the consumer and server side of OAuth.  You can easily integrate it in your web software to either accept or make OAuth authenticated requests.
Verso Wiki
A wiki library that translates Wiki to XHTML and XHTML back [...]]]></description>
			<content:encoded><![CDATA[<p>Marc Worrell maintains a couple of Open Source projects.  Most notably are:</p>
<dl>
<dt>OAuth-PHP</dt>
<dd><a href="http://code.google.com/p/oauth-php/">OAuth-PHP</a> is a PHP library implementing both the consumer and server side of <a href="http://oauth.net/">OAuth</a>.  You can easily integrate it in your web software to either accept or make OAuth authenticated requests.</dd>
<dt>Verso Wiki</dt>
<dd>A wiki library that translates Wiki to XHTML and XHTML back to Wiki.  It is written in PHP and is useful when you want to have a fast way of publishing texts with Wiki markup.</dd>
<dt>Depcached</dt>
<dd>A variant of memcached, with added dependency keys, queues and garbage collector.</dd>
<dt>wok-imager</dt>
<dd><a href="http://code.google.com/p/wp-wok-imager/">Wok-imager</a> is a WordPress plugin for automatic resizing, cropping and editing of images.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/24/open-source-projects/feed/</wfw:commentRss>
		</item>
		<item>
		<title>OAuth and URL encoding</title>
		<link>http://whatwebwhat.com/2008/10/11/oauth-and-url-encoding/</link>
		<comments>http://whatwebwhat.com/2008/10/11/oauth-and-url-encoding/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 18:07:11 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Articles]]></category>

		<category><![CDATA[Protocols]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[oauth]]></category>

		<category><![CDATA[perl]]></category>

		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=82</guid>
		<description><![CDATA[Differences in URL encoding functions will make implementation of OAuth harder. There is an immediate need for correct parameter encoding implementations.
I maintain an implementation of OAuth. Whilst checking existing code and implementing my own version I wondered how some implementations will differ.
OAuth uses RFC3986 for the encoding of URI parameters. Another often used encoding scheme is RFC1738 or RFC2396 (updated in RFC2732).
The [...]]]></description>
			<content:encoded><![CDATA[<p>Differences in URL encoding functions will make implementation of OAuth harder. There is an immediate need for correct parameter encoding implementations.</p>
<p>I maintain an <a href="http://code.google.com/p/oauth-php/">implementation</a> of <a href="http://oauth.net/">OAuth</a>. Whilst checking existing code and implementing my own version I wondered how some implementations will differ.</p>
<p>OAuth uses <a href="http://www.ietf.org/rfc/rfc3986.txt">RFC3986</a> for the encoding of URI parameters. Another often used encoding scheme is <a href="http://www.faqs.org/rfcs/rfc1738">RFC1738</a> or <a href="http://www.faqs.org/rfcs/rfc2396.html">RFC2396</a> (updated in RFC2732).</p>
<p>The differences? Quite a bit.</p>
<p>The <em>unreserved</em> characters in RFC3986 are:</p>
<pre>unreserved = ALPHA, DIGIT, '-', '.', '_', '~'</pre>
<p>And in RFC17138:</p>
<pre>
unreserved     = alpha | digit | safe | extra
safe           = "$" | "-" | "_" | "." | "+"
extra          = "!" | "*" | "'" | "(" | ")" | ","
</pre>
<p>And in RFC2396/2732</p>
<pre>
"A" .. "Z", "a" .. "z", "0" .. "9",
"-", "_", ".", "!", "~", "*", "'", "(", ")"
</pre>
<h2>What do some programming languages use?</h2>
<h3>PHP</h3>
<p>PHP has two options. Use <tt>urlencode</tt> or <tt>rawurlencode</tt>. The difference between the two is the escaping of the “<tt>+</tt>” character.</p>
<p><tt>rawurlencode</tt> claim to fame is to be compatible with RFC1738. In fact it is not. It encodes all characters as in RFC3986, and then also the “<tt>~</tt>”. So <tt>rawurlencode</tt> comes close. It escapes everything, except:</p>
<pre>A-Za-z0-9\-_.</pre>
<p>So the only difference here is the “<tt>~</tt>” character. The correct funtion will be:</p>
<pre>function oauth_urlencode ( $s )
{
    return str_replace('%7E', '~', rawurlencode($s);
}
</pre>
<h3>Perl</h3>
<p>CPAN implements <tt>URI:Escape</tt>. This one uses RFC2396/2732 as the basis for its character encoding. The default for this function is to escape everything except:</p>
<pre>A-Za-z0-9\-_.!~*'()</pre>
<h3>Javascript</h3>
<p>Yet another encoding method. Most javascript programmers will use the function <tt>escape</tt>. This one encoded everything except:</p>
<pre>A-Za-z0-9\-_.+*/@</pre>
<p>Addition from John Kristian: when you want to encode with Javascript you can take a look at<tt>OAuth.percentEncode</tt> in <a href="http://oauth.googlecode.com/svn/code/javascript/oauth.js">oauth.googlecode.com/svn/code/javascript/oauth.js</a></p>
<h2>It is a mess, what to do?</h2>
<p>I assume that programmers are lazy and will re-use their good old trusty encoding functions. They should, it is how we train programmers. This will give some interesting problems with OAuth though, as OAuth insists on encoding and sometimes double encoding parameters. And uses those encoded values to calculate the signature of a message.</p>
<p>This insistance on using a very specific implementation of encoding is, in my opinion, the Achilles heel of OAuth.</p>
<p>When checking the signature we have basically two options:</p>
<ol>
<li><em>Not decode</em> whatever comes in before recalculating the signature. In that way we won&#8217;t make any false assumptions about parameters being encoded one way or the other.</li>
<li><em>Recode</em> all incoming parameter values and names, in that way we make sure that we use the correct encoding (according to the spec) for our signature calculation.</li>
</ol>
<p>However, we <em>must assume</em> that the encoding used in calculating the signature base string and the key from the consumer secret and the token secret is correct according to RFC3986.</p>
<h2>Conclusion</h2>
<p>We, as a community using OAuth, need to create test sets that will test all edge cases, otherwise we are in for a rough ride. And, to help other programmers, there is an immediate need for correct implementations of the RFC3986 parameter encoding.</p>
<h2>Update</h2>
<p>The OAuth community has a nice set of testcases online at <a href="http://wiki.oauth.net/TestCases">wiki.oauth.net/TestCases</a> Let&#8217;s all use them and make sure that our implementations are correct!</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/11/oauth-and-url-encoding/feed/</wfw:commentRss>
		</item>
		<item>
		<title>anyMeta — A Semantic CMS</title>
		<link>http://whatwebwhat.com/2008/10/11/anymeta/</link>
		<comments>http://whatwebwhat.com/2008/10/11/anymeta/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 17:22:42 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Software]]></category>

		<category><![CDATA[Web Projects]]></category>

		<category><![CDATA[anymeta]]></category>

		<category><![CDATA[cms]]></category>

		<category><![CDATA[mysql]]></category>

		<category><![CDATA[open-ci]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[semantic web]]></category>

		<category><![CDATA[sphinx]]></category>

		<category><![CDATA[xmpp]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=66</guid>
		<description><![CDATA[anyMeta is a community management system that offers a sustainable information structure for internet projects. anyMeta is powering over 40 different web sites.
I was the principal architect and software engineer of anyMeta.  In four major revisions it grew from a small library to full featured content management system with over 90 different modules.  [...]]]></description>
			<content:encoded><![CDATA[<p>anyMeta is a community management system that offers a sustainable information structure for internet projects. anyMeta is powering over 40 different web sites.</p>
<p>I was the principal architect and software engineer of anyMeta.  In four major revisions it grew from a small library to full featured content management system with over 90 different modules.  It is also the first CMS that actively shares information between different web sites using push updates and cross site editorial protocols.</p>
<p>The system allows visitors to actively participate on the website, while the resulting information automatically appears in the right place, within a relevant context. This makes anyMeta extremely suitable for social networks, knowledge management, collaborations, and story telling.</p>
<h3>Semantic</h3>
<p>As a semantic network anyMeta uses meta data, which means the system is ahead of the current internet developments. This meta data is used to let information automatically appear in a consistent and clear structure, within a relevant context. This will save editors a lot of time. It also helps and stimulates visitors to navigate the website, because the associations between different kinds of information are directly shown.</p>
<h3>Social</h3>
<p>There are many options for visitors to actively participate on anyMeta websites. They can register as a user and create a personal profile. Administrators can grant users several rights to certain parts of the website. This allows users to add all kinds of information to the web site themselves.</p>
<h3>Flexible</h3>
<p>The system allow anyone with an internet connection to easily update and maintain the website. Despite the automatic structuring, editors are not totally dependent on the system and its users. Information can also be ordered in a custom way. Besides that, editors can actively manipulate the use of meta data, by offering a set of predetermined keywords. This makes anyMeta very flexible, because the automatic structuring can be supported with an editorial signature.</p>
<h3>Open-CI</h3>
<p>Especially interesting about anyMeta is the option to exchange information with other web sites. With the use of open standards, the system is able to share information with other systems, without losing its own identity. So the system is not only capable of creating relevant connections within one network, but also between multiple related web sites.</p>
<h3>Sustainable</h3>
<p>Web sites based on anyMeta can handle large numbers of visitors at once. Pages and information load fast, and editors can publish new information directly on the website. The powerful search functionality and automatic structuring help managing large amounts of information. Because of its semantic structure, it is easy to add new meta data to the system when changes to the website are necessary.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/11/anymeta/feed/</wfw:commentRss>
		</item>
		<item>
		<title>PolCop</title>
		<link>http://whatwebwhat.com/2008/10/11/polcop/</link>
		<comments>http://whatwebwhat.com/2008/10/11/polcop/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 16:48:45 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Other Projects]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[newton]]></category>

		<category><![CDATA[pda]]></category>

		<category><![CDATA[police]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=51</guid>
		<description><![CDATA[Project for the development of a system to uphold the rules for the storage of chemicals in the harbour of Rotterdam.  A personal digital assistant is used to draw up an inventory of storages, after that the PDA calculates the lethal effect distance and sends the information to a PC.  The PC merges [...]]]></description>
			<content:encoded><![CDATA[<p>Project for the development of a system to uphold the rules for the storage of chemicals in the harbour of Rotterdam.  A personal digital assistant is used to draw up an inventory of storages, after that the PDA calculates the lethal effect distance and sends the information to a PC.  The PC merges the information into a standard report that can be edited using a normal word processor.</p>
<p>Janssen, G., G. Nieuwdorp, C. Worrell, M. Worrell, Proefproject &#8220;<em>Handhavingen Industriele Veiligheid in het Havengebied</em>&#8221; - PolCop, 80 pp (No. 95005).</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/11/polcop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>DSP56xxx Optimizing Assembler</title>
		<link>http://whatwebwhat.com/2008/10/11/dsp56xxx-optimizing-assembler/</link>
		<comments>http://whatwebwhat.com/2008/10/11/dsp56xxx-optimizing-assembler/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 16:36:46 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Other Projects]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[assembler]]></category>

		<category><![CDATA[embedded]]></category>

		<category><![CDATA[optimizing]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=49</guid>
		<description><![CDATA[An assembler for the Freescale DSP56xxx.  Build into the assembler is a code optimizer with extensive knowledge about the processor pipeline and instruction semantics.  It is able to optimize hand tuned code even further and unroll loops when that results in more optimal code.
]]></description>
			<content:encoded><![CDATA[<p>An assembler for the Freescale DSP56xxx.  Build into the assembler is a code optimizer with extensive knowledge about the processor pipeline and instruction semantics.  It is able to optimize hand tuned code even further and unroll loops when that results in more optimal code.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/11/dsp56xxx-optimizing-assembler/feed/</wfw:commentRss>
		</item>
		<item>
		<title>NOVA Assembler Generator</title>
		<link>http://whatwebwhat.com/2008/10/11/nova-assembler-generator/</link>
		<comments>http://whatwebwhat.com/2008/10/11/nova-assembler-generator/#comments</comments>
		<pubDate>Sat, 11 Oct 2008 16:25:04 +0000</pubDate>
		<dc:creator>Marc Worrell</dc:creator>
		
		<category><![CDATA[Other Projects]]></category>

		<category><![CDATA[Software]]></category>

		<category><![CDATA[assembler]]></category>

		<category><![CDATA[embedded]]></category>

		<category><![CDATA[nova]]></category>

		<category><![CDATA[novagen]]></category>

		<guid isPermaLink="false">http://whatwebwhat.com/?p=45</guid>
		<description><![CDATA[NOVA, now called NOVAgen, is the proprietary generation and development tools suite of TASKING for building Cross-Assembler toolsets for virtually any DSP or microcontroller. It takes an input specification of the assembly language syntax, mnemonics and associated opcode sequences, and builds all components that are necessary for a full-featured assembler, automatically. These can be compiled [...]]]></description>
			<content:encoded><![CDATA[<p>NOVA, now called <a href="http://www.tasking.com/resources/technologies/assembler/">NOVAgen</a>, is the proprietary generation and development tools suite of TASKING for building Cross-Assembler toolsets for virtually any DSP or microcontroller. It takes an input specification of the assembly language syntax, mnemonics and associated opcode sequences, and builds all components that are necessary for a full-featured assembler, automatically. These can be compiled and then linked to the supplied modules to produce an executable Assembler on any given host platform, of production quality.</p>
<p>The input specification language was designed with flexibility and ease-of-use in mind, requiring no special skills or training. It supports any architecture, from 4 bit to 64 bit, and is widely programmable to support any instruction-set, syntax and opcode format (including little/big endian, or mixed encoding).</p>
<p>The NOVAgen technology does support a number of powerful optimizations that are extremely important for microcontrollers and DSPs:</p>
<ul>
<li><em>Instruction scheduling</em><br />
where the order of instructions can be changed in order to minimize pipeline delays.</li>
<li><em>Instruction Parallelization</em><br />
where instruction sequences are replaced by their parallelized counterparts.</li>
<li><em>Jump optimization</em><br />
where the shortest possible coding scheme is selected based on the address range.</li>
<li><em>Peephole optimization</em><br />
where instruction sequences are identified that are to be replaced by shorter ones.</li>
</ul>
<p>The language and the automatic generation process have been very successfully used in combination with instruction-set databases. In this case, the instruction-set is derived either from a hardware design model, or from a specification document, and can directly be used to generate input description files for the NOVAgen generation suite.</p>
<p>The first version was build using Haskell and C.</p>
]]></content:encoded>
			<wfw:commentRss>http://whatwebwhat.com/2008/10/11/nova-assembler-generator/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.429 seconds -->

