SlideShare uma empresa Scribd logo
1 de 37
Intro to Sencha Touch
Lichtsoft – October 29th 2011
HTML 5 in Mobile Web
Why?

Rich & more interactive experience for mobile
 devices
Known Mobile Web (HTML 5)
Frameworks
Frameworks
Frameworks
Frameworks
Starting
1. Download Sencha Touch SDK
  http://www.sencha.com/products/touch/download

2. Start Web Server
3. Web Browser
  ▫ Safari
  ▫ Chrome
Starting
4. Unzip SDK
Starting
5. Test on Device
Starting
Starting
• open the httpd-xampp.conf file, probably in
  C:xamppapacheconfextra find:
<LocationMatch
"^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server-
status|server-info))">
  Order deny,allow
  Deny from all
  Allow from 127.0.0.0/8
  ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var
</LocationMatch>


• change to Allow from all
Create Your First Application
Creating Application
• Folder Structure
Creating Application
• Index.html
<!DOCTYPE html>
<html>
  <head>
     <title>Hello World</title>
     <script src="lib/touch/sencha-touch.js"
       type="text/javascript"></script>
     <script src="app/app.js" type="text/javascript">
     </script>
     <link href="lib/touch/resources/css/sencha-touch.css"
       rel="stylesheet" type="text/css" />
  </head>
  <body></body>
</html>
Creating Application
   • app.js

new Ext.Application({
   launch: function() {
      new Ext.Panel({
         fullscreen: true,
         dockedItems: [{xtype:'toolbar', title:'My First App'}],
         layout: 'fit',
         styleHtmlContent: true,
         html: '<h2>Hello World!</h2>I did it!'
      });
   }
});
Creating Application
Creating Application
List Component
Data Store
Ext.regModel('Contact', {
       fields: ['firstName', 'lastName']
});

ListDemo.ListStore = new Ext.data.Store({
  model: 'Contact',
  sorters: 'firstName',
  getGroupString: function(record) {
    return record.get('firstName')[0];
  },
  data: [
       {     firstName: "Azby", lastName: "Luthfan" },
       {     firstName: "Yosef", lastName: "Sukianto"},
       {     firstName: "Brian", lastName: "Al Bahr" },
       {     firstName: "Chandra", lastName: "Sutikno"} ,
  ],
});
Using the Data Store
ListDemo = new Ext.Application({
  name: "ListDemo",

 launch: function(){
   ListDemo.listPanel = new Ext.List({
     id: 'indexList',
     store: ListDemo.ListStore,
     itemTpl:
      '<div class="contact">{firstName}&nbsp;{lastName}</div>',
   });

      ListDemo.Viewport = new Ext.Panel({
         fullscreen: true,
         layout: 'fit',
         items: [ListDemo.listPanel],
      });
  }
});
List with Data Store
Grouping List
ListDemo.listPanel = new Ext.List({
  id: 'indexList',
  store: ListDemo.ListStore,
  itemTpl:
    '<div class="contact">{firstName}&nbsp;{lastName}</div>',
  grouped: true,
  indexBar: true,
});
Grouping List
Adding Detail Page
ListDemo.detailPanel = new Ext.Panel({
       id: 'detailPanel',
       tpl: 'Hello, {firstName}',
});

ListDemo.Viewport = new Ext.Panel({
       fullscreen: true,
       layout: 'card',
       items: [ListDemo.listPanel, ListDemo.detailPanel],
});
Adding Detail Page
ListDemo.listPanel = new Ext.List({
  id: 'indexList',
  store: ListDemo.ListStore,
  itemTpl:
     '<div class="contact">{firstName}&nbsp;{lastName}</div>',
  grouped: true,
  indexBar: true,

  onItemDisclosure: function(record){
     ListDemo.detailPanel.update(record.data);
     ListDemo.Viewport.setActiveItem('detailPanel');
  },
});
List with Detail Page
List with Detail Page
when detail button touched
Adding Toolbar
 ListDemo.detailToolbar = new Ext.Toolbar({
   items: [
   {
      text: 'back',
      ui: 'back',
      handler: function() {
        ListDemo.Viewport.setActiveItem('indexList');
   }]
 });


 ListDemo.detailPanel = new Ext.Panel({
   id: 'detailPanel',
   tpl: 'Hello, {firstName}',
   dockedItems: [ListDemo.detailToolbar],
 });
Toolbar
Mobile Web vs Mobile App
Mobile Web vs Mobile App
Pros:
• No need to develop in multiple platform
Mobile Web vs Mobile App
Cons:
• Mobile web can’t use device features like
  Accelerometer, Camera, Compass, etc
• Animations in mobile web are sometimes
  inconsistent
• Slower
Titanium Mobile
PhoneGap
PhoneGap
• Multi-platform
Thank You

Mais conteúdo relacionado

Mais procurados

Service intergration
Service intergration Service intergration
Service intergration 재민 장
 
Saving Data
Saving DataSaving Data
Saving DataSV.CO
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189Mahmoud Samir Fayed
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202Mahmoud Samir Fayed
 
Lecture8 php page control by okello erick
Lecture8 php page control by okello erickLecture8 php page control by okello erick
Lecture8 php page control by okello erickokelloerick
 
Do something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing appDo something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing appBruce McPherson
 
RSS Application Using Dom
RSS Application Using Dom  RSS Application Using Dom
RSS Application Using Dom abdullah roomi
 
Persistencia de datos con Parse
Persistencia de datos con ParsePersistencia de datos con Parse
Persistencia de datos con ParseAlfonso Alba
 
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkMooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkJose Luis Martínez
 
Exmaples of file handling
Exmaples of file handlingExmaples of file handling
Exmaples of file handlingsparkishpearl
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genMongoDB
 
XML and Web Services
XML and Web ServicesXML and Web Services
XML and Web ServicesHenry Osborne
 

Mais procurados (20)

Service intergration
Service intergration Service intergration
Service intergration
 
Saving Data
Saving DataSaving Data
Saving Data
 
The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189The Ring programming language version 1.6 book - Part 31 of 189
The Ring programming language version 1.6 book - Part 31 of 189
 
The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202The Ring programming language version 1.8 book - Part 34 of 202
The Ring programming language version 1.8 book - Part 34 of 202
 
Lecture8 php page control by okello erick
Lecture8 php page control by okello erickLecture8 php page control by okello erick
Lecture8 php page control by okello erick
 
Do something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing appDo something in 5 with gas 3-simple invoicing app
Do something in 5 with gas 3-simple invoicing app
 
Php Mysql
Php Mysql Php Mysql
Php Mysql
 
RSS Application Using Dom
RSS Application Using Dom  RSS Application Using Dom
RSS Application Using Dom
 
Persistencia de datos con Parse
Persistencia de datos con ParsePersistencia de datos con Parse
Persistencia de datos con Parse
 
Transformation jsontoxmlesb
Transformation jsontoxmlesbTransformation jsontoxmlesb
Transformation jsontoxmlesb
 
Php database connectivity
Php database connectivityPhp database connectivity
Php database connectivity
 
Transformation jsontoxmlesb
Transformation jsontoxmlesbTransformation jsontoxmlesb
Transformation jsontoxmlesb
 
Transformation jsontoxmlesb
Transformation jsontoxmlesbTransformation jsontoxmlesb
Transformation jsontoxmlesb
 
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talkMooseX::Datamodel - Barcelona Perl Workshop Lightning talk
MooseX::Datamodel - Barcelona Perl Workshop Lightning talk
 
PHP
PHP PHP
PHP
 
Exmaples of file handling
Exmaples of file handlingExmaples of file handling
Exmaples of file handling
 
Excelsheet
ExcelsheetExcelsheet
Excelsheet
 
Unfiltered Unveiled
Unfiltered UnveiledUnfiltered Unveiled
Unfiltered Unveiled
 
Introduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10genIntroduction to the new official C# Driver developed by 10gen
Introduction to the new official C# Driver developed by 10gen
 
XML and Web Services
XML and Web ServicesXML and Web Services
XML and Web Services
 

Destaque

4 kunci sukses bertransaksi emas revisi hitam putih
4 kunci sukses bertransaksi emas revisi hitam putih4 kunci sukses bertransaksi emas revisi hitam putih
4 kunci sukses bertransaksi emas revisi hitam putihChandra S Oemarjadi
 
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di Lamongan
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di LamonganDaya Beli Masyrakat Terhadap Produk Mie Sedaap di Lamongan
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di LamonganAbu Tholib
 
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?Ilan Kirschenbaum
 

Destaque (6)

4 kunci sukses bertransaksi emas revisi hitam putih
4 kunci sukses bertransaksi emas revisi hitam putih4 kunci sukses bertransaksi emas revisi hitam putih
4 kunci sukses bertransaksi emas revisi hitam putih
 
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di Lamongan
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di LamonganDaya Beli Masyrakat Terhadap Produk Mie Sedaap di Lamongan
Daya Beli Masyrakat Terhadap Produk Mie Sedaap di Lamongan
 
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?
אם אג׳ייל כזה כיף אז למה התור במשרד למשאבי אנוש?
 
Presentasi om gede
Presentasi om gedePresentasi om gede
Presentasi om gede
 
Agile and the evolution
Agile and the evolutionAgile and the evolution
Agile and the evolution
 
Agile at Scale
Agile at ScaleAgile at Scale
Agile at Scale
 

Semelhante a Intro to Building Mobile Web Apps with Sencha Touch

Building a Mobile App with Sencha Touch
Building a Mobile App with Sencha TouchBuilding a Mobile App with Sencha Touch
Building a Mobile App with Sencha TouchJames Pearce
 
A mobile web app for Android in 75 minutes
A mobile web app for Android in 75 minutesA mobile web app for Android in 75 minutes
A mobile web app for Android in 75 minutesJames Pearce
 
Local SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLocal SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLaurence Svekis ✔
 
Create a mobile web app with Sencha Touch
Create a mobile web app with Sencha TouchCreate a mobile web app with Sencha Touch
Create a mobile web app with Sencha TouchJames Pearce
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIEyal Vardi
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Tsuyoshi Yamamoto
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universitylhkslkdh89009
 
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than WebHeiko Behrens
 
RIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSRIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSDominik Jungowski
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonPyCon Italia
 
14922 java script built (1)
14922 java script built (1)14922 java script built (1)
14922 java script built (1)dineshrana201992
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF Luc Bors
 
Developing application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDDeveloping application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDMichele Capra
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMichael Dawson
 
Sencha Touch - Introduction
Sencha Touch - IntroductionSencha Touch - Introduction
Sencha Touch - IntroductionABC-GROEP.BE
 

Semelhante a Intro to Building Mobile Web Apps with Sencha Touch (20)

Building a Mobile App with Sencha Touch
Building a Mobile App with Sencha TouchBuilding a Mobile App with Sencha Touch
Building a Mobile App with Sencha Touch
 
A mobile web app for Android in 75 minutes
A mobile web app for Android in 75 minutesA mobile web app for Android in 75 minutes
A mobile web app for Android in 75 minutes
 
Local SQLite Database with Node for beginners
Local SQLite Database with Node for beginnersLocal SQLite Database with Node for beginners
Local SQLite Database with Node for beginners
 
Create a mobile web app with Sencha Touch
Create a mobile web app with Sencha TouchCreate a mobile web app with Sencha Touch
Create a mobile web app with Sencha Touch
 
Ajax - a quick introduction
Ajax - a quick introductionAjax - a quick introduction
Ajax - a quick introduction
 
The Full Power of ASP.NET Web API
The Full Power of ASP.NET Web APIThe Full Power of ASP.NET Web API
The Full Power of ASP.NET Web API
 
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
Grails 1.2 探検隊 -新たな聖杯をもとめて・・・-
 
Cis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry universityCis407 a ilab 4 web application development devry university
Cis407 a ilab 4 web application development devry university
 
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Webbeyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
beyond tellerrand: Mobile Apps with JavaScript – There's More Than Web
 
Vaadin7
Vaadin7Vaadin7
Vaadin7
 
RIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JSRIA - Entwicklung mit Ext JS
RIA - Entwicklung mit Ext JS
 
OpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con PythonOpenERP e l'arte della gestione aziendale con Python
OpenERP e l'arte della gestione aziendale con Python
 
How te bring common UI patterns to ADF
How te bring common UI patterns to ADFHow te bring common UI patterns to ADF
How te bring common UI patterns to ADF
 
14922 java script built (1)
14922 java script built (1)14922 java script built (1)
14922 java script built (1)
 
How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF How to Bring Common UI Patterns to ADF
How to Bring Common UI Patterns to ADF
 
Developing application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDDDeveloping application for Windows Phone 7 in TDD
Developing application for Windows Phone 7 in TDD
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Micro app-framework - NodeLive Boston
Micro app-framework - NodeLive BostonMicro app-framework - NodeLive Boston
Micro app-framework - NodeLive Boston
 
Micro app-framework
Micro app-frameworkMicro app-framework
Micro app-framework
 
Sencha Touch - Introduction
Sencha Touch - IntroductionSencha Touch - Introduction
Sencha Touch - Introduction
 

Último

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxLoriGlavin3
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 

Último (20)

Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptxA Deep Dive on Passkeys: FIDO Paris Seminar.pptx
A Deep Dive on Passkeys: FIDO Paris Seminar.pptx
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 

Intro to Building Mobile Web Apps with Sencha Touch

  • 1. Intro to Sencha Touch Lichtsoft – October 29th 2011
  • 2. HTML 5 in Mobile Web Why? Rich & more interactive experience for mobile devices
  • 3. Known Mobile Web (HTML 5) Frameworks
  • 7.
  • 8. Starting 1. Download Sencha Touch SDK http://www.sencha.com/products/touch/download 2. Start Web Server 3. Web Browser ▫ Safari ▫ Chrome
  • 12. Starting • open the httpd-xampp.conf file, probably in C:xamppapacheconfextra find: <LocationMatch "^/(?i:(?:xampp|security|licenses|phpmyadmin|webalizer|server- status|server-info))"> Order deny,allow Deny from all Allow from 127.0.0.0/8 ErrorDocument 403 /error/HTTP_XAMPP_FORBIDDEN.html.var </LocationMatch> • change to Allow from all
  • 13. Create Your First Application
  • 15. Creating Application • Index.html <!DOCTYPE html> <html> <head> <title>Hello World</title> <script src="lib/touch/sencha-touch.js" type="text/javascript"></script> <script src="app/app.js" type="text/javascript"> </script> <link href="lib/touch/resources/css/sencha-touch.css" rel="stylesheet" type="text/css" /> </head> <body></body> </html>
  • 16. Creating Application • app.js new Ext.Application({ launch: function() { new Ext.Panel({ fullscreen: true, dockedItems: [{xtype:'toolbar', title:'My First App'}], layout: 'fit', styleHtmlContent: true, html: '<h2>Hello World!</h2>I did it!' }); } });
  • 20. Data Store Ext.regModel('Contact', { fields: ['firstName', 'lastName'] }); ListDemo.ListStore = new Ext.data.Store({ model: 'Contact', sorters: 'firstName', getGroupString: function(record) { return record.get('firstName')[0]; }, data: [ { firstName: "Azby", lastName: "Luthfan" }, { firstName: "Yosef", lastName: "Sukianto"}, { firstName: "Brian", lastName: "Al Bahr" }, { firstName: "Chandra", lastName: "Sutikno"} , ], });
  • 21. Using the Data Store ListDemo = new Ext.Application({ name: "ListDemo", launch: function(){ ListDemo.listPanel = new Ext.List({ id: 'indexList', store: ListDemo.ListStore, itemTpl: '<div class="contact">{firstName}&nbsp;{lastName}</div>', }); ListDemo.Viewport = new Ext.Panel({ fullscreen: true, layout: 'fit', items: [ListDemo.listPanel], }); } });
  • 22. List with Data Store
  • 23. Grouping List ListDemo.listPanel = new Ext.List({ id: 'indexList', store: ListDemo.ListStore, itemTpl: '<div class="contact">{firstName}&nbsp;{lastName}</div>', grouped: true, indexBar: true, });
  • 25. Adding Detail Page ListDemo.detailPanel = new Ext.Panel({ id: 'detailPanel', tpl: 'Hello, {firstName}', }); ListDemo.Viewport = new Ext.Panel({ fullscreen: true, layout: 'card', items: [ListDemo.listPanel, ListDemo.detailPanel], });
  • 26. Adding Detail Page ListDemo.listPanel = new Ext.List({ id: 'indexList', store: ListDemo.ListStore, itemTpl: '<div class="contact">{firstName}&nbsp;{lastName}</div>', grouped: true, indexBar: true, onItemDisclosure: function(record){ ListDemo.detailPanel.update(record.data); ListDemo.Viewport.setActiveItem('detailPanel'); }, });
  • 28. List with Detail Page when detail button touched
  • 29. Adding Toolbar ListDemo.detailToolbar = new Ext.Toolbar({ items: [ { text: 'back', ui: 'back', handler: function() { ListDemo.Viewport.setActiveItem('indexList'); }] }); ListDemo.detailPanel = new Ext.Panel({ id: 'detailPanel', tpl: 'Hello, {firstName}', dockedItems: [ListDemo.detailToolbar], });
  • 31. Mobile Web vs Mobile App
  • 32. Mobile Web vs Mobile App Pros: • No need to develop in multiple platform
  • 33. Mobile Web vs Mobile App Cons: • Mobile web can’t use device features like Accelerometer, Camera, Compass, etc • Animations in mobile web are sometimes inconsistent • Slower

Notas do Editor

  1. jQTouch is easy to use and relatively well-documented. It’s featured in the excellent Building iPhone Apps with HTML, CSS, and JavaScript. jQTouch takes a progressive-enhancement approach, building an iPhone-like experience on top of your appropriately-constructed HTML. It’s simple, providing a basic set of widgets and animations and just enough programmatic control to permit more dynamic behavior.But even in my simple test app there were performance issues. Page transitions can be jumpy or missing, and there are periodic delays in responding to tap events. And while the project is technically active, the original author has moved on and development seems to have slowed.jQTouch is available under the permissive MIT License, one of my favorite open source licenses.
  2. jQuery Mobile is the new kid on the block. Announced in August 2010, it’s quickly progressed to a very functional Alpha 2. It takes a similar – but more standards-compliant – approach to jQTouch and feels very much like that framework’s successor, with a broader array of UI controls and styles.jQuery Mobile’s performance is variable (though better than that of jQTouch), particularly in responding to tap events rendering animations. It also lacks a small number of key programmatic hooks that would permit easy creation of more dynamic apps. For instance, there’s an event that triggers when a page is about to load (i.e. slide into view) but no way to tell the associated handler code what UI element resulted in the page switch, or to pass additional information to that handler. I was able to create workarounds but hope that future versions will take a cue from jQTouch and build out this functionality a little more.jQuery Mobile’s documentation is a little scattered but improving; I’m hopeful that it will become as robust as that of the core jQuery library. (Note that jQuery Mobile is really a mobile counterpart for jQuery UI, not for jQuery itself, on which it builds.)jQuery Mobile is available under either the MIT or the GPL2 license.
  3. Sencha Touch is the mobile counterpart to the Ext JS framework. Its approach differs significantly from jQTouch and jQuery Mobile: instead of enhancing preexisting HTML, it generates its own DOM based on objects created in JavaScript. As such, working with Sencha feels a little less “webby” and a little more like building apps in other technologies like Java or Flex. (It’s also a bit more like YUI than like jQuery.) I personally prefer the progressive enhancement approach, but it really is a matter of preference.Sencha is far more extensive than its competitors, with a vast array of UI components, explicit iPad support, storage and data binding facilities using JSON and HTML5 offline storage, and more. (It’s very cool to manipulate app data in one of Sencha’s data structures and watch the corresponding list update in real time.) It’s also the only Web framework I’ve seen with built-in support for objects that stay put (like a toolbar) while others scroll (like a list).For all that apparent extra weight, Sencha performed noticeably better and more reliably than either jQTouch or jQuery Mobile in my tests, with the exception of initial load time.When working with a library or framework, it’s usually counterproductive to “fight the framework” and do things your own way. Given how extensive Sencha Touch is, that means your app will probably end up doing just about everything the Sencha way. I’d originally used WebKit’s built-in SQLite database for offline storage but ultimately eliminated both complexity and bugs by moving that functionality into Sencha’s data stores.The documentation, while extensive, has odd holes. Between those and the sheer size of the framework, I spent a lot of time fighting bugs that were difficult to trace and to understand. Responses to my questions in the developer forums were more frequent and helpful than with the other frameworks, but still ultimately insufficient. Sencha provides paid support starting at $300/year; I strongly considered purchasing it but oddly, their response to my sales support inquiries was incredibly underwhelming given my interest in sending them money.Sencha Touch is available under the GPL3; under a somewhat confusing set of exceptions to the GPL that seem similar to the LGPL; or under a free commercial license.
  4. Much like Sencha Touch, Appcelerator’sTitanium Mobile allows you to write apps using a JavaScript API. But unlike Sencha, it compiles most of your code into a native iPhone or Android app. That means it isn’t really a Web framework, but a compatibility layer or compiler. (Note that its cousin Titanium Desktopis Web-based, allowing you to write HTML/JS applications that run inside a native wrapper on the desktop.)So Titanium allows Web developers to produce high-performance, easily skinnable native apps using JavaScript and a little XML, i.e. without learning Objective-C or Cocoa Touch. My simple test app blew away the true Web frameworks in terms of performance, and wasn’t much harder to put together.But that advantage is also its greatest disadvantage: you can only target the platforms Titanium supports, and you’re tied to their developer tools. As if to prove this point, my test app quickly got into a state where it wouldn’t launch on the iPhone. Titanium doesn’t include much of a debugger; Titanium projects can’t be run and debugged in XCode; and it ran fine in the simulator, leaving me with no real way to attack the problem.