<?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>Neyric.com &#187; javascript</title>
	<atom:link href="http://neyric.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://neyric.com</link>
	<description>projects, programming, blogging...</description>
	<lastBuildDate>Sat, 29 Jan 2011 19:51:22 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>JSON Schema and inputEx</title>
		<link>http://neyric.com/2009/01/26/json-schema-and-inputex/</link>
		<comments>http://neyric.com/2009/01/26/json-schema-and-inputex/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 15:04:20 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[Server-side javascript]]></category>
		<category><![CDATA[inputEx]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[json-schema]]></category>
		<category><![CDATA[Persevere]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=92</guid>
		<description><![CDATA[Proposed by Kris Zyp, JSON Schema takes the good ideas from XML Schema. From http://json-schema.org/ : JSON Schema is a specification for a JSON-based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON &#8230; <a href="http://neyric.com/2009/01/26/json-schema-and-inputex/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Proposed by <a href="http://www.sitepen.com/blog/author/kzyp/">Kris Zyp</a>, JSON Schema takes the good ideas from XML Schema. From <a href="http://json-schema.org/">http://json-schema.org/</a> :</p>
<blockquote><p><em>JSON Schema is a specification for a JSON-based format for defining the structure of JSON data. JSON Schema provides a contract for what JSON data is required for a given application and how it can be modified, much like what XML Schema provides for XML. JSON Schema is intended to provide validation, documentation, and interaction control of JSON data.</em></p></blockquote>
<p>There are numerous similarities between inputEx and JSON Schema. If you are not convinced, here is an example of a JSON schema:</p>
<blockquote><p><code>{"description":"A person",<br />
"type":"object",</code></p>
<p><code> "properties": {<br />
"name": {"type":"string"},<br />
"born" : {</code></p>
<p><code> "type":["integer","string"],<br />
"minimum":1900,<em><br />
</em></code><code> "maximum":2010,<br />
</code></p>
<p><code> "format":"date-time", <em><br />
</em> "optional":true<br />
</code><code> },<br />
"gender" : {"type":"string",<br />
"options":[</code></p>
<p><code> {"value:"male","label":"Guy"},</code></p>
<p><code> {"value":"female","label":"Gal"}]},</code><code><br />
"address" : {"type":"object"</code><code>,<br />
"properties":{</code></p>
<p><code> "street":{"type":"string"},<br />
"city":{"type":"string"},<br />
"state":{"type":"string"}<br />
}<br />
}<br />
</code></p>
<p><code> }<code><br />
</code>}</code></p></blockquote>
<p>inputEx users should be comfortable writing a form for this schema :</p>
<blockquote><p>{</p>
<p>type: &#8220;group&#8221;,</p>
<p>fields: [</p>
<p>{type: "string", inputParams: {name: "name", required: true}},</p>
<p>{type: "date", inputParams: {name: "born"} },</p>
<p>{type: "select", inputParams: {name: "gender", selectOptions:["Guy", "Gal"], selectValues: ["male", "female"]}},</p>
<p>{type: &#8220;group&#8221;, inputParams: {</p>
<p>name:&#8221;address&#8221;,</p>
<p>fields: [</p>
<p>{type: "string", inputParams: {name: "street"}},</p>
<p>{type: "string", inputParams: {name: "city"}},</p>
<p>{type: "string", inputParams: {name: "state"}}</p>
<p>]    }  }  ] }</p></blockquote>
<p>The main difference is that the<strong> JSON schema ontology is data-centric, wheras the inputEx JSON schema ontology is form-centric</strong>, but as you can see, they are very similar.</p>
<p>Another similarity is the self-descriptive ability of JSON Schema and inputEx.<a href="http://code.google.com/p/jsonschema/downloads/detail?name=schemaForSchema.json&amp;can752&amp;q="> JSON Schema has its own schema</a>, a schema for itself. inputEx has the same kind of self reference: the TypeField contains forms to describe the options of each field (you can see this at the end of <a href="http://javascript.neyric.com/inputex/doc/js_docs_out/TypeField.js.html">TypeField.js</a>). This self-referencing property has very nice implications: it gives the opportunity to create <strong>a form to build forms</strong>, and that&#8217;s exactly what the <a href="http://javascript.neyric.com/inputex/inputExBuilder/inputExBuilder.html">inputEx Builder</a> is: a form which outputs inputEx JSON.</p>
<p><strong>inputEx implementation of JSON Schema</strong></p>
<p>In version 0.2.0, I added a (very) light implementation of a JSON Schema to inputEx JSON. Hopefully, Brad Clements saw the advantages of having automatic form generation from JSON schemas and took the prototype one (big) step forward by implementing <a href="http://www.json.com/2007/10/19/json-referencing-proposal-and-library/">JSON referencing</a>. We are now able to create atomic schemas and combine them in nested schemas.</p>
<p>At the current state, inputEx doesn&#8217;t implement all the validation that can be described in JSON Schema, but we are on the way. On the other hand, inputEx has many options concerning the form interface, that are not necessary in JSON Schema, which focuses on data validation. Brad suggested an extension to JSON Schema by adding an &#8220;_inputex&#8221; property to type definition. It allows to set the additionnal interface options for inputEx within the schema.</p>
<p>Both of these features are demonstrated in <a href="http://javascript.neyric.com/inputex/examples/json-schema2.html">this example</a> which is built from <a href="http://javascript.neyric.com/inputex/examples/base-schema.js">this schema</a> (JSON schema with inputEx extension).</p>
<p>The last feature that we&#8217;re missing is the extending capability (&#8220;extends&#8221;:{&#8220;$ref&#8221;:&#8221;person&#8221;}), but the implementation should be pretty straightforward.</p>
<p><strong>Round-trip: defining JSON-Schema through forms, and </strong><strong>Persevere backend</strong></p>
<p>Up to now, we focused on converting JSON schemas to inputEx forms, but the other way is perfectly conceivable ! Leveraging the inputEx Builder, we would have a nice interface to <strong>build JSON schemas and associated forms </strong><strong>at the same time</strong>. Combined<strong> </strong>with the <a href="http://www.persvr.org/">Persevere</a> framework backend, we could provide a very nice administration interface, that let you edit models through the inputEx Builder, then edit the data through the generated inputEx forms. You could argue that some fields should not be visible in forms, but if you take a closer look at inputEx fields, two of them are perfect for this case: the <a href="http://javascript.neyric.com/inputex/examples/hidden_field.html">HiddenField</a>, which is not visible at all, or the <a href="http://javascript.neyric.com/inputex/examples/uneditable_field.html">UneditableField</a> which lets you use a custom rendering method for an uneditable field.</p>
<p>I think this might end up in a more effective interface than the <a href="http://www.persvr.org/explorer.html">current Persevere database explorer</a> because it creates the form interfaces at the same time, and make them reusable within your application.</p>
<p>A last idea, we could provide json-schemas for defining method parameters. inputEx could then automatically generate forms to call these methods (through JSON-RPC or locally).</p>
<p>Of course, if you&#8217;re interested in the following developments, we urge you to contact us <a href="http://groups.google.com/group/inputex/">through the forum</a>.</p>
<p>Have fun !</p>
<div class="shr-publisher-143"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2009/01/26/json-schema-and-inputex/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>inputEx version 0.1.0 released</title>
		<link>http://neyric.com/2008/05/07/inputex-010-released/</link>
		<comments>http://neyric.com/2008/05/07/inputex-010-released/#comments</comments>
		<pubDate>Wed, 07 May 2008 13:12:48 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[YUI Library]]></category>
		<category><![CDATA[inputEx]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=70</guid>
		<description><![CDATA[It&#8217;s finally time ! I just finished the first public version of inputEx. I had this project in my bag since summer 2007. Visit the website at http://javascript.neyric.com/inputex . Here is a short introduction from the documentation : Introduction inputEx &#8230; <a href="http://neyric.com/2008/05/07/inputex-010-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><strong>It&#8217;s finally time !</strong></p>
<p>I just finished the first public version of inputEx. I had this project in my bag since summer 2007.</p>
<p>Visit the website at <a title="inputEx javascript library" href="http://javascript.neyric.com/inputex">http://javascript.neyric.com/inputex</a> . Here is a short introduction from the documentation :</p>
<blockquote>
<h2>Introduction</h2>
<p><a href="../..">inputEx</a> is a javascript library to <strong>build fields and forms</strong>.<br />
It can also be considered as an interface framework, since it provides a good structure to <a href="create_field.html">create you own fields</a>.</p>
<p>It is built on top of the <a href="http://developer.yahoo.com/yui/">YUI library</a>, and we tried to be as close as possible to the YUI philosophy.</p>
<p>It is of course fully skinable using CSS and currently supports Firefox 1.5+, Safari 2.0+, IE 7.0 and Opera 9+.</p>
<h2>A unique field library</h2>
<p>With so many form libraries out there, why would we create another one ?</p>
<ul>
<li>HTML fields/forms are <strong>very</strong> limited</li>
<li>no existing good input library for YUI (let me know if I&#8217;m wrong !), except YUI widgets</li>
<li>it&#8217;s not all about validation !</li>
</ul>
<p>Here are the features we implemented that makes inputEx unique :</p>
<ul>
<li><strong>json configuration</strong> for each field</li>
<li><strong>complex data structures</strong> (list/objects/tree/list of urls/objects of objects etc&#8230;)</li>
<li><strong>composition</strong> between the fields (for &#8220;meta&#8221;-fields such as InPlaceEdit,List,Tree,Pair,&#8230;)</li>
<li><strong>javascript object mapping</strong> for greater interactivity</li>
<li>a <strong>common &#8220;updated&#8221; event</strong> to handle different browsers and different field interactions</li>
</ul>
<h2>No HTML ?</h2>
<p>InputEx uses <strong>no html</strong> (it is the opposite of unobtrusive librairies): all the fields and forms are configured <strong>using <a href="http://json.org/">json</a></strong>, then rendered by <a href="dom_helpers.html">manipulating the DOM</a>.<br />
It is therefore a library to create <strong>javascript web applications, not webpages</strong>.</p>
<p>This approach has a great advantage: adding/modifying a field is made in <strong>one place only</strong>. Combined with<br />
the json configuration that can be stored server-side, it makes customization of your web application very easy.</p>
<h2>Help Us</h2>
<p>It is very easy to help us improving the library :</p>
<ul>
<li><strong>Extend the library</strong>: send your custom fields to the <a href="http://code.google.com/p/inputex/w/list" target="_new">wiki</a>, it might help others !</li>
<li><strong>Give your feedback</strong> on the <a href="http://groups.google.com/group/inputex/" target="_new">forum</a></li>
<li><a href="http://code.google.com/p/inputex/issues/list">Report</a> any bug</li>
</ul>
<h2>Other resources</h2>
<p>If you didn&#8217;t find what you were looking for, please visit these websites :</p>
<ul>
<li><a href="http://javascript.neyric.com/inputex/doc/js_docs_out/examples.html">Examples</a> &#8211; many examples for each field</li>
<li><a href="http://groups.google.com/group/inputex/">Forum</a> &#8211; discussions about inputEx</li>
<li><a href="http://javascript.neyric.com/blog/category/inputex/">Blog</a> &#8211; inputEx news</li>
<li><a href="http://code.google.com/p/inputex/w/list">Wiki</a> &#8211; community ressources</li>
<li>Contact the author: <a href="mailto:inputex@neyric.com">inputex@neyric.com</a></li>
</ul>
</blockquote>
<div class="shr-publisher-70"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2008/05/07/inputex-010-released/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>WireIt version 0.2.1</title>
		<link>http://neyric.com/2008/01/26/wireit-version-021/</link>
		<comments>http://neyric.com/2008/01/26/wireit-version-021/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 15:04:11 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[WireIt]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[wiring]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=7</guid>
		<description><![CDATA[I made a few updates this week-end. They mostly concern the Container and Layer classes. Here are the changes: new Layer.getWiring function to save the state of the wiring. It can be customized by overriding Container.getConfig jsBox updated to use &#8230; <a href="http://neyric.com/2008/01/26/wireit-version-021/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I made a few updates this week-end. They mostly concern the Container<br />
and Layer classes.</p>
<p>Here are the changes:</p>
<ul>
<li>new Layer.getWiring function to save the state of the wiring. It<br />
can be customized by overriding Container.getConfig</li>
<li>jsBox updated to use the Layer.getWiring function</li>
<li>no default width for containers so they can auto-adjust to the<br />
content</li>
<li>Layer.addContainer and Layer.addWire now returns the created<br />
instance</li>
<li>Added the method Container.redrawAllWires and<br />
Terminal.redrawAllWires</li>
<li>Added Layer.removeAllContainers</li>
<li>adds a &#8220;body&#8221; div to the container</li>
<li>CSS updates on Containers and Layers</li>
<li>adds a focus CSS class on the last mousedown-ed container in the<br />
layer</li>
<li>bugfixes (events &#8220;addWire&#8221; and &#8220;removeWire&#8221; added to WireIt.Layer,<br />
offset in the connections)</li>
</ul>
<div class="shr-publisher-135"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2008/01/26/wireit-version-021/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WireIt 0.2.0 released</title>
		<link>http://neyric.com/2008/01/05/wireit-020-released/</link>
		<comments>http://neyric.com/2008/01/05/wireit-020-released/#comments</comments>
		<pubDate>Sat, 05 Jan 2008 00:12:09 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[WireIt]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[wiring]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=8</guid>
		<description><![CDATA[I just released the new 0.2.0 version. You can download it here. Here are the main changes: 2 new classes were added: WireIt.Container and WireIt.Layer Every project you might start using WireIt needs a widget that could contain Terminals, and &#8230; <a href="http://neyric.com/2008/01/05/wireit-020-released/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img src="http://javascript.neyric.com/wireit/jsBox.gif" style="border: 0pt none;margin: 30px" /></p>
<p>I just released the new 0.2.0 version. You can download it <a href="http://wireit.googlecode.com/files/WireIt-0.2.0.zip">here</a>.</p>
<p>Here are the main changes:</p>
<ul>
<li><strong>2 new classes were added: <em>WireIt.Container</em> and <em>WireIt.Layer</em></strong><br />
Every project you might start using WireIt needs a widget that could contain Terminals, and that could be moved around. This is the goal of WireIt.Container.<br />
The Layer class creates a DIV element that can contain multiple containers and wires. It will be useful to save the state of the containers and connections between the terminals. (It also provide an extensible frame with scrollbars.)</li>
<li><strong>Custom events added to create richer interactions when editing the wires.</strong></li>
<li><strong>A minified version built with <a href="http://developer.yahoo.com/yui/compressor/">YUI Compressor</a>.</strong><br />
This javascript minifier is almost perfect: I just wish you could have multiple input files&#8230;<br />
The result file is just below 20k.</li>
<li><a href="http://javascript.neyric.com/wireit/test/jsBox/jsBox.html"><strong>jsBox</strong></a>: This is a sample application using WireIt.<br />
Create boxes containing javascript functions, connect them together, and run your program !</li>
<li>Many new configuration options, configurable CSS class names, and some new methods in the Wire and Terminals classes.</li>
</ul>
<p>Don&#8217;t forget to give your feedback in the <a href="http://groups.google.com/group/wireit">forum</a> !</p>
<p>Have fun !</p>
<div class="shr-publisher-134"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2008/01/05/wireit-020-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WireIt: a javascript wiring library</title>
		<link>http://neyric.com/2007/12/06/wireit-a-javascript-wiring-library/</link>
		<comments>http://neyric.com/2007/12/06/wireit-a-javascript-wiring-library/#comments</comments>
		<pubDate>Thu, 06 Dec 2007 11:45:28 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[WireIt]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[wiring]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=10</guid>
		<description><![CDATA[I&#8217;m pleased to announce the first release of WireIt (version 0.1) ! WireIt is a javascript library that allows you to create cool wires like Yahoo Pipes. It is built upon: the CANVAS tag to render the wires the YUI &#8230; <a href="http://neyric.com/2007/12/06/wireit-a-javascript-wiring-library/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pleased to announce the first release of <a href="http://javascript.neyric.com/wireit/">WireIt</a> (version 0.1) !</p>
<p><a href="http://javascript.neyric.com/wireit/">WireIt</a> is a javascript library that allows you to create cool wires like Yahoo Pipes. It is built upon:</p>
<ul>
<li>the <a href="http://developer.mozilla.org/en/docs/Canvas_tutorial">CANVAS tag</a> to render the wires</li>
<li>the <a href="http://developer.yahoo.com/yui/">YUI Library</a> v2.3.1</li>
<li><a href="http://excanvas.sourceforge.net/">excanvas for IE support</a></li>
</ul>
<p>It comes with some examples (see the <a href="http://javascript.neyric.com/wireit/">home page</a>) and an application example, the <a href="http://javascript.neyric.com/wireit/test/planarGame/planarGame.html">Planar Game</a>.</p>
<p>Why would you make such a library ? After playing a lot with Yahoo! Pipes, I realized how powerful it was to create mashups. I was already used to <a href="http://en.wikipedia.org/wiki/Visual_programming_language">visual programming Languages</a> like PureData or Mac OS Automator, but they&#8217;re definitly not able to do mashups.</p>
<p>However, Yahoo Pipes has this <strong>big inconvenient to run your pipes on their web servers</strong>. It has at least two disadvantages. First, it means we will always be restricted to the modules and types they implemented. You could always create a restful webservice and wrap it into a pipe, but the execution time blows up. Second disadvantage, you have to be careful with your data privacy. Indeed, I would like to create some Mashups that could mix with my private data in a more secure way.</p>
<p>That&#8217;s how I started to develop a Yahoo pipes-like application, and how I ran into this stumble block: &#8220;How the hell did they do those pipes ?&#8221;.</p>
<p>Waiting for your feedback,<br />
Eric</p>
<div class="shr-publisher-133"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2007/12/06/wireit-a-javascript-wiring-library/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>dojo.storage brings new capabilities to web services</title>
		<link>http://neyric.com/2007/02/01/dojostorage-brings-new-capabilities-to-web-services/</link>
		<comments>http://neyric.com/2007/02/01/dojostorage-brings-new-capabilities-to-web-services/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 16:00:22 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[dojo]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[offline]]></category>

		<guid isPermaLink="false">http://dojostorage-brings-new-capabilities-to-web-services</guid>
		<description><![CDATA[Dojo toolkit, is well known in the Ajax community to provide numerous widgets to web developper. Since version 0.4.1, it provides a way to store data on the client side trough dojo.storage. It can use multiple ways to store those &#8230; <a href="http://neyric.com/2007/02/01/dojostorage-brings-new-capabilities-to-web-services/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a target="_blank" href="http://dojotoolkit.org/">Dojo toolkit</a>, is well known in the Ajax community to provide numerous widgets to web developper.</p>
<p>Since version 0.4.1, it provides a way to store data on the client side trough dojo.storage.</p>
<p>It can use multiple ways to store those data, especially flash (which is present on 97% of the computers ).</p>
<p>Check out the Moxie demo application that combines the dojo rich text editor and the dojo.storage method.</p>
<div class="shr-publisher-44"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2007/02/01/dojostorage-brings-new-capabilities-to-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Javascript Coding rules</title>
		<link>http://neyric.com/2007/02/01/javascript-coding-rules/</link>
		<comments>http://neyric.com/2007/02/01/javascript-coding-rules/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 14:37:53 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=28</guid>
		<description><![CDATA[Here are some rules I constrain myself to, and that can be useful for others : Use good code conventions Check your code: JSLint (javascript tools bundle for textmate make it automatic) Minification of your code: JSMin GZIP the code, &#8230; <a href="http://neyric.com/2007/02/01/javascript-coding-rules/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Here are some rules I constrain myself to, and that can be useful for others :</p>
<ol>
<li><a href="http://javascript.crockford.com/code.html" target="_blank"> Use good code conventions</a></li>
<li>Check your code: JSLint (javascript tools bundle for textmate make it automatic)</li>
<li>Minification of your code: <a href="http://javascript.crockford.com/jsmin.html" target="_blank">JSMin</a></li>
<li>GZIP the code, don&#8217;t obfuscate: <a href="http://yuiblog.com/blog/2006/03/06/minification-v-obfuscation/" target="_blank">Minification v. Obfuscation</a></li>
</ol>
<p>You will effectively reduce errors and debugging time by following those advices.</p>
<div class="shr-publisher-126"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2007/02/01/javascript-coding-rules/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Singleton pattern in Javascript</title>
		<link>http://neyric.com/2007/02/01/singleton-pattern-in-javascript/</link>
		<comments>http://neyric.com/2007/02/01/singleton-pattern-in-javascript/#comments</comments>
		<pubDate>Thu, 01 Feb 2007 13:57:15 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[pattern]]></category>
		<category><![CDATA[singleton]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=34</guid>
		<description><![CDATA[If you&#8217;d like to create just one instance of a Class, you&#8217;d better use this singleton pattern: var singleton = function() { /* Private variables */ var privateVariable; /* Private methods */ function privateFunction(x) { // do something here... } &#8230; <a href="http://neyric.com/2007/02/01/singleton-pattern-in-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;d like to create just one instance of a Class, you&#8217;d better use this singleton pattern:</p>
<pre>

var singleton = function() {

  /* Private variables */

  var privateVariable;

  /* Private methods */

  function privateFunction(x) {
    // do something here...
  }

  return {

    /* Public variables */

    publicVariable = 15,

    /* Public methods */

    getVariable: function() {
      return privateVariable;
    },

    setVariable: function() {
      privateVariable = 18;
      privateFunction();
    }
  };

}();</pre>
<p>The magic of this pattern lies in the instanciation of the singleton:</p>
<p>the main function is called directly due to the &#8216;()&#8217; at the end.</p>
<div class="shr-publisher-120"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2007/02/01/singleton-pattern-in-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Autocompletion with Rails and Scriptaculous</title>
		<link>http://neyric.com/2006/10/24/autocompletion-with-rails-and-scriptaculous/</link>
		<comments>http://neyric.com/2006/10/24/autocompletion-with-rails-and-scriptaculous/#comments</comments>
		<pubDate>Tue, 24 Oct 2006 17:31:04 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[scriptaculous]]></category>

		<guid isPermaLink="false">http://autocompletion-with-rails-and-scriptaculous</guid>
		<description><![CDATA[Scriptaculous offers a nice autocompletion component that integrates quite well with Ruby on Rails.Here is a link that shows different ways to plug it in your rails application: http://www.slash7.com/articles/2005/08/13/ajaxariffic-au&#8230;]]></description>
			<content:encoded><![CDATA[<table>
<tbody>
<tr>
<td><img alt="Ruby On Rails" src="http://www.rubyonrails.org/images/rails.png" style="border: 0pt none"></td>
<td style="padding: 15px">
<p>Scriptaculous offers a nice autocompletion component that integrates quite well with Ruby on Rails.Here is a link that shows different ways to plug it in your rails application:</p>
<p><a href="http://www.slash7.com/articles/2005/08/13/ajaxariffic-autocomplete-with-scriptaculous">http://www.slash7.com/articles/2005/08/13/ajaxariffic-au&#8230;</a></td>
</tr>
</tbody>
</table>
<div class="shr-publisher-30"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2006/10/24/autocompletion-with-rails-and-scriptaculous/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>YUI improved Ajax</title>
		<link>http://neyric.com/2006/10/14/yui-improved-ajax/</link>
		<comments>http://neyric.com/2006/10/14/yui-improved-ajax/#comments</comments>
		<pubDate>Sat, 14 Oct 2006 18:28:01 +0000</pubDate>
		<dc:creator>neyric</dc:creator>
				<category><![CDATA[YUI Library]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[library]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://javascript.neyric.com/blog/?p=45</guid>
		<description><![CDATA[&#8220;The Yahoo! User Interface (YUI) Library is a set of utilities and controls, written in JavaScript, for building richly interactive web applications using techniques such as DOM scripting, DHTML and AJAX.&#8221; I found YUI very helpful for my applications. It&#8217;s &#8230; <a href="http://neyric.com/2006/10/14/yui-improved-ajax/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>&#8220;The Yahoo! User Interface (YUI) Library is a set of utilities and controls, 		  written in JavaScript, for building richly interactive web applications 		  using techniques such as DOM scripting, DHTML and AJAX.&#8221;</em></p>
<p>I found <a href="http://developer.yahoo.com/yui/" target="_blank">YUI </a>very helpful for my applications. It&#8217;s not the most complete framework that exists (look at <a href="http://www.backbase.com/" target="_blank">BackBase</a> for example) but it is very promising. You can make new Components easily ( with YAHOO.util.Dom, YAHOO.util.Event ), ajaxified behaviour (with YAHOO.util.Connect.asyncRequest ) etc&#8230;<br />
I recommand two web sites :</p>
<ul>
<li><a href="http://developer.yahoo.com/yui/" target="_blank">YUI Home Page (examples, good documentation and downloads)<br />
</a></li>
<li><a href="http://www.jackslocum.com/yui/index.php" target="_blank">Jack Slocum&#8217;s Blog (<span class="blog-desc">Using the YUI library &#8211; Beyond the Examples)</span></a></li>
</ul>
<p>For WordPress users, you can even use YUI to for the <a href="http://www.jackslocum.com/yui/2006/10/09/my-wordpress-comments-system-built-with-yahoo-ui-and-yahooext/" target="_blank">comments system</a>.</p>
<div class="shr-publisher-119"></div>]]></content:encoded>
			<wfw:commentRss>http://neyric.com/2006/10/14/yui-improved-ajax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

