<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0">
  <id>http://www.senchatouchbits.com/</id>
  <title>Sencha Touch Bits</title>
  <updated>2011-12-05T04:00:00Z</updated>
  <link rel="alternate" href="http://www.senchatouchbits.com/" />
  
  <author>
    <name>Steffen Hiller</name>
    <uri>http://www.senchatouchbits.com</uri>
  </author>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/senchatouchbits" /><feedburner:info uri="senchatouchbits" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry>
    <id>www.senchatouchbits.com:13</id>
    <title type="html">Installing &amp; Compiling CoffeeScript</title>
    <published>2011-12-05T04:00:00Z</published>
    <updated>2011-12-05T22:52:49Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/senchatouchbits/~3/1oblDgpiMvY/installing-and-compiling-coffeescript.html" />
    <content type="html">&lt;p&gt;In my &lt;a href="/12/hello-coffeescript-meet-sencha-touch.html"&gt;previous post&lt;/a&gt; I already showed some simple examples of using Sencha Touch 2 and CoffeeScript.
I thought I take that a bit further and show you more about how to build a Sencha Touch app using the latest Sencha Touch 2 and CoffeeScript.&lt;/p&gt;

&lt;p&gt;In order to do so I decided to use the screencast format.
It's my first screencast ever, but I thought it's worth a try.&lt;/p&gt;

&lt;p&gt;This first screencast is about installing and compiling CoffeeScript.
The next one will be about my favorite features of CoffeeScript.&lt;/p&gt;

&lt;p&gt;I hope you'll enjoy it and get something out of it.&lt;/p&gt;

&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/ZzT7CnsicxA" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;


&lt;p&gt;Links and tools used in the screencast:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://jashkenas.github.com/coffee-script/"&gt;CoffeeScript&lt;/a&gt;&lt;br/&gt;
&lt;a href="https://github.com/TrevorBurnham/Jitter"&gt;Jitter&lt;/a&gt;&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/senchatouchbits/~4/1oblDgpiMvY" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://www.senchatouchbits.com/13/installing-and-compiling-coffeescript.html</feedburner:origLink></entry>
  <entry>
    <id>www.senchatouchbits.com:12</id>
    <title type="html">Hello CoffeeScript! Meet Sencha Touch.</title>
    <published>2011-10-23T04:00:00Z</published>
    <updated>2011-10-23T17:10:07Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/senchatouchbits/~3/GzmY4lTGAV8/hello-coffeescript-meet-sencha-touch.html" />
    <content type="html">&lt;p&gt;In &lt;a href="/11/hello-world-remember-the-ext-onready-days.html"&gt;yesterdays post&lt;/a&gt; I presented a few examples of how to write a "Hello World!" application in Sencha Touch 2.&lt;br/&gt;
These same examples actually serve well for giving you a glimpse into using Sencha Touch together with &lt;a href="http://jashkenas.github.com/coffee-script/"&gt;CoffeeScript&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;We at &lt;a href="http://www.360releases.com"&gt;360releases&lt;/a&gt; have started using CoffeeScript for a Sencha Touch project.
Going forward we'll most likely use it for every new project, be it Sencha Touch or Ext JS.&lt;/p&gt;

&lt;p&gt;I know that a lot of people's initial reaction is rejection. So was mine.
But after looking into and checking out the &lt;a href="http://pragprog.com/book/tbcoffee/coffeescript"&gt;Pragmatic's CoffeeScript book&lt;/a&gt;,
I didn't really see a reason not to use it.&lt;/p&gt;

&lt;p&gt;Sencha and Sass already showed us (the Sencha community) that compiling hasn't have to be a pain, as we native script language developers usually think.&lt;/p&gt;

&lt;p&gt;My take on CoffeeScript is basically this:&lt;br/&gt;
If CoffeeScript let's me save key strokes (and conserve my fingers joints for the years to come) without actually having to learn a complete different syntax or language, then heck yes.&lt;/p&gt;

&lt;p&gt;Take a look at the CoffeeScript examples below yourself.&lt;/p&gt;

&lt;p&gt;Wouldn't it be nice if you could stop worrying about commas after property definitions within config objects? With CoffeeScript you can.&lt;/p&gt;

&lt;p&gt;As in the previous post, all examples have the exact same DOM and view output, which is the following (except the numbering obviously):&lt;/p&gt;

&lt;div style="height: 574px; font-weight: bold; font-size: 1.2em"&gt;
    &lt;div style="width: 100%; float: left; text-align: center;"&gt;
        &lt;div&gt;&lt;img src="images/hello-world.png" width="300" align="center"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #1&lt;/h2&gt;

&lt;p&gt;Using Ext.setup, onReady and Ext.create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.setup
    onReady: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        Ext.create &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Panel&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #1&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #2&lt;/h2&gt;

&lt;p&gt;Using Ext.setup, onReady and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.setup
    onReady: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        Ext.Viewport.add
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #2&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #3&lt;/h2&gt;

&lt;p&gt;Using Ext.application, onReady and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application
    onReady: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        Ext.Viewport.add
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #3&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #4&lt;/h2&gt;

&lt;p&gt;Using Ext.application, launch and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application
    launch: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        Ext.Viewport.add
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #4&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #5&lt;/h2&gt;

&lt;p&gt;Using Ext.application, launch and Ext.create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application
    launch: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        Ext.create &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Panel&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #5&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #6&lt;/h2&gt;

&lt;p&gt;Using Ext.application and autoCreateViewport.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.Viewport&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    config:
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #6&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;


Ext.application
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;&amp;quot;&lt;/span&gt;App&lt;span class="String"&gt;&amp;quot;&lt;/span&gt;&lt;/span&gt;
    autoCreateViewport: &lt;span class="Constant"&gt;true&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #7&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, getView and create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    config:
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #7&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;


Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    views: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
    init: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        @getView(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;).create()


Ext.application
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    controllers: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #8&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, automatic generated view getter and create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    config:
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #8&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;


Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    views: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
    init: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        @getWorldStageView().create()


Ext.application
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    controllers: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #9&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, refs and ref's autoCreate.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    config:
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #9&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;


Ext.define &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    views: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
    refs: [
        ref: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
        selector: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstageview&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
        xtype: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstageview&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
        autoCreate: &lt;span class="Constant"&gt;true&lt;/span&gt;
    ]
    init: &lt;span class="Keyword"&gt;-&lt;/span&gt;&lt;span class="Keyword"&gt;&amp;gt;&lt;/span&gt;
        @getWorldstage()


Ext.application
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    controllers: [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ]
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I'm currently in Austin, TX, for SenchaCon.
So maybe see you at the conference.
Follow me on Twitter &lt;a href="http://twitter.com/steffenhiller"&gt;@steffenhiller&lt;/a&gt; for Sencha Touch and Ext JS talk, and this week possibly some bar talk as well. :)&lt;/p&gt;

&lt;p&gt;That's all for now.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/senchatouchbits/~4/GzmY4lTGAV8" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://www.senchatouchbits.com/12/hello-coffeescript-meet-sencha-touch.html</feedburner:origLink></entry>
  <entry>
    <id>www.senchatouchbits.com:11</id>
    <title type="html">Hello World! Remember the Ext.onReady days?</title>
    <published>2011-10-22T04:00:00Z</published>
    <updated>2011-10-22T22:13:41Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/senchatouchbits/~3/vTEXmFzrkek/hello-world-remember-the-ext-onready-days.html" />
    <content type="html">&lt;p&gt;Do you remember the Ext.onReady days?&lt;br/&gt;
There used to be just &lt;strong&gt;one&lt;/strong&gt; way to initiate and render your application's viewport.&lt;/p&gt;

&lt;p&gt;You simply did a&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.onReady(&lt;span class="Storage"&gt;function&lt;/span&gt; () {
    &lt;span class="Keyword"&gt;new&lt;/span&gt; &lt;span class="Entity"&gt;Ext.Viewport&lt;/span&gt;({
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World!&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    })
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;and done!&lt;/p&gt;

&lt;p&gt;Those days are over. (No reason to be sad, though.)&lt;/p&gt;

&lt;p&gt;Now we have &lt;strong&gt;Ext.onReady&lt;/strong&gt;, &lt;strong&gt;Ext.setup&lt;/strong&gt;, &lt;strong&gt;Ext.application&lt;/strong&gt;, &lt;strong&gt;Ext.app.Application&lt;/strong&gt;, &lt;strong&gt;Ext.viewport.Viewport&lt;/strong&gt;, &lt;strong&gt;Ext.create&lt;/strong&gt;, &lt;strong&gt;Ext.Loader&lt;/strong&gt;, &lt;strong&gt;autoCreateViewport&lt;/strong&gt;, &lt;strong&gt;fullscreen&lt;/strong&gt;, &lt;strong&gt;autoMaximize&lt;/strong&gt;, &lt;strong&gt;profiles&lt;/strong&gt;, &lt;strong&gt;init&lt;/strong&gt; and &lt;strong&gt;launch&lt;/strong&gt; to name a few.&lt;/p&gt;

&lt;p&gt;We at &lt;a href="http://www.360releases.com"&gt;360releases&lt;/a&gt; started to work with Sencha Touch 2 the same day the Developer Preview got released.&lt;/p&gt;

&lt;p&gt;The start with Sencha Touch 2 was a bit rocky for us. The weirdest issue of all was a non-Sencha Touch related bug on our side.
Anyway, while playing around with the way of initiating our Sencha Touch 2 app, I realized that there are a bunch of ways of doing so.&lt;/p&gt;

&lt;p&gt;Back in the Ext JS 1.x and 2.x days, there was just &lt;strong&gt;one&lt;/strong&gt;.
So I thought it'd be interesting to list a few different ways of initializing a Sencha Touch app today.&lt;/p&gt;

&lt;p&gt;Don't hold your breath. ;)
There are certainly more, but I thought listing 9 different examples should be enough.&lt;/p&gt;

&lt;p&gt;All Hello World examples result in the exact same DOM structure and view (except for the numbering obviously).&lt;/p&gt;

&lt;p&gt;Each example has the following output in Mobile Safari on the iPhone:&lt;/p&gt;

&lt;div style="height: 574px; font-weight: bold; font-size: 1.2em"&gt;
    &lt;div style="width: 100%; float: left; text-align: center;"&gt;
        &lt;div&gt;&lt;img src="images/hello-world.png" width="300" align="center"&gt;&lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #1&lt;/h2&gt;

&lt;p&gt;Using Ext.setup, onReady and Ext.create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.setup({
    &lt;span class="Entity"&gt;onReady&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
        Ext.create(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Panel&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #1&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
        });
    }
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #2&lt;/h2&gt;

&lt;p&gt;Using Ext.setup, onReady and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.setup({
    &lt;span class="Entity"&gt;onReady&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
        Ext.Viewport.&lt;span class="SupportFunction"&gt;add&lt;/span&gt;({
            fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
            html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #2&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
        });
    }
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #3&lt;/h2&gt;

&lt;p&gt;Using Ext.application, onReady and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application({
   &lt;span class="Entity"&gt;onReady&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
       Ext.Viewport.&lt;span class="SupportFunction"&gt;add&lt;/span&gt;({
           fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
           html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #3&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
       });
   } 
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #4&lt;/h2&gt;

&lt;p&gt;Using Ext.application, launch and Ext.Viewport.add.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application({
   &lt;span class="Entity"&gt;launch&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
       Ext.Viewport.&lt;span class="SupportFunction"&gt;add&lt;/span&gt;({
           fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
           html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #4&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
       });
   } 
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #5&lt;/h2&gt;

&lt;p&gt;Using Ext.application, launch and Ext.create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.application({
   &lt;span class="Entity"&gt;launch&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
       Ext.create(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Panel&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
           fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
           html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #5&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
       });
   } 
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #6&lt;/h2&gt;

&lt;p&gt;Using Ext.application and autoCreateViewport.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.Viewport&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    
    config: {
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #6&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    }
});

Ext.application({
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    autoCreateViewport: &lt;span class="Constant"&gt;true&lt;/span&gt;
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #7&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, getView and create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    
    config: {
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #7&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    }
});

Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,

    views : [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ],
    
    &lt;span class="Entity"&gt;init&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
        &lt;span class="Variable"&gt;this&lt;/span&gt;.getView(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;).create();
    }
});


Ext.application({
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    controllers: [&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;]
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #8&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, automatic generated view getter and create.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    
    config: {
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #8&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    }
});

Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,

    views : [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ],
    
    &lt;span class="Entity"&gt;init&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
        &lt;span class="Variable"&gt;this&lt;/span&gt;.getWorldStageView().create();
    }
});

Ext.application({
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    controllers: [&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;]
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Hello World #9&lt;/h2&gt;

&lt;p&gt;Using Ext.application, controller, refs and ref's autoCreate.&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.view.WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.Container&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,

    config: {
        fullscreen: &lt;span class="Constant"&gt;true&lt;/span&gt;,
        html: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Hello World! #9&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    }
});

Ext.define(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App.controller.HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;, {
    extend: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;Ext.app.Controller&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,

    views : [
        &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;WorldStage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;
    ],

    refs: [
        {
            ref: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstage&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
            selector: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstageview&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
            xtype: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;worldstageview&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
            autoCreate: &lt;span class="Constant"&gt;true&lt;/span&gt;
        }
    ],

    &lt;span class="Entity"&gt;init&lt;/span&gt;: &lt;span class="Storage"&gt;function&lt;/span&gt; () {
        &lt;span class="Comment"&gt;&lt;span class="Comment"&gt;//&lt;/span&gt; Note that autoCreate is not creating the world stage view&lt;/span&gt;
        &lt;span class="Comment"&gt;&lt;span class="Comment"&gt;//&lt;/span&gt; automatically while the controller is initiated!&lt;/span&gt;
        &lt;span class="Comment"&gt;&lt;span class="Comment"&gt;//&lt;/span&gt; It only means that if you reference it the first time&lt;/span&gt;
        &lt;span class="Comment"&gt;&lt;span class="Comment"&gt;//&lt;/span&gt; through ref's getter method, it'll be created.&lt;/span&gt;
        &lt;span class="Variable"&gt;this&lt;/span&gt;.getWorldstage();
    }
});

Ext.application({
    name: &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;App&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;,
    controllers: [&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;HelloWorld&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;]
});
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;I'll be in Austin, TX, for SenchaCon, in fact I'm already there.
So maybe see there. :)
Follow me on Twitter &lt;a href="http://twitter.com/steffenhiller"&gt;@steffenhiller&lt;/a&gt; if you can't get enough of Sencha Touch talk.&lt;/p&gt;

&lt;p&gt;That's all for now.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/senchatouchbits/~4/vTEXmFzrkek" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://www.senchatouchbits.com/11/hello-world-remember-the-ext-onready-days.html</feedburner:origLink></entry>
  <entry>
    <id>www.senchatouchbits.com:10</id>
    <title type="html">Performance Optimization</title>
    <published>2011-05-09T04:00:00Z</published>
    <updated>2011-05-09T13:23:58Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/senchatouchbits/~3/Qa5vxeociqY/performance-optimization.html" />
    <content type="html">&lt;p&gt;While developing Sencha Touch on the Desktop, everything is awesome and smooth, especially since you only have to care about WebKit.&lt;/p&gt;

&lt;p&gt;As soon as you do actual testing on the devices, be it iOS, Android or Blackberry, the fun might literally get stuck for a second.&lt;/p&gt;

&lt;p&gt;Luckily, there are multiple things you can do about optimizing the performance of your Sencha Touch applications.&lt;br/&gt;
Thanks to Xero's &lt;a href="http://twitter.com/storminwalker"&gt;@storminwalker&lt;/a&gt; and Sencha's &lt;a href="http://twitter.com/jamespearce"&gt;@jamespearce&lt;/a&gt; for pointing out a few very helpful resources.
Since these resources are very important, I thought I make a short post mentioning them.&lt;/p&gt;

&lt;p&gt;If you have any other helpful links or tips from your own experience, please let me and others know in the comments, thanks!&lt;/p&gt;

&lt;h2&gt;SenchaCon 2010 Video&lt;/h2&gt;

&lt;p&gt;First off, a very very insightful and helpful video from Sencha's &lt;a href="http://twitter.com/tmaintz"&gt;@tmaintz&lt;/a&gt; that you probably should watch first:&lt;/p&gt;

&lt;iframe src="http://player.vimeo.com/video/17882927?title=0&amp;amp;byline=0&amp;amp;portrait=0" width="400" height="225" frameborder="0" style="padding-left: 80px"&gt;&lt;/iframe&gt;


&lt;p&gt;&lt;a href="http://vimeo.com/17882927"&gt;SenchaCon 2010: Performance Optimization for Sencha Touch&lt;/a&gt; from &lt;a href="http://vimeo.com/sencha"&gt;Sencha&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;


&lt;p&gt;Besides the video, here are an older blog post, that Tommy mentioned in the video, and a more recent one about memory usage:&lt;/p&gt;

&lt;h2&gt;Event Delegation&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.sencha.com/blog/event-delegation-in-sencha-touch/"&gt;http://www.sencha.com/blog/event-delegation-in-sencha-touch/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Optimizing Memory Usage&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://www.sencha.com/blog/sencha-touch-optimizing-memory-usage/"&gt;http://www.sencha.com/blog/sencha-touch-optimizing-memory-usage/&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;General Performance tips from the PhoneGap wiki&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://wiki.phonegap.com/w/page/16494809/Performance-tips-for-device/"&gt;http://wiki.phonegap.com/w/page/16494809/Performance-tips-for-device/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The point "Do not use animated gifs." makes me wonder what to use for loading spinners: Animated gifs or CSS3 animations?&lt;br/&gt;
The most common spinner that is also included in Sencha Touch runs actually fine on the iPhone,
but a custom spinner I did the other day didn't run in sync on the iPhone and not at all on Android.&lt;/p&gt;

&lt;h2&gt;Custom CSS3 animation optimizations ideas&lt;/h2&gt;

&lt;p&gt;Regarding the "sync"-problem of my custom loading spinner, I received some interesting suggestions from Sencha's CEO Michael Mullany the other day.
Maybe those may be of help for others, as well, therefore I add the link to the forum thread here:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.sencha.com/forum/showthread.php?129697-CSS-animations-are-out-of-sync-on-iPhone"&gt;http://www.sencha.com/forum/showthread.php?129697-CSS-animations-are-out-of-sync-on-iPhone&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Again, please post in the comments any other helpful links or tips you might have, thanks!&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/senchatouchbits/~4/Qa5vxeociqY" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://www.senchatouchbits.com/10/performance-optimization.html</feedburner:origLink></entry>
  <entry>
    <id>www.senchatouchbits.com:9</id>
    <title type="html">Adding custom embedded (inline) icons</title>
    <published>2011-03-15T04:00:00Z</published>
    <updated>2011-03-16T02:03:57Z</updated>
    <link rel="alternate" href="http://feedproxy.google.com/~r/senchatouchbits/~3/uvzrPem6QQU/adding-custom-embedded-inline-icons.html" />
    <content type="html">&lt;p&gt;Sencha Touch comes bundled with a bunch of icons (329 as of 1.0.1a).
They are a bit hidden. You can find them in the distribution package at:&lt;br/&gt;
&lt;em&gt;resources/themes/images/default/pictos&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;Using default icons&lt;/h2&gt;

&lt;p&gt;To use one of those icons e.g. in a tab or button (by specifying &lt;em&gt;iconCls: 'some_icon'&lt;/em&gt;),
just include the following line in your Sass file:&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;@include pictos-iconmask('some_icon');
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;&lt;em&gt;some_icon&lt;/em&gt; has to be the file name of the icon image you find in the pictos folder.&lt;/p&gt;

&lt;p&gt;This method isn't just adding the icons via an url such as &lt;em&gt;url(/resources/themes/images/default/pictos/some_icon.png)&lt;/em&gt;.
It's embedding them right into your CSS via a data url. This guarantees your icons to be shown right when your app is rendered, instead of loading the icon after a delay.&lt;/p&gt;

&lt;p&gt;So your CSS will look something like:&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;&lt;span class="CssClass"&gt;&lt;span class="CssClass"&gt;.&lt;/span&gt;x-tab&lt;/span&gt; &lt;span class="CssTagName"&gt;img&lt;/span&gt;&lt;span class="CssClass"&gt;&lt;span class="CssClass"&gt;.&lt;/span&gt;some_icon&lt;/span&gt;, &lt;span class="CssClass"&gt;&lt;span class="CssClass"&gt;.&lt;/span&gt;x-button&lt;/span&gt; &lt;span class="CssTagName"&gt;img&lt;/span&gt;&lt;span class="CssClass"&gt;&lt;span class="CssClass"&gt;.&lt;/span&gt;x-icon-mask&lt;/span&gt;&lt;span class="CssClass"&gt;&lt;span class="CssClass"&gt;.&lt;/span&gt;some_icon&lt;/span&gt; {
  -webkit-mask-image: &lt;span class="SupportFunction"&gt;url&lt;/span&gt;(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA8CAYAAAA6/NlyAAAIgUlEQVRoBc2aWaxdUxjHezpqaVQprQ5JuakOqal&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;);
}
&lt;/pre&gt;
&lt;/div&gt;


&lt;h2&gt;Adding custom icons&lt;/h2&gt;

&lt;p&gt;Sometimes you want to add custom icons the same way though.
You could add the image file into the pictos folder and use Sencha Touch's &lt;em&gt;pictos-iconmask&lt;/em&gt; method as well.
Though, it's probably better to separate your custom files from the Sencha Touch files for better organization and especially for avoiding deleting them after the next upgrade of your Sencha Touch resource files.&lt;/p&gt;

&lt;p&gt;Here's the approach I'm taking:&lt;/p&gt;

&lt;p&gt;I use the build-in Compass method &lt;em&gt;inline-image&lt;/em&gt; which converts your image to a base64 inline image in my custom icon mask mixin:&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;@mixin custom-iconmask($name) {
  .x-tab img.#{$name}, .x-button img.x-icon-mask.#{$name} {
    -webkit-mask-image: &lt;span class="CssPropertyValue"&gt;inline&lt;/span&gt;-image(&lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;icons/&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt; + $name + &lt;span class="String"&gt;&lt;span class="String"&gt;'&lt;/span&gt;.png&lt;span class="String"&gt;'&lt;/span&gt;&lt;/span&gt;);
  }
}
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Then I just include a custom icon by&lt;/p&gt;

&lt;div&gt;
&lt;pre class="twilight"&gt;@include custom-iconmask('custom_icon');
&lt;/pre&gt;
&lt;/div&gt;


&lt;p&gt;Note that you can adjust the exact path and extension yourself.
In my case, the icon has to be a png in &lt;em&gt;images/icons/custom_icon.png&lt;/em&gt;.
&lt;em&gt;inline-image&lt;/em&gt; is assuming your images are in the &lt;em&gt;images&lt;/em&gt; folder by default.&lt;/p&gt;

&lt;h2&gt;Not using Compass&lt;/h2&gt;

&lt;p&gt;Of course, you can also just paste the base64 string of your custom icon into your CSS or SASS code.&lt;/p&gt;

&lt;p&gt;There are a few websites and offline tools out there that convert your images to base64 strings as used by the data url. None of the websites or tools I used have been working great for me though, therefore don't really deserve a mention. ;)&lt;/p&gt;

&lt;p&gt;Coincidentally, &lt;a href="http://twitter.com/msims84"&gt;Mitchell Simoens&lt;/a&gt; (Sencha's newest hire) released today a very handy Base64 encoder built with Ext Core and the HTML5 File API:&lt;br/&gt;
&lt;a href="http://www.sencha.com/forum/showthread.php?126882-Base64-Encoder"&gt;http://www.sencha.com/forum/showthread.php?126882-Base64-Encoder&lt;/a&gt;&lt;br/&gt;
Check it out, extremely easy and fast to use. :)&lt;/p&gt;

&lt;p&gt;That's all.&lt;/p&gt;
&lt;img src="http://feeds.feedburner.com/~r/senchatouchbits/~4/uvzrPem6QQU" height="1" width="1"/&gt;</content>
  <feedburner:origLink>http://www.senchatouchbits.com/9/adding-custom-embedded-inline-icons.html</feedburner:origLink></entry>
</feed>

