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

<channel>
	<title>DestaqueBlog &#187; project</title>
	<atom:link href="http://weblog.destaquenet.com/tag/project/feed/" rel="self" type="application/rss+xml" />
	<link>http://weblog.destaquenet.com</link>
	<description>Blog da equipe Destaquenet.</description>
	<lastBuildDate>Tue, 23 Nov 2010 17:06:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
		<item>
		<title>Understanding Open Source Licenses with Clojure</title>
		<link>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/</link>
		<comments>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/#comments</comments>
		<pubDate>Tue, 05 Oct 2010 12:52:51 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[app]]></category>
		<category><![CDATA[appengine]]></category>
		<category><![CDATA[clojure]]></category>
		<category><![CDATA[compojure]]></category>
		<category><![CDATA[functional programming]]></category>
		<category><![CDATA[licensator]]></category>
		<category><![CDATA[licenses]]></category>
		<category><![CDATA[opensource]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=1236</guid>
		<description><![CDATA[You only know how cool it is to develop or contribute to an open source project until you do so. The worst part is to define which license to use, and this task is frequently neglected by software developers. Recently &#8230; <a href="http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>You only know how cool it is to develop or contribute to an open source project until you do so. The worst part is to define which license to use, and this task is frequently neglected by software developers.</p>
<p>Recently we released <a href="http://licensator.appspot.com">Licensator</a>, a simple web application that gathers information on the most popular open source licenses and helps you choose the right license for your own projects.</p>
<p>The language behind Licensator is <a href="http://clojure.org">Clojure</a>, which proved to be great to solve this sort of problem. We&#8217;ll see today how the application&#8217;s main algorithm works.</p>
<p><span id="more-1236"></span></p>
<h3>REPL: where it all begins</h3>
<p>One of the strengths of dynamic languages is how easily we can transform ideas into working code, and Clojure is no exception. In fact, I decided to write Licensator in one of these coding sessions in the <a href="http://clojure.org/repl_and_main">REPL</a>, Clojure&#8217;s interactive shell. After a few minutes playing with it I saw the problem was indeed easy to solve.</p>
<p>Despite the huge number of licenses, we can easily extract information common to all of them, i.e., if it&#8217;s copyleft, or if a licensed work can be used by closed source software, etc.</p>
<p>Let&#8217;s take the <a href="http://www.opensource.org/licenses/apache2.0.php">Apache v2.0</a> license:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def *licenses*
     <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">long-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache License v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">short-</span><span style="color: #b1b100;">name</span> <span style="color: #ff0000;">&quot;Apache v2.0&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">url</span> <span style="color: #ff0000;">&quot;http://www.opensource.org/licenses/apache2.0.php&quot;</span>
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">derivative-work</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">affero</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> false
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-distribution</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">charge-for-use</span> true
       <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span>
                         <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span> <span style="color: #66cc66;">:</span><span style="color: #555;">public-domain</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>You can see the remaining licenses <a href="http://github.com/danielfm/licensator/blob/master/src/licensator/licenses.clj">here</a>.</p>
<p>Considering all licenses have the same set of information, how can we find the licenses that are not reciprocal and have explicit copyright terms?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyright</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">not</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">freebsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span> <span style="color: #66cc66;">:</span><span style="color: #555;">bsd</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>If you know a little bit about functional programming, this code should be easy to follow. In any case, what this code does is return the <code>:id</code> of all licenses where <code>:copyright</code> is <code>true</code> and <code>:copyleft</code> is <code>false</code>.</p>
<p>Another example: which licenses are compatible with Apache v2.0 and <a href="http://www.opensource.org/licenses/cddl1.php">CDDL v1.0</a>?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>use 'clojure<span style="color: #66cc66;">.</span><span style="color: #b1b100;">set</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>
                    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Here we used the <a href="http://clojure.github.com/clojure/clojure.set-api.html">clojure.set</a> namespace, which provides a few useful functions to deal with relational algebra. The code is very similar to the previous one; the only difference is that now we used the <code>subset?</code> function to get the licenses compatible with <code>[:apl-v20 :cddl-v10]</code>.</p>
<p>One last example: which reciprocal licenses are compatible with Apache v2.0?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span>
  <span style="color: #66cc66;">&#40;</span>filter #<span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">and</span> <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
                <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">copyleft</span> <span style="color: #66cc66;">%</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">agpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">gpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>At this point we can see that there is no magic behind the algorithm; what it does is to filter the list of licenses based on a function.</p>
<h3>The solution</h3>
<p>The code we saw up until now works fine, but it&#8217;s not appropriate to solve the problem since the matching logic is spread all over the place.</p>
<p>It would be better to express the search criteria as a map object&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>def cmap
     <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">:</span><span style="color: #555;">patent</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">closed-source-linking</span> true<span style="color: #66cc66;">,</span> <span style="color: #66cc66;">:</span><span style="color: #555;">compatible-with</span> <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">:</span><span style="color: #555;">mit</span> <span style="color: #66cc66;">:</span><span style="color: #555;">new-bsd</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>&#8230;so we need a function to filter the licenses based on that input, like this:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn find-matches <span style="color: #66cc66;">&#91;</span>cmap data<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>filter <span style="color: #66cc66;">&#40;</span>where cmap<span style="color: #66cc66;">&#41;</span> data<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>Here we have <code>where</code>, yet to be coded, that returns a function that filters the elements (licenses) in <code>data</code> according to the criteria map <code>cmap</code>.</p>
<p>First things first. Which conditions of <code>cmap</code> match the Apache v2.0 license?</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn criteria-matches? <span style="color: #66cc66;">&#91;</span>license <span style="color: #66cc66;">&#91;</span>kval cval<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
  <span style="color: #ff0000;">&quot;Checks whether the criteria condition centry is true for license.&quot;</span>
  <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>lval <span style="color: #66cc66;">&#40;</span>kval license<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
      true
      <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
&nbsp;
<span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span>true true true<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>A license can only be considered compatible with the given criteria if the list only yields <code>true</code>. Therefore, in this case, the Apache v2.0 license is considered to be compatible:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>every? true? <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>partial criteria-matches? apl-v20<span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> true</pre></div></div>

<p>Given all this, a possible implementation of the <code>where</code> function might be:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>defn where
  <span style="color: #ff0000;">&quot;Returns a function that checks whether all conditions in cmap match for license lentry.&quot;</span>
  <span style="color: #66cc66;">&#91;</span>cmap<span style="color: #66cc66;">&#93;</span>
  <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>lentry<span style="color: #66cc66;">&#93;</span>
    <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>res <span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">&#40;</span>fn <span style="color: #66cc66;">&#91;</span>centry<span style="color: #66cc66;">&#93;</span>
		     <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">let</span> <span style="color: #66cc66;">&#91;</span>cval <span style="color: #66cc66;">&#40;</span>val centry<span style="color: #66cc66;">&#41;</span>
			   lval <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>key centry<span style="color: #66cc66;">&#41;</span> lentry<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		       <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">nil</span>? cval<span style="color: #66cc66;">&#41;</span>
			 true
			 <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>coll? lval<span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span>subset? <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> cval<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #b1b100;">set</span> lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
			   <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">=</span> cval lval<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> cmap<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
      <span style="color: #66cc66;">&#40;</span>every? true? res<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>This code is a combination of the previous two snippets; <code>where</code> gets the criteria map <code>cmap</code> and returns a second function, which in turn gets a license entry <code>lentry</code> and checks whether all criteria conditions match.</p>
<p>Since <code>where</code> is used along with <code>filter</code> in <code>find-matches</code>, all licenses compatible with the criteria map <code>cmap</code> are returned:</p>

<div class="wp_syntax"><div class="code"><pre class="lisp" style="font-family:monospace;"><span style="color: #66cc66;">&#40;</span>map <span style="color: #66cc66;">:</span><span style="color: #555;">id</span> <span style="color: #66cc66;">&#40;</span>find-matches cmap *licenses*<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">=&gt;</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">:</span><span style="color: #555;">afl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">apl-v20</span> <span style="color: #66cc66;">:</span><span style="color: #555;">cddl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">epl-v10</span> <span style="color: #66cc66;">:</span><span style="color: #555;">lgpl-v30</span> <span style="color: #66cc66;">:</span><span style="color: #555;">mpl-v11</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>What I like about Clojure &#8212; and functional programming languages in general &#8212; is the ridiculous amount of code it takes to solve certain problems. This algorithm, for example, has only 15 (really short) lines of code. Where is your God now?! <img src='http://weblog.destaquenet.com/wp-includes/images/smilies/icon_razz.gif' alt=':-P' class='wp-smiley' /> </p>
<p>You can see <a href="http://github.com/danielfm/licensator">the whole thing</a> in Github.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2010/10/05/understanding-open-source-licenses-with-clojure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django-Flash e o Novo Framework de Mensagens</title>
		<link>http://weblog.destaquenet.com/2010/05/21/django-flash-e-o-novo-framework-de-mensagens/</link>
		<comments>http://weblog.destaquenet.com/2010/05/21/django-flash-e-o-novo-framework-de-mensagens/#comments</comments>
		<pubDate>Fri, 21 May 2010 02:36:14 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[Português]]></category>
		<category><![CDATA[Programação]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-flash]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=890</guid>
		<description><![CDATA[No começo da semana, depois de vários meses de trabalho duro e algum atraso, a versão 1.2 do Django foi finalmente lançada. Este talvez seja o lançamento mais aguardado do framework desde seu surgimento, e inclui recursos há muito aguardados, &#8230; <a href="http://weblog.destaquenet.com/2010/05/21/django-flash-e-o-novo-framework-de-mensagens/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>No começo da semana, depois de vários meses de trabalho duro e algum atraso, a versão 1.2 do Django <a href="http://www.djangoproject.com/download/">foi finalmente lançada</a>. Este talvez seja o lançamento mais aguardado do framework desde seu surgimento, e inclui recursos há muito aguardados, como <a href="http://docs.djangoproject.com/en/dev/releases/1.2/#support-for-multiple-databases">suporte a múltiplos bancos de dados</a> e um <a href="http://docs.djangoproject.com/en/dev/releases/1.2/#messages-framework">framework de &#8220;mensagens&#8221;</a>.</p>
<p>Sim, eu disse que o Django 1.2 traz incluso um framework de &#8220;mensagens&#8221;. Bom, né? Django realmente precisava vir acompanhado de uma app para resolver essa questão. Isso não significa, no entanto, que <a href="http://djangoflash.destaquenet.com/">Django-Flash</a> será descontinuado ou abandonado.</p>
<p>Então, se você usa Django-Flash em seus projetos, não se preocupe! Nada mudará. Django-Flash já é compatível com Django 1.2, e nós ocontinuaremos a mantê-lo por algumas razões.</p>
<p>A primeira delas é que nos importamos com quem usa nosso software. Nós não quebraremos seus projetos se você decidir fazer o upgrade para uma versão mais recente do Django &#8211; ou se decidir continuar usando uma versão anterior.</p>
<p>A outra é a liberdade de escolha. Você sabe, não existe uma única forma de se resolver todos os problemas. As pessoas devem ser livres para escolher a ferramenta apropriada a uma determinada situação.</p>
<p>Por exemplo, baseado nas minhas primeiras impressões, existem algumas coisas que eu realmente não gostei no novo framework de &#8220;mensagens&#8221;:</p>
<ol>
<li>Ele é <em>verboso</em> mesmo nos casos de uso mais simples</li>
<li>Ele associa mensagens a números de prioridade, encorajando os usuários a usá-lo como um framework de logging/debugging. Quero dizer, um framework de &#8220;mensagens&#8221; não é um framework de logging/debugging, certo?</li>
</ol>
<p>Mas essa é apenas a minha opinião. Talvez seja isso que faz do open source algo tão formidável!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2010/05/21/django-flash-e-o-novo-framework-de-mensagens/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Django-Flash and Django&#8217;s New Messages Framework</title>
		<link>http://weblog.destaquenet.com/2010/05/21/django-flash-and-djangos-new-messages-framework/</link>
		<comments>http://weblog.destaquenet.com/2010/05/21/django-flash-and-djangos-new-messages-framework/#comments</comments>
		<pubDate>Fri, 21 May 2010 02:31:59 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[django]]></category>
		<category><![CDATA[django-flash]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>
		<category><![CDATA[python]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=881</guid>
		<description><![CDATA[Earlier this week, after several months of hard work and some delay, Django 1.2 was finally released. This is probably the most exciting release since Django&#8217;s debut, and brings long waited features, like multi-db support and a user &#8220;messages&#8221; framework. &#8230; <a href="http://weblog.destaquenet.com/2010/05/21/django-flash-and-djangos-new-messages-framework/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Earlier this week, after several months of hard work and some delay, <a href="http://www.djangoproject.com/download/">Django 1.2 was finally released</a>. This is probably the most exciting release since Django&#8217;s debut, and brings long waited features, like <a href="http://docs.djangoproject.com/en/dev/releases/1.2/#support-for-multiple-databases">multi-db support</a> and a <a href="http://docs.djangoproject.com/en/dev/releases/1.2/#messages-framework">user &#8220;messages&#8221; framework</a>.</p>
<p>Yes, I said Django 1.2 comes with built-in user &#8220;messages&#8221; framework. Great, isn&#8217;t it? Django really needed a built-in contrib app to solve this problem. This doesn&#8217;t mean, however, that <a href="http://djangoflash.destaquenet.com/">Django-Flash</a> will be discontinued or abandoned.</p>
<p>So, if you use Django-Flash in your projects, don&#8217;t worry! Nothing will change. Django-Flash is already compatible with Django 1.2, and we&#8217;ll keep improving Django-Flash for a number of reasons.</p>
<p>First of all, we care about the people who use our software. We won&#8217;t break your stuff if you decide to upgrade to a newer version of Django &#8211; or if you decide to keep using the previous version.</p>
<p>Also, freedom of choice is a good thing. You know, there&#8217;s not only one true way to solve every problem. People should be free to choose whatever tool they think is right in a given situation.</p>
<p>For example, based on my first impressions, there are a couple of things I didn&#8217;t like at all about the new user &#8220;messages&#8221; framework:</p>
<ol>
<li>It&#8217;s verbose even for the simple cases</li>
<li>It ties messages to priority numbers, encouraging you to use it like a logging/debugging framework. I mean, a user &#8220;messages&#8221; framework is not a logging/debugging framework, right?</li>
</ol>
<p>But that&#8217;s just my opinion. I guess this is what makes open source so great!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2010/05/21/django-flash-and-djangos-new-messages-framework/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JsHamcrest website launched!</title>
		<link>http://weblog.destaquenet.com/2009/11/23/jshamcrest-website-launched/</link>
		<comments>http://weblog.destaquenet.com/2009/11/23/jshamcrest-website-launched/#comments</comments>
		<pubDate>Mon, 23 Nov 2009 23:37:44 +0000</pubDate>
		<dc:creator>Daniel Martins</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[documentation]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jshamcrest]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[project]]></category>

		<guid isPermaLink="false">http://weblog.destaquenet.com/?p=792</guid>
		<description><![CDATA[We are pleased to announce that the documentation website for JsHamcrest is now publicly available! For those who don&#8217;t know, JsHamcrest is an open source project developed by Destaquenet, first released in April 2009, which aims to provide a useful &#8230; <a href="http://weblog.destaquenet.com/2009/11/23/jshamcrest-website-launched/">Continue lendo <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>We are pleased to announce that the <a href="http://jshamcrest.destaquenet.com">documentation website</a> for JsHamcrest is now publicly available! For those who don&#8217;t know, <a href="http://github.com/danielfm/jshamcrest">JsHamcrest</a> is an open source project developed by <a href="http://www.destaquenet.com">Destaquenet</a>, first released in April 2009, which aims to provide a useful library of matcher objects for JavaScript.</p>
<p>All <a href="http://python.org">Python</a> lovers out there will probably notice that the website was created with <a href="http://sphinx.pocoo.org">Sphinx</a>, a very popular documentation tool in the Python world.</p>
<p>This is very interesting by itself; Sphinx can be used to document softwares written in a wide range of programming languages, not just Python! In fact, our experience using it to document a JavaScript project couldn&#8217;t be better.</p>
<p>Of course there&#8217;s a lot of room for improvements, but we think we&#8217;re getting there. Hopefully. <img src='http://weblog.destaquenet.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.destaquenet.com/2009/11/23/jshamcrest-website-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

