<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ukijs blog</title>
	<atom:link href="http://blog.ukijs.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ukijs.org</link>
	<description>making web apps with uki</description>
	<lastBuildDate>Mon, 14 Mar 2011 18:25:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.ukijs.org' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ukijs blog</title>
		<link>http://blog.ukijs.org</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.ukijs.org/osd.xml" title="ukijs blog" />
	<atom:link rel='hub' href='http://blog.ukijs.org/?pushpress=hub'/>
		<item>
		<title>Mail.app on the web</title>
		<link>http://blog.ukijs.org/2010/04/08/mail-app-on-the-web/</link>
		<comments>http://blog.ukijs.org/2010/04/08/mail-app-on-the-web/#comments</comments>
		<pubDate>Thu, 08 Apr 2010 10:05:31 +0000</pubDate>
		<dc:creator>voloko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.ukijs.org/?p=34</guid>
		<description><![CDATA[Mail.app ukijs matured and I put it to the test. The idea for the test was to replicate Mac Mail.app core experience in the browser. With as much attention to details as possible and acceptable performance. The whole thing took me about 15 hours and 65kb of gziped code. Motivation We&#8217;ve seen a tremendous paradigm [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=34&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<h2>Mail.app</h2>
<p>ukijs matured and I put it to the test. The idea for the test was to replicate Mac Mail.app core experience in the browser. With as much attention to details as possible and acceptable performance. The <a href="http://ukijs.org/mail/index.html">whole thing</a> took me about 15 hours and 65kb of gziped code.</p>
<div class='embed-vimeo' style='text-align:center;'><iframe src='http://player.vimeo.com/video/10677818' width='400' height='300' frameborder='0'></iframe></div>
<h2>Motivation</h2>
<p>We&#8217;ve seen a tremendous paradigm shift in the last year. Desktop experience on the web is going mainstream. The very existence of SproutCore and Cappuccino proves that you don&#8217;t have to sacrifice user experience on the web. And yes, you can write desktop class web apps without a team of 10 developers. </p>
<p>But there&#8217;re two things that I don&#8217;t like about these, otherwise awesome, frameworks. First they&#8217;re huge. They even brag about how huge they are: &#8220;<a href="http://blog.sproutcore.com/post/459714079/sproutcore-1-0-is-done">…20k lines of code…</a>&#8220;, &#8220;<a href="http://cappuccino.org/discuss/2010/04/07/cappuccino-0-8/">…100k lines of code…</a>&#8220;. Second there&#8217;s a fair amount of &#8220;magic&#8221; involved in building your app with any of them. In case of Cappuccino you have a completely new language (Objective-J). SproutCore will &#8220;magically&#8221; create bindings and magically process your css.</p>
<p>What this basically means is that you have to <strong>do more</strong>: read more source, learn more conceptions and tools, support more code, fix more bugs. And your users have to wait more for your app to load. And I think we can do better. That&#8217;s why uki was started. The main goal and the promise behind the project is that you can create desktop-class apps with <strong>less code</strong> and <strong>less magic</strong>. </p>
<p>And so far uki is pretty close to the promise.<br />
1. There&#8217;s no magic involved if you want to use the framework. Simply add a <pre class="brush: plain;">&lt;script&gt;</pre> tag to your page and you&#8217;re done. And you write in plain old javascript.<br />
2. The whole framework gziped with images included (base64 encoded) weights 35kb. For comparison SproutCore <a href="http://demo.sproutcore.com/static/common_assets/en/efcc10e747291521495b10d9b48be9b9d3c489be/javascript-packed.js">is 150Kb</a> without images or styles.</p>
<p><strong>There&#8217;re two notable things about less code</strong><br />
First ukijs leaves to the browser what it can do by itself. Without any additional conceptions/code in-between. For example if you&#8217;re with SproutCore/Cappucchino and want to bind a focus event you&#8217;ll end up with something like this:<br />
<pre class="brush: jscript;">view.didBecomeFirstResponder = someHandler</pre><br />
while in uki it looks like:<br />
<pre class="brush: jscript;">view.bind('focus', handler)</pre><br />
or even simpler<br />
<pre class="brush: jscript;">views.focus(handler)</pre></p>
<p>Second I do a fair amount of meta-programming. The same that you&#8217;ll see in jQuery core:<br />
<pre class="brush: jscript;">
uki.each(['width', 'height',…, 'x', 'y', 'left', 'top'], function(index, attr) {…}, this);</pre></p>
<h2>How</h2>
<p>Uki is an <strong>application</strong> framework. So there&#8217;s no HTML. All interfaces are build with javascript. And js will manage focus, selection, scrolling, layout, events for you.</p>
<p>There&#8217;re 4 common parts of an <a href="http://github.com/voloko/uki_mail_app/tree/master/uki_mail_app/">application</a>: views, layouts, models and controllers.</p>
<p><strong>Views</strong> are the basic building blocks of the interface. Uki comes with a collection of core views but you can add more or extend existing. Examples of views are: <a href="http://ukijs.org/examples/core-examples/slider/"> Slider</a>, <a href="http://ukijs.org/examples/core-examples/splitPane/">SplitPane</a>  or <a href="http://ukijs.org/examples/core-examples/table/">Table</a>.</p>
<p><strong>Layouts</strong> define how your views are placed on a page. Mostly the same way as HTML defines how your DOM nodes are placed within each other. But since you&#8217;re building the page from a complete interface components it is usually much much shorter. Look at the <a href="http://github.com/voloko/uki_mail_app/blob/master/uki_mail_app/layout/main.js">example</a> of the main mail.app page.</p>
<p><strong>Models</strong> store, load and transform the data from the server. You can stick to plain javascript objects but it is more convenient to add some behavior to your models. Like <pre class="brush: jscript;">message.markAsRead()</pre> method. Models also trigger events when their data changes. So you can <pre class="brush: jscript;">message.bind('unread.change', handler)</pre></p>
<p><strong>Controllers</strong> bind everything together with events. You find views in the layout with css like selectors and then bind event handler to them. See the main page controller <a href="http://github.com/voloko/uki_mail_app/blob/master/uki_mail_app/controller/main.js">example</a>.</p>
<h2>Where to go next?</h2>
<p>You can get more info at <a href="http://ukijs.org">ukijs.org</a>, get the sources of both the <a href="http://github.com/voloko/uki_mail_app">application</a> and the <a href="http://github.com/voloko/uki">framework</a>. There&#8217;s a #ukijs channel on freenode.net irc and a <a href="http://groups.google.com/group/ukijs">google group</a>.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/voloko.wordpress.com/34/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/voloko.wordpress.com/34/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/voloko.wordpress.com/34/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=34&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ukijs.org/2010/04/08/mail-app-on-the-web/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bbee57a05b72bd3c29c1e48551a816f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">voloko</media:title>
		</media:content>
	</item>
		<item>
		<title>0.1.0 release</title>
		<link>http://blog.ukijs.org/2010/03/19/0-1-0-release/</link>
		<comments>http://blog.ukijs.org/2010/03/19/0-1-0-release/#comments</comments>
		<pubDate>Fri, 19 Mar 2010 14:38:20 +0000</pubDate>
		<dc:creator>voloko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[0.1.0]]></category>
		<category><![CDATA[dnd]]></category>
		<category><![CDATA[release]]></category>

		<guid isPermaLink="false">http://blog.ukijs.org/?p=28</guid>
		<description><![CDATA[Ukijs 0.1.0 released. Grab it at http://static.ukijs.org/pkg/0.1.0/uki.js What&#8217;s new w3c drag and drop support. Uki views now support w3c drag and drop events, like ondragstart or drop. And it supports them in all browsers. See the screencast, demo and read the blog post to get more info on this feature. multiselect attribute for List. All [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=28&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Ukijs 0.1.0 released. Grab it at <a href="http://static.ukijs.org/pkg/0.1.0/uki.js">http://static.ukijs.org/pkg/0.1.0/uki.js</a></p>
<h3>What&#8217;s new</h3>
<p><strong>w3c drag and drop</strong> support. Uki views now support w3c drag and drop events, like <code>ondragstart</code> or <code>drop</code>. And it supports them in all browsers. See the <a href="http://vimeo.com/10205134">screencast</a>, <a href="http://ukijs.org/examples/core-examples/dnd/">demo</a> and read the <a href="http://blog.ukijs.org/2010/03/16/drag-and-drop-in-uki/">blog post</a> to get more info on this feature.</p>
<p><strong>multiselect attribute</strong> for List. All lists and tables now support selecting multiple rows with both keyboard and mouse (holding Shift or Ctrl/Option key). See the <a href="http://ukijs.org/examples/core-examples/list/">demo</a>. </p>
<p><strong>steps in slider</strong>. Slider supports stepped drag and drop with values attribute.<br />
<pre class="brush: jscript;">uki({ view: 'Slider', value: [1, 2, 3, 4, 5] ... }</pre> will produce a slider with 5 separate handle positions. See the <a href="http://ukijs.org/examples/core-examples/slider/">demo</a>. </p>
<p><strong>event wrapper</strong>. All events now wrapped into uki.dom.Event class. This means that you now longer need <code>e.domEvent</code> to access native event properties. Plus all events now have <code>e.preventDefault()</code> and <code>e.stopPropagation()</code> in all browsers.</p>
<p><strong>long views renamed</strong>. Views with &#8216;Horizontal&#8217; and &#8216;Vertical&#8217; in name were renamed to shorter version with &#8216;H&#8217; and &#8216;V&#8217;. So &#8216;HorizontalFlow&#8217; is now &#8216;HFlow&#8217;.</p>
<p>And of course lot&#8217;s of minor tweaks and fixes.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/voloko.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/voloko.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/voloko.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=28&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ukijs.org/2010/03/19/0-1-0-release/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bbee57a05b72bd3c29c1e48551a816f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">voloko</media:title>
		</media:content>
	</item>
		<item>
		<title>Drag and drop in uki</title>
		<link>http://blog.ukijs.org/2010/03/16/drag-and-drop-in-uki/</link>
		<comments>http://blog.ukijs.org/2010/03/16/drag-and-drop-in-uki/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 11:20:21 +0000</pubDate>
		<dc:creator>voloko</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[0.1.0]]></category>
		<category><![CDATA[announcment]]></category>
		<category><![CDATA[dnd]]></category>
		<category><![CDATA[screencast]]></category>
		<category><![CDATA[ukijs]]></category>

		<guid isPermaLink="false">http://voloko.wordpress.com/?p=4</guid>
		<description><![CDATA[As of 0.1 ukijs gets support for drag and drop events based on w3c d&#38;d specification (dragstart, drag, dragstop, dragover, dragenter, dragleave, drop). So in new browsers (FF3.5+, latest webkits) uki will use native events thus allowing to drag items within and outside of the browser window. For the rest of the browser crowd (IE, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=4&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>As of 0.1 <a href="http://ukijs.org" target="_blank">ukijs</a> gets support for drag and drop events based on <a href="http://dev.w3.org/html5/spec/editing.html#dnd" target="_blank">w3c d&amp;d specification</a> (<code>dragstart, drag, dragstop, dragover, dragenter, dragleave, drop</code>). So in new browsers (FF3.5+, latest webkits) uki will use native events thus allowing to drag items within and <strong>outside</strong> of the browser window. For the rest of the browser crowd (IE, Opera, previous FF) uki will emulate exactly the same behavior within browser.</p>
<p><a href="http://vimeo.com/10205134">Screencast: drag and drop with uki</a> from <a href="http://vimeo.com/user657918">Volodya Kolesnikov</a> on Vimeo.</p>
<h4>Events</h4>
<p>To make view draggable you have to mark it with draggable attribute. All uki views support it:<br />
<pre class="brush: jscript;">uki({ view: 'List', draggable: true ... })</pre></p>
<p>Then add the dragstart event:<br />
<pre class="brush: jscript;">
uki('List').draggstart(function(e) {
    // set the data that will be dragged 
    e.dataTransfer.setData('text/plain', this.selectedRows().join('\n'));
    // set the drag feedback image (both uki views 
    // and simple dom nodes are allowed)
    e.dataTransfer.setDragImage(uki(
        { view: 'Label', rect: '100 20', anchors: 'left top', inset: '0 5',
          background: 'cssBox(border: 1px solid #CCC;background:#EEF)',
          text: this.selectedRows().length + ' rows' }
     ), 10, 10);
     // set allowed affect to 'copy', 'move' etc
     e.dataTransfer.effectAllowed = 'copy';
});
</pre></p>
<p>For the drop targets you need to add dragover and drop events:<br />
<pre class="brush: jscript;">
uki('[name=target]')
    .dragover(function(e) {   // required
        e.preventDefault();
        e.dataTransfer.dropEffect = 'copy'; // same as effectAllowed
    })
    .dragenter(function(e) {  // optional
        this.text('enter');
    })
    .dragleave(function(e) {  // optional
        this.text('leave');
    })
    .drop(function(e) {
        alert(e.dataTransfer.getData('text/plain'))
    });
</pre></p>
<p>See the <a href="http://ukijs.org/examples/dnd.html">demo</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/voloko.wordpress.com/4/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/voloko.wordpress.com/4/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/voloko.wordpress.com/4/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.ukijs.org&amp;blog=12640688&amp;post=4&amp;subd=voloko&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.ukijs.org/2010/03/16/drag-and-drop-in-uki/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/bbee57a05b72bd3c29c1e48551a816f4?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">voloko</media:title>
		</media:content>
	</item>
	</channel>
</rss>
