Git Product home page Git Product logo

senchatouch2mvchelloworld's Introduction

== Simple Sencha Touch 2.0 MVC application scaffold. 

This is a simple application which lays out the Model, View, Controller and Stores within a Sencha Touch 2.0 application. I looked long and hard but found no examples. This one was based loosely on the ExtJS4.0 MVC examples available on Sencha's website. 
It also demonstrates Component Queries and some other new features in 2.0 such as automatic "getter" generation. 

Put Sencha Touch in a folder named /touch 
e.g. /touch/sencha-touch-all-debug-w-comments.js
     /touch/resources/css/*
	 
Run the sample in Chrome and open up the Console (Ctrl-Shift-i).

The example creates a carousel with 2 views (slide right for the 2nd card).
The first card has a couple of buttons that show how the Controller is wired up to events on the View. 
The first button shows how to wire an event in the controller to multiple items on the page. 
The 2nd button shows how to bind to just one item using the id and also how to reference another view instance using a component query and automatically generated getter. 

The 2nd card loads data from a store using Ajax so you'll need to host it on a web server to avoid an XHR exception.

This is based on the Sencha Touch 2.0 Developer Preview (may break) as of Oct 11, 2011

-fs
http://FrancisShanahan.com

senchatouch2mvchelloworld's People

Contributors

francisshanahan avatar a04152dtv avatar

Stargazers

GB avatar

Watchers

James Cloos avatar GB avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.