SlideShare a Scribd company logo
Desarrollo de Aplicaciones Cross-
Platform para Dispositivos Moviles
Building Cross-Platform Mobile Applications
M.S.C. Raquel Vásquez Ramírez
M.S.C. Cristian A. Rodríguez Enríquez
Contenido	
  
•  Manejo	
  de	
  Base	
  de	
  Datos	
  (Client	
  Side)	
  
•  Almacenamiento	
  Local	
  
– Permanente	
  
– Sesión	
  
– Usando	
  Base	
  de	
  Datos	
  
•  Conclusiones	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 02 of 15
HTML 5: Data Storage
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 03 of 15
HTML5 offers two types of data storage on the client:
•  Storage via a database containing the tables
described in SQL
•  Storage through localStorage and sessionStorage
objects, to store information made up of strings.
Permanent Storage and Session Storage
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 04 of 15
Para habilitar el “Storage” se utilizan dos objetos de
JavaScript:
•  localStorage: Permite el almacenamiento permanente
•  sessionStorage: Permite el almacenamiento en la sesión
Permanent Storage
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 05 of 15
localStorage.lname = “Sarrion”;
localStorage.fname = “Eric”;
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 06 of 15
Session Storage
sessionStorage.lname = “Sarrion”;
sessionStorage.fname = “Eric”;
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 07 of 15
Usando una Base de Datos
Como se puede observar el almacenamiento temporal y
permanente no provee las facilidades de las bases de datos
SQL.
Gracias a HTML 5 es posible usar bases de SQL de forma local.
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 08 of 15
Creando la Base de Datos
var	
  db	
  =	
  openDatabase	
  (“Test”,	
  “1.0”,	
  “Test”,	
  65535);	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 09 of 15
Transaction
db.transacKon	
  (funcKon	
  (transacKon)	
  	
  
{	
  
	
  	
  	
  	
  var	
  sql	
  =	
  SQL	
  query;	
  
	
  	
  	
  	
  transacKon.executeSql	
  (sql,	
  [parameters]	
  /	
  undefined,	
  	
  
	
  	
  	
  	
  funcKon	
  ()	
  
	
  	
  	
  	
  {	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  //	
  JavaScript	
  code	
  to	
  execute	
  if	
  the	
  query	
  was	
  successful	
  
	
  	
  	
  	
  },	
  	
  
	
  	
  	
  	
  funcKon	
  ()	
  
	
  	
  	
  	
  {	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  //	
  JavaScript	
  code	
  to	
  execute	
  if	
  the	
  query	
  failed	
  
	
  	
  	
  	
  }	
  );	
  
});	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 10 of 15
Usando la Base de Datos
•  Crear Base de Datos
•  Insertar
•  Listar (SELECT)
•  Eliminar Tabla
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 11 of 15
CREATE TABLE
db.transacKon	
  (funcKon	
  (transacKon)	
  	
  
	
  	
  {	
  
	
  	
  	
  	
  var	
  sql	
  =	
  "CREATE	
  TABLE	
  customers	
  "	
  +	
  
	
  	
  	
  	
  	
  	
  	
  	
  "	
  (id	
  INTEGER	
  NOT	
  NULL	
  PRIMARY	
  KEY	
  AUTOINCREMENT,	
  "	
  +	
  
	
  	
  	
  	
  	
  	
  	
  	
  "lname	
  VARCHAR(100)	
  NOT	
  NULL,	
  "	
  +	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  "fname	
  VARCHAR(100)	
  NOT	
  NULL)"	
  
	
  	
  	
  	
  transacKon.executeSql	
  (sql,	
  undefined,	
  funcKon	
  ()	
  
	
  	
  	
  	
  {	
  	
  
	
  	
  	
  	
  	
  	
  alert	
  ("Table	
  created");	
  
	
  	
  	
  	
  },	
  error);	
  
	
  	
  });	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 12 of 15
DROP TABLE
db.transacKon	
  (funcKon	
  (transacKon)	
  	
  
	
  	
  {	
  
	
  	
  	
  	
  var	
  sql	
  =	
  "DROP	
  TABLE	
  customers";	
  
	
  	
  	
  	
  transacKon.executeSql	
  (sql,	
  undefined,	
  ok,	
  error);	
  
	
  	
  }	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 13 of 15
INSERT INTO
db.transacKon	
  (funcKon	
  (transacKon)	
  	
  
	
  	
  {	
  
	
  	
  	
  	
  var	
  sql	
  =	
  "INSERT	
  INTO	
  customers	
  (lname,	
  fname)	
  VALUES	
  (?,	
  ?)";	
  
	
  	
  	
  	
  transacKon.executeSql	
  (sql,	
  [lname,	
  fname],	
  funcKon	
  ()	
  
	
  	
  	
  	
  {	
  	
  
	
  	
  	
  	
  	
  	
  alert	
  ("Customer	
  inserted");	
  
	
  	
  	
  	
  },	
  error);	
  
	
  	
  }	
  
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 14 of 15
Base de Datos Server Side (Elementos)
var	
  sql	
  =	
  "SELECT	
  *	
  FROM	
  customers";	
  
transacKon.executeSql	
  (sql,	
  undefined,…	
  	
  
Conclusiones	
  
•  jQuery provee los elementos necesarios para
desarrollar aplicaciones para dispositivos móviles
•  Desarrollo Ágil
•  Si se desea sincronizar datos con un servidor, se
requiere usar una base de datos local y sincronizar
cuando se disponga de conexión mediante una
consulta constante del estado de la conexión (Push?)
•  Optimización de Aplicaciones Web
Building Cross-Plaftform Mobile Applications – jQuery Mobile
Slide 15 of 15

More Related Content

Similar to 05 Building cross-platform mobile applications with jQuery Mobile / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles

Couchbase@live person meetup july 22nd
Couchbase@live person meetup   july 22ndCouchbase@live person meetup   july 22nd
Couchbase@live person meetup july 22nd
Ido Shilon
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
Alexandre Morgaut
 
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
Cristian Rodríguez Enríquez
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Red Hat Developers
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
Jonas Follesø
 
What 100M downloads taught us about iOS architectures
What 100M downloads taught us about iOS architecturesWhat 100M downloads taught us about iOS architectures
What 100M downloads taught us about iOS architectures
Francesco Di Lorenzo
 
[Codecamp 2016] Going functional with flyd and react
[Codecamp 2016] Going functional with flyd and react [Codecamp 2016] Going functional with flyd and react
[Codecamp 2016] Going functional with flyd and react
gcazaciuc
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic Forms
Willem Vermeer
 
Liferay Devcon Presentation on Dynamic Forms with Liferay Workflow
Liferay Devcon Presentation on Dynamic Forms with Liferay WorkflowLiferay Devcon Presentation on Dynamic Forms with Liferay Workflow
Liferay Devcon Presentation on Dynamic Forms with Liferay Workflow
Willem Vermeer
 
Sanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev Kumar Paul
 
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Patrik Suzzi
 
Js in quick books
Js in quick booksJs in quick books
Js in quick books
QuickBooks Online
 
Mobile for SharePoint with Windows Phone
Mobile for SharePoint with Windows PhoneMobile for SharePoint with Windows Phone
Mobile for SharePoint with Windows Phone
Edgewater
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and Redux
Glib Kechyn
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
영욱 김
 
Resume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_expResume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_expSandip Mohod
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce Lightning
Right IT Services
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
Anthony Chen
 

Similar to 05 Building cross-platform mobile applications with jQuery Mobile / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles (20)

handout-05b
handout-05bhandout-05b
handout-05b
 
Couchbase@live person meetup july 22nd
Couchbase@live person meetup   july 22ndCouchbase@live person meetup   july 22nd
Couchbase@live person meetup july 22nd
 
From Web App Model Design to Production with Wakanda
From Web App Model Design to Production with WakandaFrom Web App Model Design to Production with Wakanda
From Web App Model Design to Production with Wakanda
 
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
03 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
 
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
Full Stack Development With Node.Js And NoSQL (Nic Raboy & Arun Gupta)
 
Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008Silverlight 2 for Developers - TechEd New Zealand 2008
Silverlight 2 for Developers - TechEd New Zealand 2008
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
What 100M downloads taught us about iOS architectures
What 100M downloads taught us about iOS architecturesWhat 100M downloads taught us about iOS architectures
What 100M downloads taught us about iOS architectures
 
[Codecamp 2016] Going functional with flyd and react
[Codecamp 2016] Going functional with flyd and react [Codecamp 2016] Going functional with flyd and react
[Codecamp 2016] Going functional with flyd and react
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic Forms
 
Liferay Devcon Presentation on Dynamic Forms with Liferay Workflow
Liferay Devcon Presentation on Dynamic Forms with Liferay WorkflowLiferay Devcon Presentation on Dynamic Forms with Liferay Workflow
Liferay Devcon Presentation on Dynamic Forms with Liferay Workflow
 
Sanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-LatestSanjeev_Kumar_Paul- Resume-Latest
Sanjeev_Kumar_Paul- Resume-Latest
 
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
Rapid prototyping of eclipse rcp applications - Eclipsecon Europe 2017
 
Js in quick books
Js in quick booksJs in quick books
Js in quick books
 
Mobile for SharePoint with Windows Phone
Mobile for SharePoint with Windows PhoneMobile for SharePoint with Windows Phone
Mobile for SharePoint with Windows Phone
 
React JS and Redux
React JS and ReduxReact JS and Redux
React JS and Redux
 
20150812 4시간만에 따라해보는 windows 10 앱 개발
20150812  4시간만에 따라해보는 windows 10 앱 개발20150812  4시간만에 따라해보는 windows 10 앱 개발
20150812 4시간만에 따라해보는 windows 10 앱 개발
 
Resume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_expResume_Sandip_Mohod_Java_9_plus_years_exp
Resume_Sandip_Mohod_Java_9_plus_years_exp
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce Lightning
 
Dropwizard Introduction
Dropwizard IntroductionDropwizard Introduction
Dropwizard Introduction
 

More from Cristian Rodríguez Enríquez

LiDIA: An integration architecture to query Linked Open Data from multiple da...
LiDIA: An integration architecture to query Linked Open Data from multiple da...LiDIA: An integration architecture to query Linked Open Data from multiple da...
LiDIA: An integration architecture to query Linked Open Data from multiple da...
Cristian Rodríguez Enríquez
 
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
Cristian Rodríguez Enríquez
 
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
Cristian Rodríguez Enríquez
 
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
Cristian Rodríguez Enríquez
 
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
Cristian Rodríguez Enríquez
 
01 Building cross-platform mobile applications with jQuery Mobile
01 Building cross-platform mobile applications with jQuery Mobile01 Building cross-platform mobile applications with jQuery Mobile
01 Building cross-platform mobile applications with jQuery Mobile
Cristian Rodríguez Enríquez
 
Propuesta de integración para el consumo de múltiples datasets de linked data
Propuesta de integración para el consumo de múltiples datasets de linked dataPropuesta de integración para el consumo de múltiples datasets de linked data
Propuesta de integración para el consumo de múltiples datasets de linked data
Cristian Rodríguez Enríquez
 

More from Cristian Rodríguez Enríquez (7)

LiDIA: An integration architecture to query Linked Open Data from multiple da...
LiDIA: An integration architecture to query Linked Open Data from multiple da...LiDIA: An integration architecture to query Linked Open Data from multiple da...
LiDIA: An integration architecture to query Linked Open Data from multiple da...
 
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
02 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
 
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
01 Building cross platform mobile applications with PhoneGap / Desarrollo de ...
 
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
04 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
 
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
03 Building cross-platform mobile applications with jQuery Mobile / Desarroll...
 
01 Building cross-platform mobile applications with jQuery Mobile
01 Building cross-platform mobile applications with jQuery Mobile01 Building cross-platform mobile applications with jQuery Mobile
01 Building cross-platform mobile applications with jQuery Mobile
 
Propuesta de integración para el consumo de múltiples datasets de linked data
Propuesta de integración para el consumo de múltiples datasets de linked dataPropuesta de integración para el consumo de múltiples datasets de linked data
Propuesta de integración para el consumo de múltiples datasets de linked data
 

Recently uploaded

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
Elena Simperl
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 

Recently uploaded (20)

Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...When stars align: studies in data quality, knowledge graphs, and machine lear...
When stars align: studies in data quality, knowledge graphs, and machine lear...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 

05 Building cross-platform mobile applications with jQuery Mobile / Desarrollo de Aplicaciones Cross-Platform para Dispositivos Moviles

  • 1. Desarrollo de Aplicaciones Cross- Platform para Dispositivos Moviles Building Cross-Platform Mobile Applications M.S.C. Raquel Vásquez Ramírez M.S.C. Cristian A. Rodríguez Enríquez
  • 2. Contenido   •  Manejo  de  Base  de  Datos  (Client  Side)   •  Almacenamiento  Local   – Permanente   – Sesión   – Usando  Base  de  Datos   •  Conclusiones   Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 02 of 15
  • 3. HTML 5: Data Storage Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 03 of 15 HTML5 offers two types of data storage on the client: •  Storage via a database containing the tables described in SQL •  Storage through localStorage and sessionStorage objects, to store information made up of strings.
  • 4. Permanent Storage and Session Storage Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 04 of 15 Para habilitar el “Storage” se utilizan dos objetos de JavaScript: •  localStorage: Permite el almacenamiento permanente •  sessionStorage: Permite el almacenamiento en la sesión
  • 5. Permanent Storage Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 05 of 15 localStorage.lname = “Sarrion”; localStorage.fname = “Eric”;
  • 6. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 06 of 15 Session Storage sessionStorage.lname = “Sarrion”; sessionStorage.fname = “Eric”;
  • 7. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 07 of 15 Usando una Base de Datos Como se puede observar el almacenamiento temporal y permanente no provee las facilidades de las bases de datos SQL. Gracias a HTML 5 es posible usar bases de SQL de forma local.
  • 8. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 08 of 15 Creando la Base de Datos var  db  =  openDatabase  (“Test”,  “1.0”,  “Test”,  65535);  
  • 9. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 09 of 15 Transaction db.transacKon  (funcKon  (transacKon)     {          var  sql  =  SQL  query;          transacKon.executeSql  (sql,  [parameters]  /  undefined,            funcKon  ()          {                    //  JavaScript  code  to  execute  if  the  query  was  successful          },            funcKon  ()          {                    //  JavaScript  code  to  execute  if  the  query  failed          }  );   });  
  • 10. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 10 of 15 Usando la Base de Datos •  Crear Base de Datos •  Insertar •  Listar (SELECT) •  Eliminar Tabla
  • 11. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 11 of 15 CREATE TABLE db.transacKon  (funcKon  (transacKon)        {          var  sql  =  "CREATE  TABLE  customers  "  +                  "  (id  INTEGER  NOT  NULL  PRIMARY  KEY  AUTOINCREMENT,  "  +                  "lname  VARCHAR(100)  NOT  NULL,  "  +                    "fname  VARCHAR(100)  NOT  NULL)"          transacKon.executeSql  (sql,  undefined,  funcKon  ()          {                alert  ("Table  created");          },  error);      });  
  • 12. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 12 of 15 DROP TABLE db.transacKon  (funcKon  (transacKon)        {          var  sql  =  "DROP  TABLE  customers";          transacKon.executeSql  (sql,  undefined,  ok,  error);      }  
  • 13. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 13 of 15 INSERT INTO db.transacKon  (funcKon  (transacKon)        {          var  sql  =  "INSERT  INTO  customers  (lname,  fname)  VALUES  (?,  ?)";          transacKon.executeSql  (sql,  [lname,  fname],  funcKon  ()          {                alert  ("Customer  inserted");          },  error);      }  
  • 14. Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 14 of 15 Base de Datos Server Side (Elementos) var  sql  =  "SELECT  *  FROM  customers";   transacKon.executeSql  (sql,  undefined,…    
  • 15. Conclusiones   •  jQuery provee los elementos necesarios para desarrollar aplicaciones para dispositivos móviles •  Desarrollo Ágil •  Si se desea sincronizar datos con un servidor, se requiere usar una base de datos local y sincronizar cuando se disponga de conexión mediante una consulta constante del estado de la conexión (Push?) •  Optimización de Aplicaciones Web Building Cross-Plaftform Mobile Applications – jQuery Mobile Slide 15 of 15