<?xml version="1.0"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Daffs blog</title>
    <link>http://daffl.github.com</link>
    <atom:link href="http://daffl.github.com/rss.xml" rel="self" type="application/rss+xml" />
    <description>Still keeping it simple</description>
    <language>en-us</language>
    <pubDate>Mon, 02 Apr 2012 19:17:50 -0700</pubDate>
    <lastBuildDate>Mon, 02 Apr 2012 19:17:50 -0700</lastBuildDate>

    
    <item>
      <title>GitHub page generators</title>
      <link>http://daffl.github.com/2012/04/02/github-pages.html</link>
      <pubDate>Mon, 02 Apr 2012 00:00:00 -0700</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2012/04/02/github-pages</guid>
      <description>&lt;p&gt;GitHub &lt;a href='https://twitter.com/#!/github/status/186857260159475712'&gt;just tweeted&lt;/a&gt; about new layouts for the instant page generator. There are some really good looking layouts which I think any developer knows to appreciate. Besides the page generator there are also other tools that can help you set up a nice looking home page for your project.&lt;/p&gt;

&lt;h2 id='paige'&gt;Paige&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://rthauby.github.com/Paige/'&gt;Paige&lt;/a&gt; does &lt;em&gt;&amp;#8220;Super simple project page generation&amp;#8221;&lt;/em&gt; from your readme.markdown file and &lt;a href='http://jashkenas.github.com/docco/'&gt;Docco&lt;/a&gt; annotated source code. You need NodeJS and Pygments and you can easily install it using NPM:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;sudo npm install paige &amp;#8211;global&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Then set up a &lt;em&gt;paige.json&lt;/em&gt; configuration file in your project like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;{
  &amp;quot;title&amp;quot; :             &amp;quot;Paige.js&amp;quot;,
  &amp;quot;content_file&amp;quot; :      &amp;quot;readme.markdown&amp;quot;,
  &amp;quot;include_index&amp;quot; :     true,
  &amp;quot;docco_files&amp;quot; :       &amp;quot;src/*.coffee&amp;quot;,
  &amp;quot;header&amp;quot; :            &amp;quot;Paige.js&amp;quot;,
  &amp;quot;subheader&amp;quot; :         &amp;quot;Super simple project page generation&amp;quot;,
  &amp;quot;background&amp;quot; :        &amp;quot;diagonal-noise&amp;quot;,
  &amp;quot;github&amp;quot; :            &amp;quot;https://github.com/rthauby/Paige&amp;quot;
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;em&gt;include_index&lt;/em&gt; will generate an index of the Docco annotated source files given in &lt;em&gt;docco_files&lt;/em&gt;. The &lt;em&gt;github&lt;/em&gt; option I implemented (thanks &lt;a href='https://github.com/rthauby'&gt;rthauby&lt;/a&gt; for pulling it into 0.1.7) adds the &amp;#8220;Fork me on GitHub&amp;#8221; ribbon if you provide a link to your GitHub project.&lt;/p&gt;

&lt;p&gt;To see it in action visit the &lt;a href='https://github.com/rthauby'&gt;Paige&lt;/a&gt; or the &lt;a href='http://daffl.github.com/uberproto/'&gt;UberProto&lt;/a&gt; homepage.&lt;/p&gt;

&lt;h2 id='documentup'&gt;DocumentUp&lt;/h2&gt;

&lt;p&gt;&lt;a href='http://documentup.com/'&gt;DocumentUp&lt;/a&gt; generates a nice single page documentation with a left menu navigation from your projects readme file. It is dead easy to use. Just go to &lt;code&gt;http://documentup.com/username/repository&lt;/code&gt; and you will see the DocumentUp documentation for your project. To regenerate visit &lt;code&gt;http://documentup.com/username/repository/recompile&lt;/code&gt;. To use it in your &lt;a href='http://help.github.com/pages/'&gt;GitHub page&lt;/a&gt; create an &lt;code&gt;index.html&lt;/code&gt; in the &lt;code&gt;gh-pages&lt;/code&gt; branch like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
  &amp;lt;head&amp;gt;
    &amp;lt;script src=&amp;quot;documentup.min.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;
    &amp;lt;script&amp;gt;
      DocumentUp.document(&amp;quot;username/repository&amp;quot;);
    &amp;lt;/script&amp;gt;
  &amp;lt;/head&amp;gt;
  &amp;lt;body&amp;gt;&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I am currently working on migrating the &lt;a href='documentup.com/daffl/jquery.dform'&gt;jQuery.dForm documentation&lt;/a&gt; to DocumentUp and it works really well.&lt;/p&gt;

&lt;h2 id='jekyll'&gt;Jekyll&lt;/h2&gt;

&lt;p&gt;If you want to create your own layout but you still like to use &lt;a href='http://daringfireball.net/projects/markdown/syntax'&gt;Markdown&lt;/a&gt; for documentation pages then &lt;a href='https://github.com/mojombo/jekyll'&gt;Jekyll&lt;/a&gt; might be a good choice (also used for this Blog). Jekyll is a static site generator that is supported by GitHub out of the box. That means that it will run as a post commit hook when setting up the &lt;a href='https://github.com/mojombo/jekyll/wiki/Usage'&gt;basic Jekyll structure&lt;/a&gt; in the &lt;code&gt;gh-pages&lt;/code&gt; branch. A great place to get started is &lt;a href='http://jekyllbootstrap.com/'&gt;Jekyll Bootstrap&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>JavaScript module compatibility</title>
      <link>http://daffl.github.com/2012/02/22/javascript-modules.html</link>
      <pubDate>Wed, 22 Feb 2012 00:00:00 -0800</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2012/02/22/javascript-modules</guid>
      <description>&lt;p&gt;For my &lt;a href='http://daffl.github.com/uberproto/'&gt;latest project&lt;/a&gt; I wanted to make the library to be available as an &lt;a href='https://github.com/amdjs/amdjs-api/wiki/AMD'&gt;AMD&lt;/a&gt; or &lt;a href='http://nodejs.org/docs/latest/api/modules.html'&gt;NodeJS&lt;/a&gt; module and, as a fallback, in a global variable (e.g. when referenced directly as a script in the browser). The following wrapper provides this kind of compatibility when there are no dependencies:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;(function(namespace) {
	if(typeof define == &amp;quot;undefined&amp;quot;) {
		define = function(fn) {
			var res = fn();
			if(typeof exports == &amp;quot;undefined&amp;quot;) {
				window[namespace] = res;
			} else {
				module.exports = res;
			}
		}
	};
	
	define(function() {
		// Return the module api
		return {
			hello : &amp;#39;World&amp;#39;
		};
	});
})(&amp;#39;MyLib&amp;#39;);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If there is a module loader (like &lt;a href='http://requirejs.org/'&gt;RequireJS&lt;/a&gt;) and the &lt;em&gt;define&lt;/em&gt; function is available, it will directly use it. In NodeJS the return value of the function given to &lt;em&gt;define&lt;/em&gt; will be used as the module exports and in a browser environment the return value will be declared as a global variable with the name passed to the anonymous wrapper function (here it is called &lt;em&gt;MyLib&lt;/em&gt;). Explicitly returning the modules API is also refered to as the &lt;a href='http://www.klauskomenda.com/code/javascript-programming-patterns/#revealing'&gt;revealing module pattern&lt;/a&gt;.&lt;/p&gt;

&lt;h3 id='using_amd_eg_requirejs'&gt;Using AMD (e.g. RequireJS)&lt;/h3&gt;

&lt;p&gt;With the given wrapper in a file called mylib.js in the right folder:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;define([&amp;#39;mylib&amp;#39;], function(MyLib) {
	console.log(MyLib.hello); // -&amp;gt; &amp;#39;World&amp;#39; 
	// Source goes here
});&lt;/code&gt;&lt;/pre&gt;

&lt;h3 id='straight_in_the_browser'&gt;Straight in the browser&lt;/h3&gt;

&lt;p&gt;Directly loading mylib.js in the browser&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot; src=&amp;quot;mylib.js&amp;quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;will make the library available as a global variable with the given name (_MyLib_).&lt;/p&gt;

&lt;h3 id='with_nodejs'&gt;With NodeJS&lt;/h3&gt;

&lt;p&gt;Require it like any other module:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var MyLib = require(&amp;#39;mylib&amp;#39;);
console.log(MyLib.hello); // -&amp;gt; &amp;#39;World&amp;#39;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The main drawback of this method is, that it is not possible to declare dependencies but I found it to be a good solution for small libraries that run in different JavaScript environments.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Dr. Jekyll - please take over</title>
      <link>http://daffl.github.com/2012/02/11/dr-jekyll.html</link>
      <pubDate>Sat, 11 Feb 2012 00:00:00 -0800</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2012/02/11/dr-jekyll</guid>
      <description>&lt;p&gt;In an attempt to downsize and consolidate, I abandon my long term blog platform, &lt;a href='http://wordpress.org'&gt;Wordpress&lt;/a&gt;, and switch over to &lt;a href='http://jekyllrb.com/'&gt;Jekyll&lt;/a&gt;. Jekyll is a static page generator that uses the &lt;a href='http://liquidmarkup.org/'&gt;Liquid templating language&lt;/a&gt; to generate pages and a &lt;a href='https://github.com/mojombo/jekyll/wiki/yaml-front-matter'&gt;YAML frontmatter&lt;/a&gt; for configuration. Both are really easy to handle and made it interesting even to me as a non Ruby enthusiast.&lt;/p&gt;

&lt;p&gt;With great services like &lt;a href='http://disqus.com'&gt;Disqus&lt;/a&gt; for comments, Feedburner to ship your RSS or Flickr to host your images, it makes only sense to keep the overhead of a personal website/blog as small as possible. Another great feature is the awesome integration into &lt;a href='http://github.com'&gt;GitHub&lt;/a&gt;. As a GitHub user the workflow to write a new post will be quite familiar. Just create a new Markdown (or whatever markup language you feel like) file in the _posts directory, and when finished writing, commit and push to your site repository.&lt;/p&gt;

&lt;p&gt;So even though the publishing platform should not be the main reason to keep you motivated and blogging, I hope that publishing more stuff will now become a little easier and more fun again.&lt;/p&gt;</description>
    </item>
    
    <item>
      <title>Customize jQuery .val() with $.valHooks</title>
      <link>http://daffl.github.com/2011/11/28/valhooks.html</link>
      <pubDate>Mon, 28 Nov 2011 00:00:00 -0800</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2011/11/28/valhooks</guid>
      <description>&lt;p&gt;When creating custom widgets that should act as form inputs it might be helpful to overwrite the behaviour of the jQuery &lt;a href='http://api.jquery.com/val/'&gt;.val()&lt;/a&gt; method. This is where the $.valHooks object can be used but as mentioned on &lt;a href='http://stackoverflow.com/questions/6731153/what-are-jquery-valhooks'&gt;this question on Stackoverflow&lt;/a&gt; there is not a lot of documentation. Here is a quick example that creates a custom myedit plugin that reads and sets the value of a div:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$.valHooks[&amp;#39;myedit&amp;#39;] = {
    get : function(el) {
        return $(el).html();
    },
    set : function(el, val)
    {
        $(el).html(val);
    }
};

$.fn.myedit = function()
{
    this.each(function() {
        this.type = &amp;#39;myedit&amp;#39;;
    });
    return this;
}

$(&amp;#39;#edit&amp;#39;).myedit().val(&amp;#39; Hi there!&amp;#39;);
$(&amp;#39;#value&amp;#39;).html(&amp;#39;The value is : &amp;#39; + $(&amp;#39;#edit&amp;#39;).val());&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Mustache views for the Zend framework</title>
      <link>http://daffl.github.com/2011/04/28/zfmustache.html</link>
      <pubDate>Thu, 28 Apr 2011 00:00:00 -0700</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2011/04/28/zfmustache</guid>
      <description>&lt;p&gt;Mustache is a language independent templating engine that keeps templates as easy and portable as possible. Combined with anonymus functions the simple collection of tags covers many different use cases.&lt;/p&gt;

&lt;p&gt;Using the great Mustache.PHP implementation with the branch for higher order functions (supporting PHP 5.3 anonymus functions) I created a view wrapper and application resource called ZFMustache that enables mustache based views for the Zend Framework. The following post is pretty much the documentation readme but it seemed worth a blog entry as well:&lt;/p&gt;

&lt;p&gt;&lt;a href='http://defunkt.github.com/mustache/'&gt;Mustache&lt;/a&gt; views for the &lt;a href='http://framework.zend.com/'&gt;Zend Framework&lt;/a&gt; using the &lt;a href='https://github.com/bobthecow/mustache.php'&gt;mustache.php&lt;/a&gt; implementation.&lt;/p&gt;

&lt;h2 id='installation'&gt;Installation&lt;/h2&gt;

&lt;p&gt;You can clone the GIT repository directly in your library folder:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;cd myapp&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;git clone git@github.com:daffl/zfmustache.git -b zfmustache library/Mustache&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Or add it as a GIT submodule to your existing repository:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;git submodule add git@github.com:daffl/zfmustache.git -b zfmustache library/Mustache&lt;/p&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
&lt;p&gt;git submodule init&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2 id='use_it'&gt;Use it&lt;/h2&gt;

&lt;p&gt;The application resource will instantiate the view, set the Mustache engine autoloader and update the view renderer (unless enabled is set to false). Add the following to your &lt;em&gt;application.ini&lt;/em&gt; to enable mustache views:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pluginpaths.Mustache_Application_Resource = &amp;quot;Mustache/Application/Resource&amp;quot;
resources.mustache.basePath = APPLICATION_PATH &amp;quot;/views/scripts&amp;quot; &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can also use mustache views only in specific controllers or actions. In that case setting the view renderer has to be disabled:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;pluginpaths.Mustache_Application_Resource = &amp;quot;Mustache/Application/Resource&amp;quot;
resources.mustache.basePath = APPLICATION_PATH &amp;quot;/views/scripts&amp;quot;
resources.mustache.enabled = false&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;After that the bootstrapped mustache view can be retrieved in any controller:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;?php
	class IndexController extends Zend_Controller_Action
	{
		public function init()
		{
	    	$bootstrap = $this-&amp;gt;getInvokeArg(&amp;#39;bootstrap&amp;#39;);
			$this-&amp;gt;view = $bootstrap-&amp;gt;getResource(&amp;#39;mustache&amp;#39;);
			$viewRenderer = $this-&amp;gt;_helper-&amp;gt;getHelper(&amp;#39;viewRenderer&amp;#39;);
			$viewRenderer-&amp;gt;setView($this-&amp;gt;view)-&amp;gt;setViewSuffix(&amp;#39;mustache&amp;#39;);
		}

		public function indexAction()
		{
	        // action body
	        $this-&amp;gt;view-&amp;gt;planet = &amp;quot;Mars&amp;quot;;
	        // Using a PHP 5.3 lambda function to render bold Text:
	        $engine = $this-&amp;gt;view-&amp;gt;getEngine();
	        $this-&amp;gt;view-&amp;gt;bold = function($text) use($engine) {
	        	return &amp;quot;&amp;lt;strong&amp;gt;&amp;quot; . $engine-&amp;gt;render($text) . &amp;quot;&amp;lt;/strong&amp;gt;&amp;quot;;
	        };
		}
	}&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id='a_mustache_file'&gt;A mustache file&lt;/h2&gt;

&lt;p&gt;Create a file called &lt;em&gt;APPLICATION_PATH/scripts/views/index/index.mustache&lt;/em&gt; e.g. like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;!DOCTYPE html PUBLIC &amp;quot;-//W3C//DTD HTML 4.01 Transitional//EN&amp;quot; &amp;quot;http://www.w3.org/TR/html4/loose.dtd&amp;quot;&amp;gt;
&amp;lt;html&amp;gt;
	&amp;lt;head&amp;gt;
		&amp;lt;meta http-equiv=&amp;quot;Content-Type&amp;quot; content=&amp;quot;text/html; charset=UTF-8&amp;quot;&amp;gt;
		&amp;lt;title&amp;gt;Mustache Test&amp;lt;/title&amp;gt;
	&amp;lt;/head&amp;gt;
	&amp;lt;body&amp;gt;
		&amp;lt;h1&amp;gt;Hello !&amp;lt;/h1&amp;gt;
		Hello bold 
	&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;&lt;/code&gt;&lt;/pre&gt;</description>
    </item>
    
    <item>
      <title>Creating forms in JSON with jQuery</title>
      <link>http://daffl.github.com/2011/01/06/jquery-dform.html</link>
      <pubDate>Thu, 06 Jan 2011 00:00:00 -0800</pubDate>
      <author></author>
      <guid>http://daffl.github.com/2011/01/06/jquery-dform</guid>
      <description>&lt;p&gt;Creating and managing HTML forms is probably one of the most tedious and in many web applications also the most important part of the frontend development process. Forms generated in a web application usually need to contain information on how they bind to domain objects, errors that occurred during processing and the values of different fields. Because maintaining all these information manually is very error prone and requires writing a lot of repetitive markup there are different approaches that support developers in this task:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Declarative&lt;/strong&gt;: The framework supports custom tags that create form elements with all the information it needs to process that form (e.g. the &lt;a href='http://static.springsource.org/spring/docs/2.0.x/reference/spring-form.tld.html'&gt;JSTL Spring Form&lt;/a&gt; taglib)&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Helper&lt;/strong&gt;: In a view script the framework offers helper functions you can call which return a new form element (e.g. &lt;a href='http://guides.rubyonrails.org/form_helpers.html'&gt;Ruby on Rails&lt;/a&gt;)&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;Programmatic&lt;/strong&gt;: Forms are created programatically in the frameworks programming language (e.g. GWT, the &lt;a href='http://www.sencha.com/products/js/'&gt;Sencha ExtJS Forms&lt;/a&gt; or &lt;a href='http://framework.zend.com/manual/en/zend.form.html'&gt;Zend Form&lt;/a&gt;)&lt;/li&gt;

&lt;li&gt;&lt;strong&gt;GUI based&lt;/strong&gt;: The form is created in a graphical user interface via Drag and Drop (e.g. the just started &lt;a href='http://limcheekin.blogspot.com/2011/01/kick-off-jquery-form-builder-plugin.html'&gt;jQuery Form Builder&lt;/a&gt; project or ASP.NET web forms)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With web applications becoming more JavaScript heavy these approaches now not only have to generate HTML, but also have to take care of creating the appropriate JavaScript source code which often leads to an ugly mix of HTML, client side logic and server side logic.&lt;/p&gt;

&lt;p&gt;One solution for that problem is the separation of HTML markup generation from the actual form definition, where the definition is available in a more abstract but easy to process format (like JSON). If a web application is already relying on JavaScript, the next step is then to let the client itself create the form from that definition.&lt;/p&gt;

&lt;p&gt;Inspired by the programmatic approach and the fact that there doesn&amp;#8217;t seem to be any jQuery plugin for this I started the &lt;a href='http://neyeon.com/p/jquery.dform/doc/files2/readme-txt.html'&gt;jQuery dForm&lt;/a&gt; plugin (currently version 0.1.3). The ideas behind it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use JSON (or XML) as the form definition format. Easy to generate (e.g. automatically from your domain model) and flexible enough so that it can still be used to generate forms on the server side.&lt;/li&gt;

&lt;li&gt;Easily extensible: Possibility to support other plugins, your own jQuery powered form elements or improving existing ones&lt;/li&gt;

&lt;li&gt;Don&amp;#8217;t reinvent the wheel: Add support for existing plugins like jQuery UI, the Validation Plugin or the jQuery Form plugin and keep the plugin itself as compact as possible.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The basic example to use the plugin looks like this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;
var formdata = {
    &amp;quot;action&amp;quot; : &amp;quot;index.html&amp;quot;,
    &amp;quot;method&amp;quot; : &amp;quot;get&amp;quot;,
    &amp;quot;elements&amp;quot; :
    [
        {
            &amp;quot;type&amp;quot; : &amp;quot;p&amp;quot;,
            &amp;quot;html&amp;quot; : &amp;quot;You must login&amp;quot;
        },
        {
            &amp;quot;name&amp;quot; : &amp;quot;username&amp;quot;,
            &amp;quot;id&amp;quot; : &amp;quot;txt-username&amp;quot;,
            &amp;quot;caption&amp;quot; : &amp;quot;Username&amp;quot;,
            &amp;quot;type&amp;quot; : &amp;quot;text&amp;quot;,
            &amp;quot;placeholder&amp;quot; : &amp;quot;E.g. user@example.com&amp;quot;
        },
        {
            &amp;quot;name&amp;quot; : &amp;quot;password&amp;quot;,
            &amp;quot;caption&amp;quot; : &amp;quot;Password&amp;quot;,
            &amp;quot;type&amp;quot; : &amp;quot;password&amp;quot;
        },
        {
            &amp;quot;type&amp;quot; : &amp;quot;submit&amp;quot;,
            &amp;quot;value&amp;quot; : &amp;quot;Login&amp;quot;
        }
    ]
};
 
$(&amp;quot;#myform&amp;quot;).buildForm(formdata);
 
// Or if the content of formdata can be loaded from a URL
// $(&amp;quot;#myform&amp;quot;).buildForm(&amp;quot;http://example.com/myform.json&amp;quot;);
&amp;lt;/script&amp;gt;
 
&amp;lt;form id=&amp;quot;myform&amp;quot;&amp;gt;&amp;lt;/form&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The advantage is, that the form definition and the configuration of JavaScript functionality can be kept in the same format. Check out the examples page for more complex forms and some jQuery UI and the extension chapter to see how to customize and extend your forms.&lt;/p&gt;

&lt;p&gt;Worth mentioning: Since JSON (or XML for that matter) are quite abstract formats and the form generation itself is done by the client, an extension for generating browser specific HTML5 forms is currently under development.&lt;/p&gt;

&lt;p&gt;If you have questions or want to contribute (e.g. by adding dForm support to your own form related plugin :) visit the plugin &lt;a href='https://github.com/daffl/jquery.dform'&gt;homepage on GitHub&lt;/a&gt;.&lt;/p&gt;</description>
    </item>
    

  </channel> 
</rss>
