<?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>by Leandro Milmanda Perez &#187; javascript</title>
	<atom:link href="http://www.lemil.com.ar/blog/index.php/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.lemil.com.ar/blog</link>
	<description>about IT, software &#38; trends.</description>
	<lastBuildDate>Tue, 02 Aug 2011 21:04:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Reviewing Google&#8217;s 03D, a 3D engine for browsers in Javascript.</title>
		<link>http://www.lemil.com.ar/blog/index.php/2009/10/review-of-googles-03d-a-3d-engine-for-browser-in-javascript/</link>
		<comments>http://www.lemil.com.ar/blog/index.php/2009/10/review-of-googles-03d-a-3d-engine-for-browser-in-javascript/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 15:14:34 +0000</pubDate>
		<dc:creator>lemil</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[03d]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[social]]></category>

		<guid isPermaLink="false">http://www.lemil.com.ar/blog/?p=93</guid>
		<description><![CDATA[Hi!, if you followed my latest tweets you may know that I am taking a look to this new tech from Google that was presented on this latest IO convention. This API allows you to create and manipulate 2D and 3D models using only javascript. What is also interesting is the underlying tech around 03d [...]]]></description>
			<content:encoded><![CDATA[<p>Hi!, if you followed my <a href="http://www.twitter.com/lemil">latest tweets</a> you may know that I am taking a look to this new tech from <a href="http://www.google.com">Google</a> that was presented on this latest IO convention. This API allows you to create and manipulate 2D and 3D models using only javascript. What is also interesting is the underlying tech around 03d that is able to  access openGL and Direct3D. Models can be imported from sources as <a href="http://sketchup.google.com/">SketchUp</a>, <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13577897">Maya</a>, <a href="http://usa.autodesk.com/adsk/servlet/pc/index?siteID=123112&amp;id=13567410">Max</a> exporting those to <a href="http://collada.org">COLLADA</a>. More details <a href="http://code.google.com/apis/o3d/docs/techoverview.html">here</a>.</p>
<p><img class="aligncenter" title="O3D Stack" src="http://code.google.com/apis/o3d/images/O3DSoftwareStack.png" alt="" width="420" height="370" /></p>
<p>Also has a complete set of common 3D stuff like shapes, simple objects, textures, particle emiters, cameras, lights, video in 3d, etc. The API is available on their <a href="http://code.google.com/apis/o3d/">web site</a>.</p>
<p>An interesting example that came with the API,  is the trends example. Originally it show the earth with a beam (like the sun) coming out form random places over the surface. I changed that beam to a particle emitter and put a sequence of images of the profile of a location aware (fake) social network. Basically, it shows now who is where in the world (watch the video).</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="data" value="http://www.youtube.com/v/a7fqR9MDaZo&amp;hl=en&amp;fs=1&amp;" /><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/a7fqR9MDaZo&amp;hl=en&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/a7fqR9MDaZo&amp;hl=en&amp;fs=1&amp;" allowscriptaccess="always" allowfullscreen="true" data="http://www.youtube.com/v/a7fqR9MDaZo&amp;hl=en&amp;fs=1&amp;"></embed></object></p>
<p>Another great example is a GAME I&#8217;ve found, a kind of wonder boy style called <a href="http://blog.largeanimal.com/demo/">Infinite journey</a> form LargeAnimal.</p>
<p>That&#8217;s all for now, next time I will be posting more of my work. Appreciate any comment, Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.lemil.com.ar/blog/index.php/2009/10/review-of-googles-03d-a-3d-engine-for-browser-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finite State Machine Utility en Javascript para PureMVC.</title>
		<link>http://www.lemil.com.ar/blog/index.php/2009/10/finite-state-machine-utility-en-javascript-para-puremvc/</link>
		<comments>http://www.lemil.com.ar/blog/index.php/2009/10/finite-state-machine-utility-en-javascript-para-puremvc/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 20:19:48 +0000</pubDate>
		<dc:creator>lemil</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[puremvc]]></category>
		<category><![CDATA[statemachines]]></category>

		<guid isPermaLink="false">http://www.lemil.com.ar/blog/index.php/2009/10/finite-state-machine-utility-en-javascript-para-puremvc/</guid>
		<description><![CDATA[Hello Folks!, I am working again to contribute with a sequel of my previous work about finite state machines implementation framework. This time I am working to mashup a FSM into the pureMVC framework in Javscript. I&#8217;ve used the FSM utility in AS# and I loved it since the first time, but I was kinda [...]]]></description>
			<content:encoded><![CDATA[<p>Hello Folks!, I am working again to contribute with a sequel of my previous work about finite state machines implementation framework. This time I am working to mashup a FSM into the pureMVC framework in Javscript. I&#8217;ve used the FSM utility in AS# and I loved it since the first time, but I was kinda shocked, when I realized that this utility was not available on Javascript. Since I&#8217;m a JS, PureMVC and FSM fan I am working hard to make a neat port of this, available soon to the PureMVC dev community.</p>
<p>Cheers!, and don&#8217;t be shy and write comments below!. *this time I will read them all, promise!.  </p>
]]></content:encoded>
			<wfw:commentRss>http://www.lemil.com.ar/blog/index.php/2009/10/finite-state-machine-utility-en-javascript-para-puremvc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State machines for &#8216;javascript&#8217;</title>
		<link>http://www.lemil.com.ar/blog/index.php/2008/12/state-machines-for-javascript/</link>
		<comments>http://www.lemil.com.ar/blog/index.php/2008/12/state-machines-for-javascript/#comments</comments>
		<pubDate>Thu, 11 Dec 2008 18:48:59 +0000</pubDate>
		<dc:creator>lemil</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[clousure]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[maquina]]></category>
		<category><![CDATA[plugin]]></category>
		<category><![CDATA[prototype]]></category>
		<category><![CDATA[state machine]]></category>

		<guid isPermaLink="false">http://www.lemil.com.ar/blog/?p=23</guid>
		<description><![CDATA[Today I am presenting a (yet) small but usefull framework to use in ajax clients that I build and use &#8230;      What is Maquina? Maquina is a petri net runtime implementation for Javascript and other languages like AS3 and java (work in progress).    Why do I need a state machine ? Finite [...]]]></description>
			<content:encoded><![CDATA[<p>Today I am presenting a (yet) small but usefull framework to use in ajax clients that I build and use &#8230;</p>
<div>
<h1 style="text-align: justify; "><strong><a href="http://www.lemil.com.ar/blog/wp-content/uploads/2008/12/gears.gif"><img class="size-full wp-image-25 alignright" title="maquina gears" src="http://www.lemil.com.ar/blog/wp-content/uploads/2008/12/gears.gif" alt="maquina logo" width="48" height="48" /></a>  </p>
<p></strong> </h1>
<h3>What is Maquina?</h3>
<p class="MsoNormal">Maquina is a petri net runtime implementation for Javascript and other languages like AS3 and java (work in progress). </p>
<p class="MsoNormal"> </p>
<h3>Why do I need a state machine ?</h3>
<p class="MsoNormal">Finite state machines have long been used as an organizing principle for designing and implementing complex behavior in event-driven programs, such as network adapters and compilers. Now, programmable Web browsers have opened a new event-driven environment to a new generation of applications. Browser-based applications, popularized by Ajax, are becoming more complex. Designers and implementers can benefit from the discipline and structure that finite state machines offer. In this article, you, learn how to use a finite state machine to design complex behavior for a simple Web widget &#8212; an animated tooltip that fades into and out of view. (read more = http://www.ibm.com/developerworks/library/wa-finitemach1/ ).</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"> </p>
<h3>How it Works&#8230;</h3>
<p class="MsoNormal"><span> This plugin controls the lifecycle of an input form. To implement it, the changes described below, should be done in the existing application.</span></p>
<p class="MsoNormal"><span>  </span></p>
<p class="MsoNormal"><em><span>1 &#8211; Add Scripting libraries…</span></em></p>
<p class="MsoNormal"> </p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>&lt;!&#8211; Maquina Core &#8211;&gt;</span></p>
<p class="MsoNormal"><span>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;../../maquina.js&#8221;&gt;&lt;/script&gt;</span></p>
<p class="MsoNormal"><span>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;../../plugins/form/plugin.js&#8221;&gt;&lt;/script&gt;</span></p>
<p class="MsoNormal"><span>&lt;!&#8211; this example uses prototype lib &#8211;&gt;</span></p>
<p class="MsoNormal"><span>&lt;script type=&#8221;text/javascript&#8221; src=&#8221;http://www.prototypejs.org/assets/2008/1/25/prototype-.6.0.2.js&#8221;&gt;&lt;/script&gt;</span></p>
</div>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>(*) yes, we use prototype.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><em><span>2 &#8211; Create a form in HTML <span> </span>…</span></em></p>
<p class="MsoNormal"><span> </span></p>
<p> </p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>&lt;div class=&#8221;widget_form&#8221;&gt;</span></p>
<p class="MsoNormal"><span><span>            </span>&lt;div id=&#8221;form1_flash_state&#8221; &gt;&lt;/div&gt;</span></p>
<p class="MsoNormal"><span><span>            </span>&lt;form id=&#8217;form1_form&#8217; name=&#8217;form1_form&#8217; &gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;h3&gt;Maquina Form Test&lt;/h3&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;div id=&#8221;form1_widget_message_top&#8221; class=&#8221;widget_message&#8221;&gt;&lt;/div&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;label for=&#8221;fullname&#8221;&gt;FullName&lt;/label&gt;</span></p>
<p class="MsoNormal"><span>                        &lt;input type=&#8221;text&#8221; name=&#8221;fullname&#8221; id=&#8221;fullname&#8221;</span></p>
<p class="MsoNormal"><span>                                    onkeyup<strong>=&#8221;maquina.plugins.form.handleFormEvent(&#8216;form1&#8242;,&#8217;change&#8217;)&#8221;</strong>/&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;br /&gt;&lt;br /&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;label for=&#8221;Description&#8221;&gt;Description&lt;/label&gt;</span></p>
<p class="MsoNormal"><span>                       &lt;input type=&#8221;text&#8221; name=&#8221;description&#8221; id=&#8221;description&#8221;</span></p>
<p class="MsoNormal"><span>                                    oneyup=&#8221;maquina.plugins.form.handleFormEvent(&#8216;form1&#8242;,&#8217;change&#8217;)&#8221;/&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;br /&gt;&lt;br /&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;label for=&#8221;Age&#8221;&gt;Age&lt;/label&gt;</span></p>
<p class="MsoNormal"><span>                       &lt;select name=&#8221;age&#8221; </span></p>
<p class="MsoNormal"><span>                                onchange=<strong>&#8220;maquina.plugins.form.handleFormEvent(&#8216;form1&#8242;,&#8217;change&#8217;)&#8221;<span> </span></strong>&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;option value=&#8221;20-30&#8243;&gt;20-30&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;option value=&#8221;30-40&#8243;&gt;30-40&lt;/option&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;/select&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;br /&gt;&lt;br /&gt;</span></p>
<p class="MsoNormal"><span>                        &lt;div id=&#8221;form1_widget_message_footer&#8221; class=&#8221;widget_message&#8221;&gt;&lt;/div&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;br /&gt;</span></p>
<p class="MsoNormal"><span><span>                        </span>&lt;div id=&#8221;form1_widget_button_bar&#8221; class=&#8221;widget_button_bar&#8221;&gt;&lt;/div&gt;</span></p>
<p class="MsoNormal"><span><span>            </span>&lt;/form&gt;</span></p>
<p class="MsoNormal"><span>&lt;/div&gt;</span></p>
</div>
<p> </p>
<p class="MsoNormal"><span>  </span></p>
<p class="MsoNormal"><span>(*) The tags<span>  </span>with “class=widget_message” show validation and app messages.</span></p>
<p class="MsoNormal"><span>(**) Note that there is no button bar in the form neither action property in the form tag. Everything is going to be managed by the plugin.</span></p>
<p class="MsoNormal"><span>(***) Note in bold are the triggers to the dirty state. Include this on every single input element that is going to trigger a change of state.</span></p>
<p class="MsoNormal"><span>  </span></p>
<p class="MsoNormal"><em><span>3 &#8211; Initialize the form….</span></em></p>
<p> </p>
<p class="MsoNormal"><span> </span></p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>&lt;script type=&#8221;text/javascript&#8221;&gt;</span></p>
<p class="MsoNormal"><span>var base_url = &#8220;http://localhost/maquina/ports/javascript/1.0/src/trunk/examples&#8221;;</span></p>
<p class="MsoNormal"><span>/* Initialize</span></p>
<p class="MsoNormal"><span><span> </span>* execute this function when ever you want to inititalize the state machine</span></p>
<p class="MsoNormal"><span><span> </span>**/</span></p>
<p class="MsoNormal"><span>function initialize()</span></p>
<p class="MsoNormal"><span>{</span></p>
<p class="MsoNormal"><span><span>            </span>try {</span></p>
<p class="MsoNormal"><span><span>                        </span><strong><span>//(Optional) Just a loggin function included in maquina</span></strong></span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>consolelog(&#8220;initialize form1&#8243;);</span></p>
<p class="MsoNormal"><span><span>                        </span><strong><span>//This is to insert the button bar in the placeholder</span></strong></span></p>
<p class="MsoNormal"><span><span>            </span><span>           </span>maquina.plugins.form.renderFormCommandBar(&#8220;form1&#8243;);</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span><span>                        </span><strong><span>//Create a context (model) that the state machine is going to use.</span></strong></span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>var context1 = [];</span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>context1["graph"] =<span>  </span>new maquina.plugins.form.graph(); <strong><span>//this is the default behaviour</span></strong></span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>context1["ajax"] = [];</span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>context1.ajax["url"] = &#8220;form_plugin_backend.php&#8221;;<span> </span><strong><span>//Put here the action url</span></strong></span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span><span>            </span>maquina.createStateMachine(&#8220;form1&#8243;, context1);</span></p>
<p class="MsoNormal"><span><span>            </span><span>           </span></span></p>
<p class="MsoNormal"><span><span>            </span>} catch(e) {</span></p>
<p class="MsoNormal"><span><span>                        </span>console.error(&#8220;Error at initialize! : &#8221; + e.message);</span></p>
<p class="MsoNormal"><span><span>            </span>}</span></p>
<p class="MsoNormal"><span>}</span></p>
<p class="MsoNormal"><span>//Trigger this on page Load</span></p>
<p class="MsoNormal"><span>window.onload = function() {</span></p>
<p class="MsoNormal"><span><span>            </span>consolelog(&#8220;initialize()&#8221;);</span></p>
<p class="MsoNormal"><span><span>            </span>initialize();</span></p>
<p class="MsoNormal"><span>}</span></p>
<p class="MsoNormal"><span>&lt;/script&gt;</span></p>
</div>
<p class="MsoNormal"><em><span> </span></em></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><em><span>4 &#8211; (Oprtional) you can use your own validation function in javascript…</span></em></p>
<p class="MsoNormal"><span> </span></p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>function validate_miform(context){</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>var form = context["elements"]["form"];</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>// You can retrieve any value stored in the context.</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>ar projID = context["projID"];</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>var divID = context["divID"];</span></p>
<p class="MsoNormal"><span><span>       </span></span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span><span>         </span><span>   </span>var err = new Array();</span></p>
<p class="MsoNormal"><span><span>        </span><span>    </span>err['haserrors'] = false;</span></p>
<p class="MsoNormal"><span><span>   </span><span>        </span></span></p>
<p class="MsoNormal"><span><span>        </span><span>    </span>if(ifEmpty($(&#8216;notes_0&#8242;).value))</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>{</span></p>
<p class="MsoNormal"><span><span>           <span>    </span><span>        <span> </span>//Append your error message to the correct tag (see error model below)</span></span></span></p>
<p class="MsoNormal"><span><span>    </span><span>        <span>    </span><span>        err['top'] = &#8216;You must type a Note to Save Overall Status &#8216;;</span></span></span></p>
<p class="MsoNormal"><span><span>           </span><span><span>    </span><span>        <span> </span>err['haserrors'] = true;</span></span></span></p>
<p class="MsoNormal"><span><span>        </span><span>    </span>}</span></p>
<p class="MsoNormal"><span><span>       </span></span></p>
<p class="MsoNormal"><span><span>        </span><span>    </span>if(ifEmpty($(&#8216;status_0&#8242;).value))</span></p>
<p class="MsoNormal"><span><span>        </span><span>    </span>{</span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>err['footer'] = &#8220;You must assign an Overall Status to save Overall Status Notes&#8221;;</span></p>
<p class="MsoNormal"><span><span>            </span><span>            </span>err['haserrors'] = true;</span></p>
<p class="MsoNormal"><span><span>         </span><span>   </span>}</span></p>
<p class="MsoNormal"><span><span>            </span></span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>if (err['haserrors'] == true){<span>  </span></span></p>
<p class="MsoNormal"><span><span>           </span><span>    </span><span>        </span>err['result'] = &#8216;failure&#8217;;</span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>} else {<span> </span></span></p>
<p class="MsoNormal"><span><span>            <span>    </span><span>        err['result'] = &#8216;success&#8217;;</span></span></span></p>
<p class="MsoNormal"><span><span>    </span><span>        </span>}</span></p>
<p class="MsoNormal"><span>return err;</span></p>
<p class="MsoNormal"><span>}</span></p>
</div>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>(*) You can<span>  </span>customize also the type of message displayed on each place. By adding prefixes ( “error:” , “alert:” or nothing “” ) you can change the images associated to the error message.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><em><span>Error (Inform) model …</span></em></p>
<p class="MsoNormal"> </p>
<div class="mceTemp mceIEcenter">
<dl id="attachment_24" class="wp-caption aligncenter" style="width: 510px;">
<dt class="wp-caption-dt"><a href="http://www.lemil.com.ar/blog/wp-content/uploads/2008/12/error-model.jpg"><img class="size-full wp-image-24" title="error-model" src="http://www.lemil.com.ar/blog/wp-content/uploads/2008/12/error-model.jpg" alt="maquina-error-model" width="500" height="150" /></a></dt>
</dl>
</div>
<p> </p>
<p class="MsoNormal"><span>(**) This model should be created in the validation function. Also in this function you can choose where to display the messages.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>Important: to execute this function before submitting the data you just need to do this on step 3…</span></p>
<p class="MsoNormal"><span>  </span></p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>context[“validation”] = validate_miform;</span></p>
</div>
<p class="MsoNormal"><span>  </span></p>
<p class="MsoNormal"><em><span>5 &#8211; What to do at the server side… (in php)</span></em></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><span>function server_side_processs_XXXXX($div,$projID)</span></p>
<p class="MsoNormal"><span>{</span></p>
<p class="MsoNormal"><span><span>  </span>[..]</span></p>
<p class="MsoNormal"><code><span>//Example - Form Submit Response</span></code></p>
<p class="MsoNormal"><code><span>$result['flag'] = 'success';</span></code></p>
<p class="MsoNormal"><code><span>$result['widget_message'] = 'Settings Succesfully saved';</span></code></p>
<p class="MsoNormal"><code><span>$result['errors']['top'] = '';</span></code></p>
<p class="MsoNormal"><code><span>$result['errors']['footer'] = 'Changes succesfully saved!';</span></code></p>
<p class="MsoNormal"><code><span>echo json_encode($result) ;</span></code></p>
<p class="MsoNormal"><span><span> </span>}</span></p>
</div>
<p class="MsoNormal"><span>  </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>(*) You just need to build a custom message in an array with the format descripbed above. </span><code><span>'widget_message'</span></code><span> = messages are going to be displayed in the button bar. Top and footer in the divs with those names.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>The message that should be json encoded so don’t forget. ho add this (again in php)…</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<div style="background-color: #f7f7f7; border: 1px solid #c0c0c0">
<p class="MsoNormal"><code><span>header('Content-type: application/json');</span></code></p>
</div>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"><span>(**) flags :</span></p>
<p class="MsoNormal"><span>Result: the word “success” or “failure”</span></p>
<p class="MsoNormal"><span>Message: any message to be displayed. You can embed html here.</span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal"> </p>
<p class="MsoNormal">Conclusions&#8230;</p>
<p class="MsoNormal">This is the first thing tutorial I create for this framework , I will be upgrading it and uploading new stuff about this&#8230;</p>
<p class="MsoNormal"> </p>
<p class="MsoNormal"><strong>by </strong><a href="http://www.lemil.com.ar/blog/?page_id=2" target="_self"><strong>Leandro Milmanda Perez</strong></a></p>
<p class="MsoNormal"><span> </span></p>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.lemil.com.ar/blog/index.php/2008/12/state-machines-for-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Widget Factory</title>
		<link>http://www.lemil.com.ar/blog/index.php/2008/12/a-widget-factory/</link>
		<comments>http://www.lemil.com.ar/blog/index.php/2008/12/a-widget-factory/#comments</comments>
		<pubDate>Fri, 05 Dec 2008 14:24:16 +0000</pubDate>
		<dc:creator>lemil</dc:creator>
				<category><![CDATA[tools]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[igoogle]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[opensocial]]></category>
		<category><![CDATA[widget]]></category>

		<guid isPermaLink="false">http://lemil.com.ar/blog/?p=7</guid>
		<description><![CDATA[Que es un widget?: Es toda aquella mini applicación que vive dentro de una seccción, ( o simplemente  espacio rectangular) de una página web y que generalmente es provista y hosteada por otro site. Que es un widget factory?: Desde hace un tiempo viene imponiendo el uso de &#8221;widgets&#8221; dentro de páginas, portales y casi todas las redes sociales (si no [...]]]></description>
			<content:encoded><![CDATA[<p>Que es un widget?: Es toda aquella mini applicación que vive dentro de una seccción, ( o simplemente  espacio rectangular) de una página web y que generalmente es provista y hosteada por otro site.</p>
<p><em>Que es un widget factory?: </em>Desde hace un tiempo viene imponiendo el uso de &#8221;widgets&#8221; dentro de páginas, portales y casi todas las redes sociales (si no sabes de que hablo googlea UWA, Yahoo widget, widget, etc), como una forma de proveer más servicios. Cabe destacar que uno de los principales usos de estas mini aplicaciones es publicidad. Dentro de la redes sociales los widgets se usan con aplicaciones (gifts, trivias y encuestas, etc).</p>
<p> </p>
<p>Caso 1: Zembly </p>
<div id="attachment_8" class="wp-caption aligncenter" style="width: 195px"><a href="http://lemil.com.ar/blog/wp-admin/www.zembly.com"><img class="size-medium wp-image-8 " title="tmp3b8" src="http://lemil.com.ar/blog/wp-content/uploads/2008/12/tmp3b8.png" alt="" width="185" height="51" /></a><p class="wp-caption-text">zembly</p></div>
<p style="text-align: left; ">El site provee un entorno de desarrollo, integrando varios parters (ver abajo), donde el usuario pueda compartir aplicaciones, widgets, y servicios entre sus amistades y comunidad. Sun Microsystems y Meebo son uno de los patrocinadores del site.</p>
<p>Tiene un buscador de componentes donde se puede encontrar ejemplos desarrollados por la comunidad. </p>
<p>También trae snipplets con las API&#8217;s de javascript más populares ( amazon, delicious, flickr, facebook, etc.) aunque le faltan a mi gusto Ajax api&#8217;s ( prototype, jquery, etc).</p>
<p>Algunos puntos fuertes&#8230;</p>
<ul>
<li>La IDE web (hecha en javascript) que trae el site, es bastante completa y trae un sabdbox para el debugging del widget.</li>
<li>Algo muy bueno, -nunca perdí una sola línea de código por más que nunca me presioné save.</li>
<li>Guarda todas las versiones de tu gadget con fecha y coments de la &#8220;release&#8221;.</li>
<li>Tiene un &#8220;runner&#8221; para casi todos los tipos de template que ofrece donde se puede ver al instante (2 segs) los cambios ingresados al editor.</li>
<li>En el perfil de usuario tiene un widget con un &#8220;timeline&#8221; con las versiones de cada componente y actividad de usuario.</li>
<li>Incluye &#8220;templates&#8221; para Facebook Apps, y Widget en general y Services.</li>
<li>Búsquedas de Gadgets y respectivo Clone de Gadgets. Muy buen para aprender de los ejemplos del otro.</li>
<li>Actividades de red social. ( what&#8217;s happenning, people, inbox). </li>
<li>Usar, copiar y clonar apps y servicios que otros crean. </li>
<li>Permite el &#8220;deployment&#8221; del gadget en mas de 15 tipos de redes sociales y otros containers (faceboo, igoogle, live, myyearbook, typepad, yahoo widgets y netvibes entre otros), email, wodpress, entre otros.</li>
<li>Las facebook apps son muy faciles de hacer y publicar. Trae un wizzard para la publicación de aplicaciones muy completo (copiado casi textual a lo que ofrece clearpsring).</li>
<li>La publicacion de widgets para Netvibes, IGoogle, Live, Blogger y otros con 1 o dos Clicks. </li>
</ul>
<p>Puntos a mejorar&#8230;</p>
<ul>
<li>Solo funciona en firefox. &#8221;&#8230;zembly is best experienced using Firefox 2, support for other browsers is a work in progress so you will be helping us test if you choose to continue.&#8221;</li>
<li>Algún que otro bug menor (recordemos que aún esta en beta).</li>
<li>No trae soporte para testing de la aplicaciones ni servicios.</li>
<li>La IDE, si bien está bastante bien lograda, no tiene las mismas prestaciones que una desk. </li>
<li>Luego de haberla usado por varias horas seguidas se hace un poco mas lento, cosa que puede impacientar al usuario. </li>
<li>A la fecha la documentacion no es muy extensa.</li>
<li>No se pueden usar libraries externas en la creacion de servicios. </li>
<li>Cualquiera puede copiar el codigo de otro, sin restricciones.</li>
<li>Hoy no avisa cuando te suman amigos, ni cuando te visitan ni ven el codigo.</li>
</ul>
<p>Algunas apps y widgets de ejemplo que cree son&#8230;</p>
<ul>
<li>GoEar Box :      http://apps.facebook.com/goearbox</li>
<li>Globant Map:   http://www.clearspring.com/widgets/493697300b925e65?p=-&amp;flv=%3Dnull</li>
</ul>
<p> </p>
<p>Caso 2: Clearspring</p>
<p> </p>
<div id="attachment_9" class="wp-caption aligncenter" style="width: 216px"><a href="www.clearspring.com"><img class="size-medium wp-image-9  " title="Clearpsring" src="http://lemil.com.ar/blog/wp-content/uploads/2008/12/clearpsring.jpg" alt="clearpsring" width="206" height="63" /></a><p class="wp-caption-text">Clearpsring</p></div>
<p> </p>
<p> </p>
<p>Tiene una pagina que ofrece exactamente el mismo servicio que zembly. La mayor diferencia esta en que zembly propone generar el widget por codigo y clearpsring a traves de wizards (aunque tambien se puede editar el code).  El site esta orientado a la creación de widgets para publicidad y no tanto a la creación de aplicaciones dentro de widgets.</p>
<p>Puntos Fuertes&#8230; </p>
<p> </p>
<ul>
<li>Es la plataforma donde que usan otros (zembly) para el deployment.</li>
<li>El deployement se puede hacer en todas las redes sociales.</li>
<li>Se pueden crear widget sin conocimeinto ni escribir una sola línea de código. </li>
<li>No es una beta, funciona muy bien, y sin bugs.</li>
</ul>
<p>Un ejemplo de lo que cree en este site &#8230;.</p>
<p> </p>
<ul>
<li>http://widgets.clearspring.com/o/493699398180d207/49393dd67b9ac4d3/493699398180d207/2bb6b08c</li>
</ul>
<p> </p>
<p> </p>
<p> </p>
<p><em>Final:</em></p>
<p>Esto es todo por el momento,  si les gusto por favor posteen sus comentarios ,</p>
<p>saludos&#8230;</p>
<p><strong>por <a title="About me.." href="http://www.lemil.com.ar/blog/?page_id=2" target="_self">Leandro Milmanda Perez</a></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.lemil.com.ar/blog/index.php/2008/12/a-widget-factory/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

