SlideShare une entreprise Scribd logo
1  sur  43
Sencha Touch Intro Web Based Native(ish) Apps
 
 
 
Setup Viewport Data View
Setup
Download The SDK ,[object Object],[object Object],[object Object]
Create Base HTML ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Include CSS & JS ,[object Object],[object Object]
Setup The Aplication ,[object Object],[object Object]
Setup The Aplication ,[object Object],[object Object]
Setup The Aplication ,[object Object],[object Object]
320x460
http://tinyurl.com/iosicon 57x57
Setup The Aplication ,[object Object],[object Object]
Viewport
Create The Viewport ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Create The Viewport ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Create The Viewport ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Create The Viewport ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Docked Items ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Buttons ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 
Button UI ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Standard Button UI's Color Variations confirm                                         decline
Data
Data Store Model Reader Proxy Source
Model ,[object Object],[object Object],[object Object]
Model ,[object Object],[object Object],[object Object]
Model ,[object Object],[object Object],[object Object]
Store ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Store ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Store ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
View
The List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
The List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
Templates ,[object Object]
The List ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]
 

Contenu connexe

Tendances

JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery PresentationSony Jain
 
Debugging Your Ext JS Code
Debugging Your Ext JS CodeDebugging Your Ext JS Code
Debugging Your Ext JS CodeSencha
 
My first word press plugin
My first word press pluginMy first word press plugin
My first word press pluginDonghyeok Kang
 
Functional Structures in PHP
Functional Structures in PHPFunctional Structures in PHP
Functional Structures in PHPMarcello Duarte
 
Testing your javascript code with jasmine
Testing your javascript code with jasmineTesting your javascript code with jasmine
Testing your javascript code with jasmineRubyc Slides
 
10 Catalyst Tips
10 Catalyst Tips10 Catalyst Tips
10 Catalyst TipsJay Shirley
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developersLuiz Messias
 
for this particular program how do i create the input innotepad 1st ?#include...
for this particular program how do i create the input innotepad 1st ?#include...for this particular program how do i create the input innotepad 1st ?#include...
for this particular program how do i create the input innotepad 1st ?#include...hwbloom14
 
Building Robust jQuery Plugins
Building Robust jQuery PluginsBuilding Robust jQuery Plugins
Building Robust jQuery PluginsJörn Zaefferer
 
C++ Programming - 9th Study
C++ Programming - 9th StudyC++ Programming - 9th Study
C++ Programming - 9th StudyChris Ohk
 
for this particular program how do i create the input innotepad 1st ? #includ...
for this particular program how do i create the input innotepad 1st ? #includ...for this particular program how do i create the input innotepad 1st ? #includ...
for this particular program how do i create the input innotepad 1st ? #includ...hwbloom59
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundleth0masr
 
How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014Guillaume POTIER
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)brian d foy
 
Intro programacion funcional
Intro programacion funcionalIntro programacion funcional
Intro programacion funcionalNSCoder Mexico
 
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)탑크리에듀(구로디지털단지역3번출구 2분거리)
 
Wordpress plugin development from Scratch
Wordpress plugin development from ScratchWordpress plugin development from Scratch
Wordpress plugin development from ScratchOcaka Alfred
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5Corey Ballou
 
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsZen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsJay Shirley
 

Tendances (20)

JQuery Presentation
JQuery PresentationJQuery Presentation
JQuery Presentation
 
Debugging Your Ext JS Code
Debugging Your Ext JS CodeDebugging Your Ext JS Code
Debugging Your Ext JS Code
 
My first word press plugin
My first word press pluginMy first word press plugin
My first word press plugin
 
Functional Structures in PHP
Functional Structures in PHPFunctional Structures in PHP
Functional Structures in PHP
 
Testing your javascript code with jasmine
Testing your javascript code with jasmineTesting your javascript code with jasmine
Testing your javascript code with jasmine
 
10 Catalyst Tips
10 Catalyst Tips10 Catalyst Tips
10 Catalyst Tips
 
Phoenix for laravel developers
Phoenix for laravel developersPhoenix for laravel developers
Phoenix for laravel developers
 
for this particular program how do i create the input innotepad 1st ?#include...
for this particular program how do i create the input innotepad 1st ?#include...for this particular program how do i create the input innotepad 1st ?#include...
for this particular program how do i create the input innotepad 1st ?#include...
 
Building Robust jQuery Plugins
Building Robust jQuery PluginsBuilding Robust jQuery Plugins
Building Robust jQuery Plugins
 
C++ Programming - 9th Study
C++ Programming - 9th StudyC++ Programming - 9th Study
C++ Programming - 9th Study
 
for this particular program how do i create the input innotepad 1st ? #includ...
for this particular program how do i create the input innotepad 1st ? #includ...for this particular program how do i create the input innotepad 1st ? #includ...
for this particular program how do i create the input innotepad 1st ? #includ...
 
QA for PHP projects
QA for PHP projectsQA for PHP projects
QA for PHP projects
 
sfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin BundlesfDay Cologne - Sonata Admin Bundle
sfDay Cologne - Sonata Admin Bundle
 
How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014How to test complex SaaS applications - The family july 2014
How to test complex SaaS applications - The family july 2014
 
Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)Learning Perl 6 (NPW 2007)
Learning Perl 6 (NPW 2007)
 
Intro programacion funcional
Intro programacion funcionalIntro programacion funcional
Intro programacion funcional
 
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
(국비지원학원/재직자교육/실업자교육/IT실무교육_탑크리에듀)#4.스프링프레임워크 & 마이바티스 (Spring Framework, MyBatis)
 
Wordpress plugin development from Scratch
Wordpress plugin development from ScratchWordpress plugin development from Scratch
Wordpress plugin development from Scratch
 
What's New in PHP 5.5
What's New in PHP 5.5What's New in PHP 5.5
What's New in PHP 5.5
 
Zen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst ApplicationsZen: Building Maintainable Catalyst Applications
Zen: Building Maintainable Catalyst Applications
 

Similaire à Sencha Touch Intro

Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2borkweb
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateKiev ALT.NET
 
Mongokit presentation mongofr-2010
Mongokit presentation mongofr-2010Mongokit presentation mongofr-2010
Mongokit presentation mongofr-2010namlook
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To LampAmzad Hossain
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and DashboardsAtlassian
 
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQueryDoncho Minkov
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?brynary
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLseleciii44
 
Zend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j queryZend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j queryTricode (part of Dept)
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised contentMichael Peacock
 
Struts2
Struts2Struts2
Struts2yuvalb
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentationguest5d87aa6
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaJeff Richards
 

Similaire à Sencha Touch Intro (20)

JQuery Basics
JQuery BasicsJQuery Basics
JQuery Basics
 
Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2Javascript: Ajax & DOM Manipulation v1.2
Javascript: Ajax & DOM Manipulation v1.2
 
Micro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicateMicro-ORM Introduction - Don't overcomplicate
Micro-ORM Introduction - Don't overcomplicate
 
Mongokit presentation mongofr-2010
Mongokit presentation mongofr-2010Mongokit presentation mongofr-2010
Mongokit presentation mongofr-2010
 
Introduction To Lamp
Introduction To LampIntroduction To Lamp
Introduction To Lamp
 
Intro Open Social and Dashboards
Intro Open Social and DashboardsIntro Open Social and Dashboards
Intro Open Social and Dashboards
 
External Data Access with jQuery
External Data Access with jQueryExternal Data Access with jQuery
External Data Access with jQuery
 
What's new in Rails 2?
What's new in Rails 2?What's new in Rails 2?
What's new in Rails 2?
 
Introduction to JQuery
Introduction to JQueryIntroduction to JQuery
Introduction to JQuery
 
JSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTLJSP Standart Tag Lİbrary - JSTL
JSP Standart Tag Lİbrary - JSTL
 
Zend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j queryZend framework 05 - ajax, json and j query
Zend framework 05 - ajax, json and j query
 
Abstracting functionality with centralised content
Abstracting functionality with centralised contentAbstracting functionality with centralised content
Abstracting functionality with centralised content
 
What's New in ZF 1.10
What's New in ZF 1.10What's New in ZF 1.10
What's New in ZF 1.10
 
Struts2
Struts2Struts2
Struts2
 
Jquery 1
Jquery 1Jquery 1
Jquery 1
 
Jquery presentation
Jquery presentationJquery presentation
Jquery presentation
 
Django
DjangoDjango
Django
 
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp VictoriaWidgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
Widgets: Making Your Site Great and Letting Others Help - WordCamp Victoria
 
ASP_NET Features
ASP_NET FeaturesASP_NET Features
ASP_NET Features
 
Wp meetup custom post types
Wp meetup custom post typesWp meetup custom post types
Wp meetup custom post types
 

Sencha Touch Intro

Notes de l'éditeur

  1. Im going to give an introduction to sencha touch, which is a web based javascript library that can be used to create native looking apps. I say native looking, or native(ish) because the apps really end up looking and interacting like a native app. The UI elements such as buttons, lists, toolbars, all look very similar to their native counterparts on the iphone. The interactions work the same as well, such as momentum scrolling, swiping and pinching.
  2. So where did this library come from. The library came into existence from the company Ext hiring  David Kaneda, who developed jqTouch on his own.   The company formerly called Ext took their Ext JS library and combined the concepts used in it with the cutting edge mobile web development that David had done.
  3. The library they created reproduces the look and feel of native iOS apps, and has the JavaScript syntax and structure found in the Ext JS library with an MVC concept thrown in. Currently only Android and iOS devices are supported. BlackBerry 6's WebKit based browser should be supported in the next release of Sencha Touch and windows mobile should be down the road sometime. So this actually leaves us with a really easy way to develop our apps.
  4. It means that when we develop an app, we can test it in Chrome and Safari and we can be fairly sure it will work just fine when used in Android and iOS devices. The library has been developed with these WebKit based browsers in mind. I would also suggest testing your app in not just chrome or safarim, but both Chrome and Safari, because while they share the same rendering engines, they do not share the same javascript engines, and there are subtle differences between them. Both IE and Firefox will fail horribly at this point. Don't bother. Support for IE or Windows Mobile should be available in the near future, though firefox support is not likely to ever happen, since there is no mobile device that has been made in the last two years that runs firefox. I just threw Opera in here because I felt bad for it. Lets move on to actually creating a simple app.
  5. I like to split up this process into four main steps. We first setup the app, these are things that are related to the initial configuration of our app. The viewport is the main UI component of our app, which may contain a toolbar, or tabs, or whatever is the main navigation method of our app. Data is somethinge we of course need, apps aren't much fun without data. Even angry birds needs data. Finally the view, which is how we display our data, or otherwise interact with specific parts of the app. We can of course have many views, but for this demo we will just have one. Once we get all of these things in place, we should have a working app.
  6. Lets start on the setup
  7. First thing we need is the SDK download, so grab that from the Sencha web site. Note that it is a free library, and you do not need to put your email address in to download it. To develop the basic app, all we need is the default CSS and JS they provide in the SDK download. Throw these into your project folder.
  8. Next we need a simple HTML page. Just the basics will do, as the Sencha Touch library will create all of the HTML elements it needs on its own.
  9. Now we need to include the library stylesheet and javascript. These should both be in the head section of the HTML document. The debug versions of both the CSS and JavaScript are used for developing, which contain uncompressed content along with some console messages about improper usage and API changes. Directly after these includes were going to add a script block with the code to setup our Sencha Touch app. This could also be in the form of another javascript include but for the sake of this demo, ill just use a script block.
  10. Were done with HTML now. That is all the html we will ever need to write for a Sencha Touch app, from now on, it's pure JavaScript. Here is a typical application setup. The application setup does a couple of things for us.
  11. First off, it sets up a name for our application. This will setup namespaces for views stores, models and controllers based on our app name.    We will use these namespaces later on when we setup our store and model. Since this app is so simple, im not going to take advantage of the view or controller namespaces it creates.
  12. *used when in standalone mode, which is when you add a web app to your home screen. webclip.   Next, it sets up the startup screen which is shown while the page is loading in standalone mode. The icon is also used for standalone mode. There are also options for tabletStartupScreen and tabletIcon <link rel="apple-touch-startup-image" href="/startup.png">
  13. The startup image for the phone should be 320 x 460 and must be in PNG format. The icon image for phones should be 57x57, however I like to use 114x114 because that is what the retina display uses, and standard displays will scale this down anyway. More details about all of the sizing requirements can be found in apples documentation, which is quite good, though hard to navigate. apple-touch-icon apple-touch-icon-precomposed (glossOnIcon === false)
  14. The icon image for phones should be 57x57, however I like to use 114x114 because that is what the retina display uses, and standard displays will scale this down anyway. More details about all of the sizing requirements can be found in apples documentation, which is quite good, though hard to navigate. apple-touch-icon apple-touch-icon-precomposed (glossOnIcon === false)
  15. The final part of this setup is the launch function to execute when the browser is ready. This is where we will create our UI. It could be compared to the onload event in html, or if your use to Ext JS, the onReady function.   Lets dive into the UI setup now by stubbing out this launch function and creating the viewport. 
  16. step 2 - creating the viewport.
  17. *Ext namespace - panel   So I create a Panel, and set it to fullscreen true. Let's take a look at this in a browser now.
  18. *Ext namespace - panel   So I create a Panel, and set it to fullscreen true. Let's take a look at this in a browser now.
  19. *Ext namespace - panel   So I create a Panel, and set it to fullscreen true. Let's take a look at this in a browser now.
  20. *Ext namespace - panel   So I create a Panel, and set it to fullscreen true. Let's take a look at this in a browser now.
  21. Wow, it's a grey screen. What we are not seeing here is that this panel we created has fit itself into the size of the window and can now manage UI elements to fit within that viewable area, resizing them appropriately if the orientation changes. Then next step is to give it something to manage. Like a toolbar maybe.
  22. A docked item can be docked to any side of the screen and will stick there when the user is scrolling the page, along with moving position when the orientation changes. We can add the docked item to the main viewport screen as we have done here, and it will persist between section changes, or we can create a unique docked item for each section. The former method that we are using here is the more resource efficent. Let's see what this looks like now.
  23. There is our docked item, the toolbar with a title. as long as were here, lets go ahead and add a button.
  24. *items = children   We do this by adding an item to the items array of the toolbar.  We don't need to specify that its a button were adding, because the toolbar default to using buttons. Lets take a look at what this looks like.   Don't ask about UI right now.
  25. There we go, we have a back button. You might be wondering why it's a back button, instead of a regular looking button. This all comes down to the UI configuration.
  26. The button UI options are 'normal', 'back', 'round', 'action', 'forward' and 'small', with the default being 'normal'.
  27. The normal, round and small options also have a confirm and decline version, which are just green and red versions of the same buttons. Let's move on to getting our data loaded into the app. For this we will need three things.
  28. The model that defines what our data looks like, the store holds  data - along with a proxy - that will fetch our data.
  29. Creating the model is fairly straight forward, we just need to give our model a name and describe the fields that are contained within it.
  30. We give it a name of Statuses, since im going to pull in my timeline of statuses from Twitter.
  31. Then we define what our data looks like. Now that we have a model of our data in place, lets create a store.
  32. Our store is also fairly straight forward, particulairly if your use to using Ext JS. SInce we gave our app the BmoreJS name there is a namespace setup for stores which were going to use.
  33. We use the model we just created.
  34. and fetch the data with a script tag (which lets us do cross domain requests) from the Twitter API. Now that this is in place, we need a way to view the data.
  35. back in our viewport, we add a list that is tied to the store we just created.
  36. back in our viewport, we add a list that is tied to the store we just created.
  37. back in our viewport, we add a list that is tied to the store we just created.
  38. back in our viewport, we add a list that is tied to the store we just created.
  39. back in our viewport, we add a list that is tied to the store we just created.
  40. make overview slide showing whole process. place between each section.