<?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>ExtDesenv</title>
	<atom:link href="http://extdesenv.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://extdesenv.com</link>
	<description>All about Sencha Frameworks and Products: ExtJS, Touch, Architect, Animator.</description>
	<lastBuildDate>Thu, 06 Jun 2013 00:37:05 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.1</generator>
		<item>
		<title>Adding Custom Font Icons to Sencha Touch 2.2</title>
		<link>http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=adding-custom-font-icons-to-sencha-touch-2-2</link>
		<comments>http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/#comments</comments>
		<pubDate>Thu, 02 May 2013 21:24:37 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Theming]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=675</guid>
		<description><![CDATA[In Sencha Touch 2.2 instead of using icons with the -webkit-mask trick, Touch is moving to a more cross-browser solution with icon fonts. You can read more about this at Steve Drucker blog Changes to Sencha Touch 2.2 Theming Part &#8230; <a href="http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In Sencha Touch 2.2 instead of using icons with the -webkit-mask trick, Touch is moving to a more cross-browser solution with icon fonts. You can read more about this at Steve Drucker blog <a href="http://druckit.wordpress.com/2013/04/04/changes-to-sencha-touch-2-2-theming-part-1-using-iconography/">Changes to Sencha Touch 2.2 Theming Part 1: Using Iconography</a>.</p>
<p>As Steve mentions on his blog, Touch SDK ships with the <a href="http://pictos.cc/font/">Pictos Font</a>, and it already loads some basic icons for you to use directly on buttons with iconCls. </p>
<pre class="brush: jscript; title: ; notranslate">
{
 xtype: 'button',
 iconCls: 'home'
}
</pre>
<p>If you want to define more icons from the same Pictos fonts, you just have to use the mixin icon():</p>
<pre class="brush: css; title: ; notranslate">@include icon('network');</pre>
<pre class="brush: jscript; title: ; notranslate">
{
 xtype: 'button',
 iconCls: 'network',
 iconAlign: 'top',
 text: 'Net'
}
</pre>
<p>Touch Theming Layer already has a big object on SASS mapping keys into characters. So when you inform the key &#8220;network&#8221;, the theme knows that it has to use the key &#8220;J&#8221;.</p>
<h1>Adding Custom Icons</h1>
<p>To add more icons you&#8217;ll need to generate your own font! You might be question yourself &#8211; How do I create a new font? Sounds complicated but it&#8217;s fairly easy.</p>
<p>There&#8217;s a few tools, but my favorite is <a href="http://icomoon.io/">IcoMoon</a>. With this tool you can select from dozens of fonts and create your own font package, or even import your own SVG vectors.</p>
<p>All you need to do is select your icons, click generate font, and download!</p>
<div id="attachment_677" class="wp-caption aligncenter" style="width: 734px"><a href="http://extdesenv.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-02-at-2.03.14-PM.png" rel="lightbox[675]" title="Select your icons"><img src="http://extdesenv.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-02-at-2.03.14-PM.png" alt="" title="Select your icons" width="724" height="475" class="size-full wp-image-677" /></a><p class="wp-caption-text">Select your icons&#8230;</p></div>
<div id="attachment_678" class="wp-caption aligncenter" style="width: 734px"><a href="http://extdesenv.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-02-at-2.03.25-PM.png" rel="lightbox[675]" title="Screen Shot 2013-05-02 at 2.03.25 PM"><img src="http://extdesenv.com/wp-content/uploads/2013/05/Screen-Shot-2013-05-02-at-2.03.25-PM.png" alt="..and download the font!" title="Screen Shot 2013-05-02 at 2.03.25 PM" width="724" height="475" class="size-full wp-image-678" /></a><p class="wp-caption-text">..and download the font!</p></div>
<p>After you have your font, it&#8217;s time to add to your project. Add the font into {touch_app}/resources/fonts/, and add this path to your config.rb:</p>
<pre class="brush: ruby; title: ; notranslate">
# Compass configurations
sass_path = dir
css_path = File.join(dir, &quot;..&quot;, &quot;css&quot;)
fonts_path = File.join(dir, &quot;..&quot;, &quot;fonts&quot;)
</pre>
<p>Hint: Because we&#8217;re defining the fonts_path I had an error like &#8220;Pictos fonts not found&#8221;. It&#8217;s also good to copy the pictos folder from touch/resources/themes/fonts to this new fonts/ directory.</p>
<p>For the last step you just need to include the font and use the icons on your app.scss, like this:</p>
<pre class="brush: css; title: ; notranslate">
@include icon-font('SenchaConIcons', inline-font-files(
  'senchacon-icons/senchacon-icons.woff', woff, 
  'senchacon-icons/senchacon-icons.ttf', truetype,
  'senchacon-icons/senchacon-icons.svg', svg
));

@include icon(&quot;menu&quot;  , &quot;\e009&quot;);
@include icon(&quot;search&quot;, &quot;\e000&quot;);
@include icon(&quot;star&quot;  , &quot;\e001&quot;);
</pre>
<p><strong>Updated June/5: In 2.2.1 you have to specify your font along with icon() mixin. Otherwise it will fallback to &#8216;Pictos&#8217;</strong></p>
<pre class="brush: css; title: ; notranslate">
@include icon(&quot;menu&quot;  , &quot;\e009&quot;, &quot;SenchaConIcons&quot;);
@include icon(&quot;search&quot;, &quot;\e000&quot;, &quot;SenchaConIcons&quot;);
@include icon(&quot;star&quot;  , &quot;\e001&quot;, &quot;SenchaConIcons&quot;);
</pre>
<h1>Recap</h1>
<ul>
<li>Use a tool to pick icons and generate the font (<a href="http://icomoon.io/app">IcoMoon</a>, <a href="http://fontello.com/">Fontello</a>)</li>
<li>Add font into new directory {your_app}/resources/fonts</li>
<li>Copy Pictos font from Touch directory to the same {your_app}/resources/fonts to avoid errors</li>
<li>Add fonts_path into config.rb so Compass finds your font</li>
<li>Import the font icon in your app.scss</li>
</ul>
<h1>What about PNG?</h1>
<p>PNG is bitmap based, while Fonts are vectorial based. The above mentioned tools provide hundreds of icons, so it&#8217;s pretty easy to find an existent font icon pre-built. If that&#8217;s not the case, you can convert PNG to SVG and then import into IcoMoon. There are tools for that, like <a href="http://vectormagic.com">VectorMagic</a>, <a href="http://image.online-convert.com/">Online Image Converter</a> or <a href="http://inkscape.org/">Inkscape</a>. I haven&#8217;t try any of these but If you have, please let us know via comment.</p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/" data-text="Adding Custom Font Icons to Sencha Touch 2.2"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;linkname=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;linkname=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;linkname=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;linkname=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;linkname=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftheming%2Fadding-custom-font-icons-to-sencha-touch-2-2%2F&amp;title=Adding%20Custom%20Font%20Icons%20to%20Sencha%20Touch%202.2" id="wpa2a_4"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/theming/adding-custom-font-icons-to-sencha-touch-2-2/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>New routing system for Ext JS</title>
		<link>http://extdesenv.com/extensions/new-routing-system-for-ext-js/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=new-routing-system-for-ext-js</link>
		<comments>http://extdesenv.com/extensions/new-routing-system-for-ext-js/#comments</comments>
		<pubDate>Thu, 01 Nov 2012 23:34:55 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Ext JS]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=645</guid>
		<description><![CDATA[Server-side MVC frameworks usually have a built-in routing system that matches URLs with pre-defined routes, and then dispatches Controller Actions, parsing parameters, doing validation, and etc. This makes very easy to architect your app defining controllers and actions and having &#8230; <a href="http://extdesenv.com/extensions/new-routing-system-for-ext-js/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Server-side MVC frameworks usually have a built-in routing system that matches URLs with pre-defined routes, and then dispatches  Controller Actions, parsing parameters, doing validation, and etc. This makes very easy to architect your app defining controllers and actions and having the routing engine solving the communication between parts.</p>
<p>Ext JS brings MVC to the client-side, providing a solid architecture for your application, but the only missing part is the routing system. That&#8217;s why <a href="https://market.sencha.com/users/10/extensions/8">Ext.ux.Router</a> was created.</p>
<p><a href="https://market.sencha.com/users/10/extensions/8">Ext.ux.Router</a> was released a year ago, and today a new version is coming! It has a brand new routing engine that is extremely flexible and also provides route validation. It also ships with improved docs and examples, and test cases to ensure code quality.</p>
<p>Check it out for free at <a href="https://market.sencha.com/users/10/extensions/8">market.sencha.com</a></p>
<pre class="brush: jscript; title: ; notranslate">Ext.application({
    name: 'App',
    ...
    routes: {
        '/': 'home#index',

        'users'                         : 'users#index',
        'users/:id'                     : 'users#show',
        'users/:id/:login'              : 'users#show',
        'users/*names'                  : 'users#showAll',
        'users/*ids/*names'             : 'users#showAll',
        'users/:id/*roles/:name/*groups': 'users#show',

        'search/:query/p:page'              : 'search#exec',
        '*first/complex-:part/*rest'        : 'home#complex',
        ':entity?*args'                     : 'home#base',


        'invoices/:id': {
            controller: 'invoices',
            action: 'show',
            id: /^\d+$/
        },

        'groups/:id': {
            controller: 'groups',
            action: 'show',
            id: function(value) {
                return value.match(/^\d+$/);
            }
        },

        'clients or client': {
            regex: /^(clients?)(?:\/(\d+)(?:\.\.(\d+))?)?/,
            controller: 'clients',
            action: 'index'
        }
    }
});</pre>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/extensions/new-routing-system-for-ext-js/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/extensions/new-routing-system-for-ext-js/" data-text="New routing system for Ext JS"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/extensions/new-routing-system-for-ext-js/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;linkname=New%20routing%20system%20for%20Ext%20JS" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;linkname=New%20routing%20system%20for%20Ext%20JS" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;linkname=New%20routing%20system%20for%20Ext%20JS" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;linkname=New%20routing%20system%20for%20Ext%20JS" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;linkname=New%20routing%20system%20for%20Ext%20JS" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fnew-routing-system-for-ext-js%2F&amp;title=New%20routing%20system%20for%20Ext%20JS" id="wpa2a_8"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/extensions/new-routing-system-for-ext-js/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Decouple Controller and View in Sencha MVC</title>
		<link>http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=decouple-controller-and-view-in-sencha-mvc</link>
		<comments>http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/#comments</comments>
		<pubDate>Thu, 09 Aug 2012 05:52:43 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Extensions]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Ext JS]]></category>
		<category><![CDATA[MVC]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=591</guid>
		<description><![CDATA[The MVC Architecture for Ext JS and Touch provides a solid foundation for building large and scalable apps; but if you follow the guides and implement in the way described you&#8217;ll notice that controllers and views are highly coupled. Controllers &#8230; <a href="http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>The MVC Architecture for Ext JS and Touch provides a solid foundation for building large and scalable apps; but if you follow the guides and implement in the way described you&#8217;ll notice that controllers and views are highly coupled. Controllers associate listeners to view events using component queries, thus making them aware of how the view is composed. As result we have a MVC architecture where the view is very light and does nothing but define components, and controllers will do all the heavy lifting by responding to user gestures, updating the view, dealing with models, business logic and more.<br />
<span id="more-591"></span></p>
<h1>The current MVC</h1>
<p>Currently:</p>
<ul>
<li>the view might contain several components;</li>
<li>each one of these components fire events;</li>
<li>the controller, using component query, will listen to these events;</li>
<li>once the event is fired, the controller is notified.</li>
</ul>
<p>This could be code translated by:</p>
<pre class="brush: jscript; title: ; notranslate">Ext.define('AM.controller.Users', {
    ...
    init: function() {
        this.control({
            'viewport &gt; userlist': {
                itemdblclick: this.editUser
            },
            'useredit button[action=save]': {
                click: this.updateUser
            }
        });
    },
    ...
    updateUser: function(button) {
        console.log('clicked the Save button');
    }
    ...
});</pre>
<p>The problem here is that the controller is fully aware of the structure of the view. It knows that inside the <i>useredit</i> view there&#8217;s a button with <i>action=save</i>.</p>
<p>This is a silly example, but I&#8217;ve seen worst cases where a controller class had 100 view references. Basically the whole controller was very associated with the view. Any changes on the view would result in refactoring the controller too.</p>
<h1>DeftJS</h1>
<p>Some months ago the guys from DeftJS wrote an awesome guest post at Sencha&#8217;s blog entitled <a href="http://www.sencha.com/blog/deftjs-loosely-coupled-mvc-through-dependency-injection/">Deft JS: Loosely Coupled MVC through Dependency Injection</a>. They notice the same problematic exposed above, and figured it out that using Inversion-of-Control implemented by Dependency Injection would be the way to solve this.</p>
<p>The post intro was very interesting:</p>
<blockquote><p>That application you just deployed? As experienced software developers, we all know it won’t be long before you’re going to need make to significant UI changes. Regardless of the amount of painstaking forethought, consensus gathering and planning backing it, no software design ever survives first contact with its users unscathed. To deliver truly effective software, we have to be prepared to adapt to an evolving understating of our users’ needs.</p>
<p>So… how do we architect our software, so we can rapidly implement UI changes without breaking the underlying business logic?</p></blockquote>
<p>You can read more details on the blog post or <a href="http://deftjs.org">their website</a>, but basically there&#8217;s something called ViewController, which is a controller scoped to a particular view other than the full application. As a result, all your component queries can be simplified. </p>
<pre class="brush: jscript; title: ; notranslate">Ext.define( 'ContactsApp.controller.ContactGridViewController',
    extend: 'Deft.mvc.ViewController',
    mixins: [ 'Deft.mixin.Injectable' ],
    inject: [ 'contactStore' ],
 
    config: {
        contactStore: null
    },
 
    control: {
        contactsGrid: {
            click: 'onContactsGridClick'
        }
        editButton: {
            click: 'onEditButtonClick'
        }
    },
    ...
    destroy: function() {
       if (this.hasUnsavedChanges) {
           // cancel destruction
           return false;
       }
       // allow destruction
       return this.callParent( arguments );
    },
    ...
    onEditButtonClick: function () {
        this.getEditButton.setDisabled( false );
    },
 
    onContactsGridClick: function () {
        // add a ContactEditorView to the TabPanel for the selected item
        ...
    },
);</pre>
<h1>Control on Containers</h1>
<p>Surprisingly, Sencha Touch not only can use control queries inside Ext.app.Controller but also use <a href="http://docs.sencha.com/touch/2-0/#!/api/Ext.Container-cfg-control">control for Ext.Container</a>. So we can move all component queries from Controller to View.</p>
<pre class="brush: jscript; title: ; notranslate">Ext.create('Ext.Container', {
    control: {
       'button1': {
           tap: 'hideMe'
       }
    },

    hideMe: function() {
        this.hide()
    }
});</pre>
<p>Why would you do that? Well, follow the code below:</p>
<pre class="brush: jscript; title: ; notranslate">/*
 * Create order form view
 */
Ext.create('App.view.OrderForm', {
    extend: 'Ext.form.Panel',
    xtype: 'orderform',

    control: {
        'button[action=submit]': {
            tap: 'onBtnSubmitTap'
        }
    },

    //...
    
    /**
     * Get the values from the form, add the id's selected
     * from the categories list, and fire the save event
     */
    onBtnSubmitTap: function(btn) {
        var values = this.getValues(),
            selectedCategories = this.down('#list-categories').getSelection(),
            categories = [];

        Ext.each(selectedCategories, function(category) {
            categories.push(category.getId());
        });

        values.categories = categories;
        this.fireEvent('save', this, values);
        }
    });


/**
 * Order Controller
 */
Ext.create('App.view.OrderController', {
    extend: 'Ext.app.Controller',
    control: {
        'orderform': {
            save: 'onOrderFormSave'
        }
    },

    /**
     * The controller does not need to know how the view is structred.
     * All it needs is the values, nothing else.
     */
    onOrderFormSave: function(formView, values) {
        Ext.Ajax.request({
            url: 'orders/save',
            params: values
            // ...
        });
    }
});
</pre>
<p>Basically we are inverting the control as well. Instead of having the Controller accessing the internals of the view and pulling out the values, we have the view dealing with its own logic to get the values, and then passing them for the controller to execute the business logic.</p>
<p>This leads to two major improvements:</p>
<ul>
<li>Changes in the view don&#8217;t affect controllers. If I change the way users select categories from a list to a radio button group, nothing changes in the controller.</li>
<li>Controllers are easily testable. In test specs we just need to mock the values and test if the controller method is responding correctly.</li>
</ul>
<p>And all of this without using any extensions, just changing the way we approach our architecture. Well, this is not completely true for Ext JS. Unfortunately the event system in Ext JS does not allow delegation in an easy way like Touch. You&#8217;d have to inform an array of events on the bubbleEvents config option for each component, something not very feasible. Perhaps in the future releases.</p>
<h1>There&#8217;s still room for improvements&#8230;</h1>
<p>This post just exposes some different approaches to the default Sencha MVC. Whether you&#8217;re going to use the default MVC or choose an alternative approach like DeftJS, Container Control or something customized, is up to you.</p>
<p>I have some more ideas that I&#8217;ll try to exemplify in future posts. Meanwhile let me know your thoughts about the whole subject with your comments.</p>
<h1>Further resources</h1>
<ul>
<li><a href="http://docs.sencha.com/ext-js/4-1/#!/guide/application_architecture">Ext JS Guide to MVC Architecture</a></li>
<li><a href="http://docs.sencha.com/touch/2-0/#!/guide/apps_intro">Intro to Applications with Sencha Touch 2</a></li>
<li><a href="http://docs.sencha.com/touch/2-0/#!/guide/controllers">Guide to Controllers</a></li>
</ul>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/" data-text="Decouple Controller and View in Sencha MVC"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;linkname=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;linkname=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;linkname=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;linkname=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;linkname=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Fextensions%2Fdecouple-controller-and-view-in-sencha-mvc%2F&amp;title=Decouple%20Controller%20and%20View%20in%20Sencha%20MVC" id="wpa2a_12"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/extensions/decouple-controller-and-view-in-sencha-mvc/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Native Mobile to Web #2: Path Menu</title>
		<link>http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=native-mobile-to-web-2-path-menu</link>
		<comments>http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/#comments</comments>
		<pubDate>Fri, 06 Jul 2012 22:32:25 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Native to Web]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=575</guid>
		<description><![CDATA[Here it is, another post where I take some cool native UI and reproduce using only HTML5 technologies. The first one was the Facebook Login page. The result was a pixel perfect UI, just as nice as the native one. &#8230; <a href="http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_577" class="wp-caption aligncenter" style="width: 210px"><a href="http://extdesenv.com/wp-content/uploads/2012/07/path-bruno.png" rel="lightbox[575]" title="path-bruno"><img src="http://extdesenv.com/wp-content/uploads/2012/07/path-bruno-200x300.png" alt="" title="path-bruno" width="200" height="300" class="size-medium wp-image-577" /></a><p class="wp-caption-text">Original iOS Interface</p></div>
<p>Here it is, another post where I take some cool native UI and reproduce using only HTML5 technologies. The first one was the <a href="http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/" title="Native Mobile To Web 1: Facebook Login">Facebook Login page</a>. The result was a pixel perfect UI, just as nice as the native one. Now I&#8217;m taking the Path animated menu!</p>
<p>For those who don&#8217;t know <a href="https://path.com/" title="Path App">Path</a>, it&#8217;s a social network for connecting with family and close friends, available for iOS and Android. It has very interesting features, but the thing that really caught my attention was their &#8220;fan-out animated menu&#8221;. When you tap the menu, the options fan out, with a nice circular animation. It&#8217;s so cool that I had to take this UI and port it. I translated &lt;divs&gt; to Ext.Buttons, created the CSS3 animation and calculations, so everything works properly with Touch  components.<br />
<span id="more-575"></span><br />
This is the result below! You need to use a WebKit Browser in order to see it (Smartphone browsers, Google Chrome or Safari).</p>
<iframe class="live-example" width="100%" style="max-width:300px;" height="300" src="http://brunotavares.github.com/SenchaExamples/touch/native-to-web-path-menu/"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small>
<ul>
<li>Live Example: <a href="http://brunotavares.github.com/SenchaExamples/touch/native-to-web-path-menu/" title="Path Menu">http://brunotavares.github.com/SenchaExamples/touch/native-to-web-path-menu/</a></li>
<li>Source code: <a href="https://github.com/brunotavares/SenchaExamples/tree/master/touch/native-to-web-path-menu" title="Facebook Web Login">http://github.com/brunotavares/SenchaExamples/</a>
</ul>
<h1>Animation</h1>
<p>Inside the path menu container I have one main button, and other small ones. They all are absolute positioned, and stacked together. So the main button actually covers the small ones, having a <i>z-index: 2</i>. When this button is tapped, either <i>fanOut</i> or <i>fanIn</i> methods are triggered. Those methods iterate over each item, animating them with methods <i>fanOutItem</i> or <i>fanInItem</i>.</p>
<p>The <i>fanInItem</i> is easy. We just have to take the items and translate to the origin, which is 0,0. The tricky method is <i>fanOutItem</i>. There is a couple of math involved for calculating the X,Y position of the item on top of the arch line. You can check all those methods below:</p>
<pre class="brush: jscript; title: ; notranslate">onPathBtnTap: function(btn) {
    var pressedCls = Ext.baseCSSPrefix + 'button-pressed';
    
    btn.pressed = !btn.pressed;
    
    if (btn.pressed) {
        btn.addCls(pressedCls);
        this.fanOut();
    }
    else {
        btn.removeCls(pressedCls);
        this.fanIn();
    }
},

fanOut:  function() {
    this.getComponent(0).items.each(this.fanOutItem, this);
},

fanIn:  function() {
    this.getComponent(0).items.each(this.fanInItem, this);
},

//@private
fanOutItem: function(item, index, len) {
    var angle, rad, sin, cos, x, y, style, difCenter,
        arc     = 90,
        distance= 150;
    
    //ignore main button
    if (index === 0) {
        return;
    }
    index--;
    len--;
    
    //calculate angle using items count
    if (len === 1) {
        angle = 0;
    }
    else {
        angle = (arc/(len-1)) * index;
    }
    
    //transform angle to rad
    rad = angle * Math.PI/180;
    
    //calculate cos and sin
    cos = Math.cos(rad);
    sin = Math.sin(rad);
    
    //find x,y using distance
    x = Math.ceil(distance * cos);
    y = Math.ceil(distance * sin * -1);
    
    style = {
        '-webkit-transition-delay': (30 * index) + 'ms',
        '-webkit-transform': 'translate3d('+x+'px, '+y+'px, 0)'
    };
    
    if (!item.rendered) {
        item.style = style;
    }
    else {
        item.element.applyStyles(style);
    }
},

//@private
fanInItem: function(item, index, len) {
    //ignore main button
    if (index === 0) {
        return;
    }
    
    var style = {
        '-webkit-transition-delay': (30 * index) + 'ms',
        '-webkit-transform': 'translate3d(0px, 0px, 0)'
    };
    
    if (!item.rendered) {
        item.style = style;
    }
    else {
        item.element.applyStyles(style);
    }
}</pre>
<h1>Theming</h1>
<p><a href="http://extdesenv.com/wp-content/uploads/2012/07/path-menu-button.png" rel="lightbox[575]" title="path-menu-button"><img src="http://extdesenv.com/wp-content/uploads/2012/07/path-menu-button.png" alt="Path menu buttons" title="path-menu-button" width="275" height="123" class="aligncenter size-full wp-image-578" /></a></p>
<p>I&#8217;m just using a couple gradients and box-shadows. Since I don&#8217;t want to change the HTML structure of the component itself, I had to use <a href="http://coding.smashingmagazine.com/2011/07/13/learning-to-use-the-before-and-after-pseudo-elements-in-css/" title="More about CSS pseudo-elements">CSS pseudo elements :before and :after</a>. </p>
<p>The :before was used for the outer gray and white box-shadows. They are not borders, but 2 box-shadows. The :after was used for the pressed state, putting a black mask on top of the button.</p>
<h1>Wrapping Up</h1>
<p>Currently everything is very hard coded, and my next task is make this more extensible, allowing other developers to take this animation and plug to any other containers. Also allow customizations, like change the arch degree and items distance to origin.</p>
<p>Hey, if you found this interesting don&#8217;t forget to tweet and share it with others :) I&#8217;m always looking for new cool UIs to reproduce with HTML5.</p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/" data-text="Native Mobile to Web #2: Path Menu"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;linkname=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;linkname=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;linkname=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;linkname=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;linkname=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-2-path-menu%2F&amp;title=Native%20Mobile%20to%20Web%20%232%3A%20Path%20Menu" id="wpa2a_16"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/native-mobile-to-web-2-path-menu/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Advanced CSS3 animations with Sencha Touch</title>
		<link>http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=advanced-css3-animations-with-sencha-touch</link>
		<comments>http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/#comments</comments>
		<pubDate>Thu, 14 Jun 2012 04:31:33 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Animations]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com.br/?p=427</guid>
		<description><![CDATA[Touch has some nice CSS3 animations like slide, flip, fade, pop and cube&#8230;but what if you need something different, like a custom slide-fade animation? I&#8217;ve covered how to use animations in Using CSS3 animations on Sencha Touch and Animate components &#8230; <a href="http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-advanced-custom-animation.png" rel="lightbox[427]" title="Advanced Custom Animations with Touch 2"><img src="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-advanced-custom-animation.png" alt="" title="Advanced Custom Animations with Touch 2" width="584" height="252" class="aligncenter size-full wp-image-560" /></a><br />
Touch has some nice CSS3 animations like slide, flip, fade, pop and cube&#8230;but what if you need something different, like a custom slide-fade animation? </p>
<p>I&#8217;ve covered how to use animations in <a href="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/">Using CSS3 animations on Sencha Touch</a> and <a href="http://extdesenv.com/tutorials/animate-components-in-a-view/">Animate components in a view</a>, but I didn&#8217;t cover the internals of the framework, nor how can you create a custom animation. So let&#8217;s take a look at it, step by step.<br />
<span id="more-427"></span><br />
Let&#8217;s first clarify some of the concepts. Ext.Animator and Ext.Anim classes are different. While Ext.Animator provides full animations for components, Ext.Anim provides a much simpler approach for DOM elements. So don&#8217;t expect to  slide a container out of the screen with Ext.Anim and have the hide event fire only when the animation is over. This is responsability of Ext.Animator. Animator for components, Anim for simple DOM animations.</p>
<h1>Ext.Animator</h1>
<p>As I said, Ext.Animator is responsible for components animations. It will pause events like hide, and resume when the components is totally hidden, and so on. It has 3 key packages: Runner, Animations and Layout.</p>
<h1>Runner</h1>
<p><a href="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-runner-diagram.png" rel="lightbox[427]" title="touch 2 runner diagram"><img src="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-runner-diagram.png" alt="" title="touch 2 runner diagram" width="380" height="247" class="aligncenter size-full wp-image-549" /></a><br />
If you have an animation class, you need a runner class to execute it. That&#8217;s why we have the base class Ext.fx.runner.Css, that is extended between Ext.fx.runner.CssAnimation and Ext.fx.runner.CssTransition. Currently only CssTransition is in use, while CssAnimation class is still under development. The class responsible for exposing these runners is Ext.fx.Runner:</p>
<pre class="brush: jscript; title: ; notranslate">Ext.define('Ext.fx.Runner', {
    requires: [
        'Ext.fx.runner.CssTransition'
//        'Ext.fx.runner.CssAnimation'
    ],

    constructor: function() {
        return new Ext.fx.runner.CssTransition();
    }
});</pre>
<p>You can see that Ext.fx.Runner is pretty simple, and currently only returns an instance of Ext.fx.Runner.CssAnimation.</p>
<p>Going even deeper, if you look the source code of Ext-more.js you&#8217;ll notice something like this:</p>
<pre class="brush: jscript; title: ; notranslate">animator: {
	xclass: 'Ext.fx.Runner'
},

//and

if (data.animator) {
	Ext.Animator = data.animator;
}</pre>
<p>It means that when the framework starts, it will create an instance of Ext.fx.Runner and hold it with the reference Ext.Animator. This is what the frameworks uses for running its animations, Ext.Animator.run().</p>
<p>This is the first piece of Touch Fx package, the runner. Let&#8217;s move to Animation classes.</p>
<h1>Animation</h1>
<p><a href="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-animation-diagram.png" rel="lightbox[427]" title="touch 2 animation diagram"><img src="http://extdesenv.com/wp-content/uploads/2012/06/touch-2-animation-diagram.png" alt="" title="touch 2 animation diagram" width="556" height="248" class="aligncenter size-full wp-image-550" /></a><br />
Ok, we have a class that runs animations, now we need classes that define those animations. It all starts with the abstract class Ext.fx.animation.Abstract, and its extensions Ext.fx.animation.* : Cube, Fade, Flip, Pop, Slide, Wipe. </p>
<p>These classes have the simple task of define the 2 states of a animator: from and to. Take a look on this snippet for Ext.fx.animation.Pop</p>
<pre class="brush: jscript; title: ; notranslate">getData: function() {
    var to = this.getTo(),
        from = this.getFrom(),
        out = this.getOut();

    if (out) {
        from.set('opacity', 1);
        from.setTransform({
            scale: 1
        });

        to.set('opacity', 0);
        to.setTransform({
            scale: 0
        });
    }
    else {
        from.set('opacity', 0);
        from.setTransform({
            scale: 0
        });

        to.set('opacity', 1);
        to.setTransform({
            scale: 1
        });
    }

    return this.callParent(arguments);
}</pre>
<p>If the animation is &#8220;out&#8221;, which means the popOut animation, the opacity and scale will go from 1 to 0, and the inverse if the animation is a popIn, going visible on the screen.</p>
<p>You can look other classes like Fade, Scale and so on, and verify that they are pretty simple. This is the key for creating our custom &#8220;Slide-Fade&#8221; animation.</p>
<pre class="brush: jscript; title: ; notranslate">Ext.define('Ext.fx.animation.ScaleFade', {
    extend: 'Ext.fx.animation.Abstract',
    alternateClassName: 'Ext.fx.animation.ScaleFadeIn',
    alias: ['animation.scalefade', 'animation.scaleFadeIn'],

    config: {
        out: false,
        before: {
            display: null,
            opacity: 0
        },
        after: {
            opacity: null
        },
        reverse: null
    },

    updateOut: function(newOut) {
        var to   = this.getTo(),
            from = this.getFrom();

        if (newOut) {
            from.set('opacity', 1);
            from.setTransform({
                scale: 1,
                translateY: 0
            });
            
            to.set('opacity', 0);
            to.setTransform({
                scale: 1.2,
                translateY: 100
            });
        } 
        else {
            from.set('opacity', 0);
            from.setTransform({
                scale: 1.2,
                translateY: 100
            });
            
            to.set('opacity', 1);
            to.setTransform({
                scale: 1,
                translateY: 0
            });
        }
    }
});</pre>
<p>Ok, we have a runner and an animation. We are already able to show a component with animation doing something like this:</p>
<pre class="brush: jscript; title: ; notranslate">panel.show('scaleFadeIn');</pre>
<p>Let&#8217;s go even further with the next step, animated layouts.</p>
<h1>Layout</h1>
<p>What if we need our custom animation embedded in a card layout, so cards go out with scaleFadeOut and in with scaleFadeIn? We need to create a layout animation class. </p>
<p>Currently the card layout is the only who actually makes use of animations. The basic idea is to have a class Ext.fx.layout.card.Abstract that listens for the activeitemchange listeners, and once a card changes, the old card is hidden with an out-animation and the new card is shown with an in-animation.</p>
<p>Each layout animation class (Cover, Cube, Fade, Flip, Pop, Reveal&#8230;) basically defines the inAnimation and outAnimation, like the class Ext.fx.layout.card.Slide below:</p>
<pre class="brush: jscript; title: ; notranslate">Ext.define('Ext.fx.layout.card.Slide', {
    extend: 'Ext.fx.layout.card.Style',

    alias: 'fx.layout.card.slide',

    config: {
        inAnimation: {
            type: 'slide',
            easing: 'ease-out'
        },
        outAnimation: {
            type: 'slide',
            easing: 'ease-out',
            out: true
        }
    },

    updateReverse: function(reverse) {
        this.getInAnimation().setReverse(reverse);
        this.getOutAnimation().setReverse(reverse);
    }
});</pre>
<p>So in order to have our custom scale-fade animation being used as a card layout animation, we need to define a new class:</p>
<pre class="brush: jscript; title: ; notranslate">Ext.define('Ext.fx.layout.card.ScaleFade', {
    extend: 'Ext.fx.layout.card.Style',
    alias: 'fx.layout.card.scalefade',

    config: {
        reverse: null,
        
        inAnimation: {
            type: 'scalefade'
        },
        outAnimation: {
            type: 'scalefadeout'
        }
    }
});</pre>
<p>Pretty simple isn&#8217;t it? With that we cover the last piece, and we are able to create something like the code below. A container with a card layout using our custom animation for transitions.</p>
<pre class="brush: jscript; title: ; notranslate">{
    xtype: 'container',
    layout: {
        type: 'card',
        animation: 'scalefade'
    },
    items: [{
        html: 'Card 1'
    },{
        html: 'Card 2'
    },{
        html: 'Card 3'
    }]
}</pre>
<h1>Grab the code!</h1>
<p>This wraps up everything about how CSS3 animations works in Sencha Touch. You&#8217;re now able to create the coolest animations and tie everything up with Touch components, taking full advantage of the framework.</p>
<p>The topic is a little bit complex, so let me know if you have comments and doubts about it!</p>
<p>Source code available in <a href="https://github.com/brunotavares/SenchaExamples/tree/master/touch/animations-advanced-custom">Sencha Examples Github: animations-advanced-custom</a></p>
<p>Live example:<br />
<iframe class="live-example" width="100%" style="max-width:;" height="250" src="http://brunotavares.github.com/SenchaExamples/touch/animations-advanced-custom/index.html"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small></p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/" data-text="Advanced CSS3 animations with Sencha Touch"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;linkname=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;linkname=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;linkname=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;linkname=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;linkname=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fadvanced-css3-animations-with-sencha-touch%2F&amp;title=Advanced%20CSS3%20animations%20with%20Sencha%20Touch" id="wpa2a_20"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/advanced-css3-animations-with-sencha-touch/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Sencha Performance Tips #1: Avoid Overnesting</title>
		<link>http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=sencha-performance-tips-1-avoid-overnesting</link>
		<comments>http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/#comments</comments>
		<pubDate>Fri, 01 Jun 2012 23:35:13 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Performance Tips]]></category>

		<guid isPermaLink="false">http://www.extdesenv.com.br/?p=285</guid>
		<description><![CDATA[As a member of the Professional Services Team here at Sencha, we are often asked for fix problems in our client&#8217;s apps. And the number one issue we can immediately detect is overnesting. But what&#8217;s overnesting, why it&#8217;s bad and &#8230; <a href="http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>As a member of the Professional Services Team here at Sencha, we are often asked for fix problems in our client&#8217;s apps. And the number one issue we can immediately detect is overnesting. But what&#8217;s overnesting, why it&#8217;s bad and how can we avoid it? Let&#8217;s check it out!</p>
<h1>What is overnesting?</h1>
<p>I&#8217;ve picked some quotes from our Sencha Forum users trying to verbalize what it is:</p>
<blockquote><p>Overnesting is using an additional container that doesn&#8217;t actually do anything besides containing another component.</p></blockquote>
<p>It adds no extra functionality, it&#8217;s a useless container&#8230;</p>
<blockquote><p>Overnesting refers to nesting without reason.</p></blockquote>
<p>Again, useless container&#8230;</p>
<blockquote><p>Overnesting means have redundant panels in the hierarchy.</p></blockquote>
<p>Good, has to do with the hierarchy&#8230;</p>
<p>Maybe it&#8217;s still not very clear&#8230;let&#8217;s see some code:<br />
<span id="more-285"></span></p>
<pre class="brush: jscript; title: ; notranslate">//example 1: TabPanel and GridPanel case
{
	xtype: 'tabpanel',
	items: [{
		title: 'Users Grid',
		layout: 'fit',
		border: false,
		items: {
			xtype: 'grid',
			store: 'Users',
			columns: [{
				header: 'Name',
				dataIndex: 'name'
			}]
		}
	}]
}

//example 2: TreePanel on Border Layout case
{
    xtype: 'panel',
    layout: 'border',
    items: [{
        xtype: 'panel',
        title: 'Navigation',
        layout: 'fit',
        region: 'west',
        width: 200,
        border: false,
        items: {
            xtype: 'treepanel'
            store: 'NavigationStore'
        }
    }, {
        xtype: 'panel',
        layout: 'fit',
        region: 'center',
        items: {
            xtype: 'tabpanel',
            border: false,
            items: [{
                title: 'Home Tab',
                html: 'Welcome!'
            }]
        }
    }]
}

//example 3: FormPanel case
Ext.define('App.view.UserForm',{
    extend: 'Ext.Panel',
    layout: 'fit',
    items: {
        xtype: 'form',
        items: [{
            fieldLabel: 'Name',
            name: 'name'
        },{
            fieldLabel: 'Email',
            name: 'email'
        }]
    }
});
</pre>
<p>All of the snippets above have overnesting issue. They all have one panel that shouldn&#8217;t be there. Since GridPanel, TreePanel and FormPanel are all Panels, there&#8217;s no need to wrap them in another Panel. The wrapper panel is useless.</p>
<p>First case we have a TabPanel with only one card. This card has the title &#8220;Users Grid&#8221;, and a grid inside of it fitting 100% of its space, thanks to fit layout. Since GridPanel is a Panel, it also understands the title config option. So we have a useless Panel here! This would be the right version:</p>
<pre class="brush: jscript; title: ; notranslate">//example 1 fixed
{
	xtype: 'tabpanel',
	items: [{
		xtype: 'grid',
		store: 'Users',
		title: 'Users Grid',
		columns: [{
			header: 'Name',
			dataIndex: 'name'
		}]
	}]
}</pre>
<p>Second case we have a border layout Panel with 2 regions. The west region has a Panel entitled &#8216;Navigation&#8217;, with a TreePanel inside. This is our first occurrence of overnesting. The second is having a Panel on the center region, with a TabPanel inside of it. Since TabPanel is a Panel, we can directly put it as the center region.</p>
<pre class="brush: jscript; title: ; notranslate">//example 2 fixed
{
    xtype: 'panel',
    layout: 'border',
    items: [{
        xtype: 'treepanel',
        title: 'Navigation',
        store: 'NavigationStore',
        region: 'west',
        width: 200,
        border: false,
    }, {
        xtype: 'tabpanel',
        region: 'center',
        items: [{
            title: 'Home Tab',
            html: 'Welcome!'
        }]
    }]
}</pre>
<p>The last case we defined a class that extends Panel, and inside of it we create a single FormPanel as child item. Simply subclassing FormPanel would solve the problem.</p>
<pre class="brush: jscript; title: ; notranslate">//example 3 fixed
Ext.define('App.view.UserForm',{
    extend: 'Ext.form.Panel',
    items: [{
        fieldLabel: 'Name',
        name: 'name'
    },{
        fieldLabel: 'Email',
        name: 'email'
    }]
});</pre>
<p>And overnesting is not all about Panels! You can also overnest Containers inside Containers, or even Containers and Panels, like the examples below were we have useless Containers wrapping Fieldset and GridPanel.</p>
<pre class="brush: jscript; title: ; notranslate">//example 1 Container+Container
{
    xtype: 'form',
    items: [{
        fieldLabel: 'Name',
        name: 'name'
    },{
        xtype: 'container',
        items: {
            xtype: 'fieldset',
            items: [
                //...
            ]
        }
    }]
}

//example 2 Container+GridPanel
{
    xtype: 'container',
    region: 'center',
    layout: 'fit'
    items: {
        xtype: 'grid',
        //...
    }
}</pre>
<h1>What&#8217;s the problem with overnesting?</h1>
<ul>
<li>Extra panels means extra objects in memory and extra HTML markup</li>
<li>Code has more levels, and it&#8217;s more complex and less maintainable</li>
<li>With a bunch of nested panels you&#8217;re dangerously close to have layout problems. Forget to add layout to one of them, and then try to hunt your issue in this mess&#8230;not good!</li>
</ul>
<h1>How to detect and fix?</h1>
<p>If you find yourself creating too many objects with <i>layout: &#8216;fit&#8217;</i> and <i>border: false</i>, this could be one signal for overnesting. The basic rule is, watch out for Containers inside Containers. And this might be hard to see, specially because <i>xtype: &#8216;panel&#8217;</i> is default on many objects definitions so we omit it. In the example below there&#8217;s an extra panel with title: &#8216;Category Form&#8217;, a form as child, and no <i>xtype: &#8216;panel&#8217;</i> declaration. We could have promoted the form one level up and move the title config to it, saving one extra useless panel. </p>
<pre class="brush: jscript; title: ; notranslate">var tabPanel = Ext.create('Ext.TabPanel',{
    items: [{
        title: 'Category Form'
        items: {
            xtype: 'form',
            items: [
                //...
            ]
        }
    },{
        title: 'Categories'
        xtype: 'treepanel',
        store: 'CategoriesStores'
    }]
});</pre>
<p>Also watch out for classes that extend Panel, like Ext.menu.Menu! Did you know you can create a Menu, set floating to false, and put it inside a border layout as the west region for navigation? No need to create a wrapping panel for it.</p>
<pre class="brush: jscript; title: ; notranslate">Ext.create('Ext.Window',{
    layout: 'border',
    width: 500,
    height: 300,
    autoShow: true,
    items: [{
        xtype: 'menu',
        floating: false,
        region: 'west',
        width: 300,
        items: [{
            text: 'Test'
        }]
    },{
        region: 'center'
    }]
});</pre>
<p>So, we&#8217;ve seen today what is overnesting, how to detect, how to fix, and why it&#8217;s bad. Now we just need to do some detailed code reviews! :)</p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/" data-text="Sencha Performance Tips #1: Avoid Overnesting"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;linkname=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;linkname=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;linkname=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;linkname=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;linkname=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fsencha-performance-tips-1-avoid-overnesting%2F&amp;title=Sencha%20Performance%20Tips%20%231%3A%20Avoid%20Overnesting" id="wpa2a_24"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/sencha-performance-tips-1-avoid-overnesting/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Animate components in a view</title>
		<link>http://extdesenv.com/tutorials/animate-components-in-a-view/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=animate-components-in-a-view</link>
		<comments>http://extdesenv.com/tutorials/animate-components-in-a-view/#comments</comments>
		<pubDate>Tue, 29 May 2012 04:27:00 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Animations]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=504</guid>
		<description><![CDATA[Since the last post (Using CSS3 animations on Sencha Touch) was about animations, and I stumbled upon this question at Sencha&#8217;s forum, I thought I would develop a simple demo showing how to take a view, and animate random components &#8230; <a href="http://extdesenv.com/tutorials/animate-components-in-a-view/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Since the last post (<a href="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/" title="Using CSS3 animations on Sencha Touch">Using CSS3 animations on Sencha Touch</a>) was about animations, and I stumbled upon this <a href="http://www.sencha.com/forum/showthread.php?207857-Animate-a-button&#038;p=815354&#038;posted=1#post815354">question at Sencha&#8217;s forum</a>, I thought I would develop a simple demo showing how to take a view, and animate random components inside it.</p>
<blockquote><p>Obviously there are simple page animations, such as with a card layout, but I&#8217;m looking for the right approach to animate an object like a button &#8211; for example to get it to fly in from the side after a delay, after the view is loaded.</p>
<p>Here&#8217;s hoping someone will take pity on me, and spell it out!</p>
<p>Allister</p></blockquote>
<p><span id="more-504"></span><br />
Source code available at <a href="https://github.com/brunotavares/SenchaExamples/tree/master/touch/animate-button">github SenchaExamples/touch/animate-button</a>, and <a href="http://brunotavares.github.com/SenchaExamples/touch/animate-button/">live example at this link</a>.</p>
<script src="http://gist-it.appspot.com/github/brunotavares/SenchaExamples/raw/master/touch/animate-button/app/view/Main.js"></script>
<iframe class="live-example" width="100%" style="max-width:;" height="250" src="http://brunotavares.github.com/SenchaExamples/touch/animate-button/index.html"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/animate-components-in-a-view/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/animate-components-in-a-view/" data-text="Animate components in a view"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/animate-components-in-a-view/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;linkname=Animate%20components%20in%20a%20view" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;linkname=Animate%20components%20in%20a%20view" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;linkname=Animate%20components%20in%20a%20view" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;linkname=Animate%20components%20in%20a%20view" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;linkname=Animate%20components%20in%20a%20view" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fanimate-components-in-a-view%2F&amp;title=Animate%20components%20in%20a%20view" id="wpa2a_28"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/animate-components-in-a-view/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Using CSS3 animations on Sencha Touch</title>
		<link>http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=using-css3-animations-on-sencha-touch</link>
		<comments>http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/#comments</comments>
		<pubDate>Sun, 27 May 2012 02:36:52 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Animations]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=470</guid>
		<description><![CDATA[So you&#8217;ve seen all those cool animations on Touch demos right? Cards with slide effect, Message boxes that pop or fade out, etc&#8230; Here are some quick examples and tips on how you can change default animations and add more &#8230; <a href="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>So you&#8217;ve seen all those cool animations on <a href="http://docs.sencha.com/touch/2-0/touch-build/examples/production/kitchensink/#demo/SlideLeft" title="Sencha Touch Animations Kitchen Sink">Touch demos</a> right? Cards with slide effect, Message boxes that pop or fade out, etc&#8230; Here are some quick examples and tips on how you can change default animations and add more style to your app.</p>
<p>There&#8217;s basically 3 ways you can embed animations in your views: </p>
<ol>
<li>show(animationCfg) method: pass an individual config with show/hide methods</li>
<li>showAnimation &amp; hideAnimation configs</li>
<li>animations with card layout</li>
</ol>
<p><span id="more-470"></span><br />
And there&#8217;s another way to use animations, but it&#8217;s intended for individual DOM elements, and not components. It&#8217;s the Ext.Anim class.</p>
<p>Check below the code and a working example on how to use each one of these 3 animations + Ext.Anim:</p>
<script src="http://gist-it.appspot.com/github/brunotavares/SenchaExamples/raw/master/touch/animations/index.html"></script>
<iframe class="live-example" width="100%" height="300px" src="http://brunotavares.github.com/SenchaExamples/touch/animations/index.html"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/" data-text="Using CSS3 animations on Sencha Touch"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;linkname=Using%20CSS3%20animations%20on%20Sencha%20Touch" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;linkname=Using%20CSS3%20animations%20on%20Sencha%20Touch" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;linkname=Using%20CSS3%20animations%20on%20Sencha%20Touch" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;linkname=Using%20CSS3%20animations%20on%20Sencha%20Touch" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;linkname=Using%20CSS3%20animations%20on%20Sencha%20Touch" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fusing-css3-animations-on-sencha-touch%2F&amp;title=Using%20CSS3%20animations%20on%20Sencha%20Touch" id="wpa2a_32"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/using-css3-animations-on-sencha-touch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Native Mobile to Web #1: Facebook Login</title>
		<link>http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=native-mobile-to-web-1-facebook-login</link>
		<comments>http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/#comments</comments>
		<pubDate>Fri, 18 May 2012 18:32:16 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Native to Web]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=434</guid>
		<description><![CDATA[Wouldn&#8217;t be cool if we selected some native mobile UI and try to recreate them using only HTML5, CSS3 and JavaScript? So, today is Facebook&#8217;s extraordinary IPO and I took their clean &#038; classy login screen and recreated it for &#8230; <a href="http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_437" class="wp-caption aligncenter" style="width: 210px"><a href="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-ios.png" rel="lightbox[434]" title="facebook-login-ios"><img src="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-ios-200x300.png" alt="" title="facebook-login-ios" width="200" height="300" class="size-medium wp-image-437" /></a><p class="wp-caption-text">Original iOS Interface</p></div>
<p>Wouldn&#8217;t be cool if we selected some native mobile UI and try to recreate them using only HTML5, CSS3 and JavaScript? So, today is Facebook&#8217;s extraordinary IPO and I took their clean &#038; classy login screen and recreated it for the web! Here it is the final result, some code and also comments.<br />
<span id="more-434"></span><br />
Disclaimer: I created this app with the iPhone Facebook App in mind. I only tested the app on iPhone. I already noticed that the radial gradient background looks pixelated on Chrome, and I also suspect that due to other gradients, alpha colors and etc this app will make some Android and BlackBerry devices scream. Please don&#8217;t blame me :)</p>
<iframe class="live-example" width="100%" style="max-width:320px;" height="480" src="http://brunotavares.github.com/SenchaExamples/touch/native-to-web-facebook-login/"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small>
<p>This view above is an iframe, if you open this blog post with Chrome or Safari you&#8217;ll be able to see it running! You can also point your mobile device to the following URL:</p>
<ul>
<li>Live Example: <a href="http://brunotavares.github.com/SenchaExamples/touch/native-to-web-facebook-login/" title="Facebook Web Login">http://brunotavares.github.com/SenchaExamples/touch/native-to-web-facebook-login/</a></li>
<li>Source code: <a href="https://github.com/brunotavares/SenchaExamples/tree/master/touch/native-to-web-facebook-login" title="Facebook Web Login">http://github.com/brunotavares/SenchaExamples/</a>
</ul>
<h1>View</h1>
<p>The view it&#8217;s pretty simple. We have the logo, 2 fields and 3 buttons. The only thing that might look different is the component with CSS class &#8216;shadow&#8217;. Since I wasn&#8217;t able to create a box-shadow for the fields without creating conflicts with their borders, I use this component as a layer on top of the fields with the inner shadow.</p>
<script src="http://gist-it.appspot.com/github/brunotavares/SenchaExamples/raw/master/touch/native-to-web-facebook-login/app/view/Login.js"></script>
<h1>Theming</h1>
<p>About the theming, there&#8217;s a lot of CSS3 stuff inside. I&#8217;m using <a href="http://sass-lang.com/" title="Sass Lang">Sass</a> with <a href="http://compass-style.org">Compass framework</a>, so it alleviates some of the hurdles of plain CSS. Logo is just a component with fixed size and a background image. I&#8217;m also providing the retina version of it using the medias queries.</p>
<p><a href="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-fields.png" rel="lightbox[434]" title="facebook-login-fields"><img src="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-fields.png" alt="" title="facebook-login-fields" width="567" height="187" class="aligncenter size-full wp-image-447" /></a><br />
As I wrote previously, the shadow component is a <del datetime="2012-05-18T06:42:15+00:00">hack</del> solution for making the inner box-shadow, without creating conflicts with the fields&#8217; borders. The email field has a gray border on the bottom, and the password a white border on the top. It creates kind of an edge between fields. Something different about the fields is that you can style the text placeholder using ::-webkit-input-placeholder.</p>
<p><a href="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-buttons.png" rel="lightbox[434]" title="facebook-login-buttons"><img src="http://extdesenv.com/wp-content/uploads/2012/05/facebook-login-buttons.png" alt="" title="facebook-login-buttons" width="262" height="102" class="aligncenter size-full wp-image-449" /></a><br />
The buttons received new gradients, and also additional box-shadows. They also provide the same pressing state as the original interface.</p>
<script src="http://gist-it.appspot.com/github/brunotavares/SenchaExamples/raw/master/touch/native-to-web-facebook-login/resources/sass/app.scss"></script>
<h1>Wrapping up</h1>
<p>And that&#8217;s pretty much it. This is a great exercise, to see what we can accomplish using only web. Specially with Sencha Touch, since we hear a lot of questions asking how easy/hard it is to customize Touch components. </p>
<p>I wanted to use only CSS3, but for production it would be better to use a solid image for the radial background for non-iOS devices, and other sutil improvements. From my experience it performs way better.</p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/" data-text="Native Mobile to Web #1: Facebook Login"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;linkname=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;linkname=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;linkname=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;linkname=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;linkname=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fnative-mobile-to-web-1-facebook-login%2F&amp;title=Native%20Mobile%20to%20Web%20%231%3A%20Facebook%20Login" id="wpa2a_36"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/native-mobile-to-web-1-facebook-login/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
		</item>
		<item>
		<title>How to create a mobile Flickr app with Sencha Touch 2</title>
		<link>http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=how-to-create-a-mobile-flickr-app-with-sencha-touch-2</link>
		<comments>http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/#comments</comments>
		<pubDate>Wed, 16 May 2012 05:56:18 +0000</pubDate>
		<dc:creator>Bruno Tavares</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Sencha Touch]]></category>

		<guid isPermaLink="false">http://extdesenv.com/?p=369</guid>
		<description><![CDATA[The best way for developers to learn new technology is definitely coding. For learning the new changes introduced with Touch 2, I created this little app that I called Touchr. It features some common components and basic filtering interaction, but &#8230; <a href="http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<div id="attachment_465" class="wp-caption aligncenter" style="width: 209px"><a href="http://extdesenv.com/wp-content/uploads/2012/05/touchr-sencha-app.png" rel="lightbox[369]" title="touchr-sencha-app"><img src="http://extdesenv.com/wp-content/uploads/2012/05/touchr-sencha-app-199x300.png" alt="" title="touchr-sencha-app" width="199" height="300" class="size-medium wp-image-465" /></a><p class="wp-caption-text">Touchr App</p></div>
<p>The best way for developers to learn new technology is definitely coding. For learning the new changes introduced with Touch 2, I created this little app that I called Touchr. It features some common  components and basic filtering interaction, but also a customized proxy with YQL integration to consume Flickr. Check the list:</p>
<ul>
<li>MVC architecture</li>
<li>Customized JSONP proxy that consumes YQL queries</li>
<li>Use of sencha.io service to resize images, optimizing for mobile screens.</li>
<li>Use of controller listeners to filter data stores</li>
<li>Use of TabPanel, DataView, Buttons, Toolbar, TextField</li>
<li>Use of custom theme to define new color, new icons and css optimizations</li>
</ul>
<p>In this post I&#8217;ll share some details so you can also exercise some Touch skills as well!<br />
<span id="more-369"></span></p>
<h1>Grab it!</h1>
<p>The code is available on <a href="https://github.com/brunotavares/Touchr" title="Bruno Tavares' Touchr project">github.com/brunotavares/Touchr</a>. I&#8217;m always trying to improve it and keep it up to date. The last major one was for Touch 2.1, using the new SDK with the microloader.<br />
<iframe class="live-example" width="100%" style="max-width:500px;" height="480" src="http://brunotavares.github.com/Touchr/build/production/"></iframe>
<small class="live-example-disclaimer">*Touch compatibility webkit only</small></p>
<h1>Starting the project</h1>
<pre>$ sencha app create TR ~/Code/Touchr</pre>
<p>Really simple task with the new Touch SDK. This will create all project scaffold, already activating the dynamic loading and the microloader. Check <a href="http://extdesenv.com/?p=350">&#8220;Quick Touch 2 scaffolding example&#8221;</a> if you have any questions.</p>
<h1>Views</h1>
<p>The root component for this app will be a TabPanel, and from there we&#8217;ll create 3 different lists: Feature Photos, Search Photos, and Photos from User. I decided to separate those in different views, and reference them on the tabpanel using xtype.</p>
<script src="http://gist-it.appspot.com/github/brunotavares/Touchr/raw/master/app/view/Main.js"></script>
<p>All the 3 lists will look similar. I picked the User list to expand the code. Please take a look on other 2 lists views from the repository. </p>
<p>Notice that it&#8217;s a list, but it extends Ext.dataview.DataView, and not Ext.dataview.List. Since I don&#8217;t need features like row selection, grouping, and index bar, the dataview is a lighter and better option. The same line of thought is valid when choosing simple Containers other than full Panels. Always analyse carefully when picking up components.</p>
<p>Also notice that for the <i>itemTpl</i> config I&#8217;m using the <a href="http://docs.sencha.com/io/1-0/#!/guide/src" title="Sencha Src, mobile images optimization">src.sencha.io service</a>. It&#8217;s a great utility that delivers  images according to the device screen size. It makes your app faster, since you don&#8217;t need to serve 1000&#215;600 pictures for a 480&#215;320 device.<br />
<script src="http://gist-it.appspot.com/github/brunotavares/Touchr/raw/master/app/view/user/List.js"></script></p>
<h1>Models and DataStores</h1>
<p>The list above will only display data if it&#8217;s tied to a datastore. In this case is the <i>UserPhotos</i> store. And this store is tied to the <i>Photo</i> model, which defines its fields.</p>
<p>Taking a close look at this store, it&#8217;s clear that it&#8217;s linked to <i>TR.model.Photo</i>. It&#8217;s also using <i>remoteFilter</i>, which allows the custom Flickr proxy to pass parameters to Yahoo YQL API (more to come). The proxy is the one responsible for fetching data, and it has a JSON reader attached for parsing.</p>
<p>This store features a not so conventional <i>rootProperty</i>. It&#8217;s a nested one, since the YQL API response is formatted in this way.<br />
<script src="http://gist-it.appspot.com/github/brunotavares/Touchr/raw/master/app/store/UserPhotos.js"></script></p>
<p>The <i>Photo</i> model is pretty straightforward. The only different thing here is the <i>photo_url</i> field, which is not an information delivered by the server-side. It&#8217;s a custom local property that I defined, so I could have a better model design. Since mobile apps often deal with third part APIs, and those are not always properly designed for our app, we have the chance to normalize it.<br />
<script src="http://gist-it.appspot.com/github/brunotavares/Touchr/raw/master/app/model/Photo.js"></script></p>
<h1>Controllers</h1>
<p>At this point we already have views displaying data, so now we&#8217;re adding some interaction. Let&#8217;s take a look on the search tab, which has a <i>searchfield</i> on the top that will filter our list. We need to create a controller that will look into the component tree for our <i>searchfield</i>, associate a listener to it, and then filter the list&#8217;s store.</p>
<p>The way controllers associate listeners to components is by the <i>control</i> config. This object receives key:values pairs, where the key is a string representing a <a href="http://docs.sencha.com/touch/2-0/#!/api/Ext.ComponentQuery" title="Docs for ComponentQuery Class">ComponentQuery String</a>, and the value is another object, containing the name of the event as key, and the value as a function string reference.</p>
<p>To filter the list I don&#8217;t actually go trough its methods trying to find a way to accomplish the task. All the data is defined on the datastores and models. They serve as a data layer, and every data operations as adding, removing, updating or filtering itens is done by the datastore.<br />
<script src="http://gist-it.appspot.com/github/brunotavares/Touchr/raw/master/app/controller/Search.js"></script></p>
<h1>Other parts&#8230;</h1>
<p>I&#8217;m still missing the custom Flickr Proxy, designed to consume YQL Service via JSONP, and the theming structure. I&#8217;ll let those to a separate article.</p>
<p>On this post we saw how to start the project, and go trough the MVC pattern, defining views, then the data layer with models and stores, and last adding interaction via controllers.</p>
<p>I&#8217;m looking forward to do more tutorials like these. If you like it, don&#8217;t forget to share and support our growth!</p>
<p><a class="a2a_button_facebook_like addtoany_special_service" data-href="http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/"></a><a class="a2a_button_twitter_tweet addtoany_special_service" data-count="none" data-url="http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/" data-text="How to create a mobile Flickr app with Sencha Touch 2"></a><a class="a2a_button_google_plus_share addtoany_special_service" data-annotation="none" data-href="http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/"></a><a class="a2a_button_linkedin" href="http://www.addtoany.com/add_to/linkedin?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;linkname=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" title="LinkedIn" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/linkedin.png" width="16" height="16" alt="LinkedIn"/></a><a class="a2a_button_delicious" href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;linkname=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" title="Delicious" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a><a class="a2a_button_pinterest" href="http://www.addtoany.com/add_to/pinterest?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;linkname=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" title="Pinterest" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/pinterest.png" width="16" height="16" alt="Pinterest"/></a><a class="a2a_button_tumblr" href="http://www.addtoany.com/add_to/tumblr?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;linkname=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" title="Tumblr" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/tumblr.png" width="16" height="16" alt="Tumblr"/></a><a class="a2a_button_email" href="http://www.addtoany.com/add_to/email?linkurl=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;linkname=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" title="Email" rel="nofollow" target="_blank"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/icons/email.png" width="16" height="16" alt="Email"/></a><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fextdesenv.com%2Ftutorials%2Fhow-to-create-a-mobile-flickr-app-with-sencha-touch-2%2F&amp;title=How%20to%20create%20a%20mobile%20Flickr%20app%20with%20Sencha%20Touch%202" id="wpa2a_40"><img src="http://extdesenv.com/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://extdesenv.com/tutorials/how-to-create-a-mobile-flickr-app-with-sencha-touch-2/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
