SlideShare une entreprise Scribd logo
1  sur  30
DEVELOPING
  ANDROID
APPS USING
  TITANIUM
Soltani Kadhem
       Web and Mobile Developer
•   iPhone (objective-C)
•   Android (Java , Google Style)
•   RIM (Java, Blackberry)
•   Symbian (old school C)
What is Titanium Mobile ?




   •   Open source
   •   Build native, cross-platform mobile apps
   •   Using only JavaScript,HTML and CSS
   •   One codebase for multiple platforms
Small intro about Titanium
          Studio

 - Powerful Eclipse-based IDE
 - It will help you create, run for
 test and deploy (to app store) .
i Studio (why it so powerful)…

  • It always notifies you about latest SDK and
    Studio updates .
i Studio (why it so powerful)…

  • It is so smart, because it catches mistakes
    immediately!
i Studio (why it so powerful)…

  • Syntax highlighting
i Studio (why it so powerful)…

  • Content assist and more…
Project structure…
{code}

LET’S GET INTO THE INTERESTING
PART. CODING…
Titanium, DESIGNING A SAMPLE UI




                      Ti.UI.createWindow({

                      backgroundColor:"#FFF"
                      });
                      win.open();
Titanium, ADD a container




                     var view = Ti.UI.createView({
                         top:10,
                         left:10,
                         height:300,
                         width:300,
                         backgroundColor:"#AAA",
                         borderRadius:10
                     });
                     win.add(view);
Titanium, add a button



                         var button =
                         Ti.UI.createButton({
                             title:"Click Me",
                             top:10, left:10,
                                    height:40,
                         width:280
                         });

                         view.add(button);
Titanium, add a button




                         button.addEventListener("cli
                         ck",
                            function(){
                              alert("Comment gagner de
                         l'argent avec google");
                            }
                         );
Titanium, OPEN A DIALOG



                          var dlg =
                          Ti.UI.createOptionDialog({
                                     title:"Delete?",
                                     options:
                          ["Yes","No"],
                                     cancel:1
                               });
                          dlg.addEventListener("click"
                          ,
                                        function(e){
                                    alert(e.index);
                               });
                          dlg.show();
Titanium, ITS NOT ONLY ABOUT UI




           •   DATABASE
           •   WEB SERVICES
           •   MEDIA ELEMENTS
           •   SOCIAL NETWORK
Titanium, EVERYTHING SQLITE




             SQLite Manager
Why SQLite fit?


 • SQLite does not need tobe «installed»
 before it is used.

 •There is no « setup »   procedure.

 •There is no need for an administrator to
 create a new database.

 •There is no real notion of « initiating a
 connection ».

 •Accessing SQLite DB is damn
 easy(open,query,close).
{code}
Titanium, INSTALL A DATABASE

      Use database with your default data –


         var db =
         Ti.Database.install(
            ‘test.db’, ‘DB1’)
      Create or open an existing database -

        var db =
        Ti.Database.open(‘DB1’)
Titanium, CREATE TABLE



       db.execute(‘
         CREATE TABLE
            IF NOT EXISTS users (
            id INTEGER,
            Name TEXT, LastName TEXT,
            mail TEXT,
            PRIMARY KEY(id)
         )’);
Titanium, INSERT



    var result = db.execute(“
      INSERT INTO
          users
          (Name, LastName, mail)
        VALUES
        (‘Kadhem’, ‘Soltani’,
    ‘kadhem.soltani@outlook,com’)
    “);
Titanium, UPDATE



       var result = db.execute(‘
          UPDATE users
          SET
              Name = ‘Wael’
           WHERE
              id = 1
       );
Titanium, DELETE




       var result = db.execute(‘
          DELETE FROM users WHERE id = 1‘);
Titanium, READ



      var result = db.execute(‘
         SELECT
           (id, Name, LastName)
         FROM users
         WHERE id = 1
      );
Titanium, READ


        Iterate through rows -

   while (result.isValidRow()) {
      var name =
   result.fieldByName(‘name’);
      result.next();
   }
Thank you, QUESTIONS?




                ?
roduction To Appcelerator Titanium




       http://www.youtube.com/watch?
               v=I6iESgpZIwE
        http://www.youtube.com/watch?
                v=ohvw3WebAkY




                 Kadhem,soltani@outlook,com

Contenu connexe

Tendances

mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
zefhemel
 

Tendances (20)

The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210The Ring programming language version 1.9 book - Part 36 of 210
The Ring programming language version 1.9 book - Part 36 of 210
 
The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210The Ring programming language version 1.9 book - Part 53 of 210
The Ring programming language version 1.9 book - Part 53 of 210
 
The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185The Ring programming language version 1.5.4 book - Part 29 of 185
The Ring programming language version 1.5.4 book - Part 29 of 185
 
mobl presentation @ IHomer
mobl presentation @ IHomermobl presentation @ IHomer
mobl presentation @ IHomer
 
The Ring programming language version 1.8 book - Part 48 of 202
The Ring programming language version 1.8 book - Part 48 of 202The Ring programming language version 1.8 book - Part 48 of 202
The Ring programming language version 1.8 book - Part 48 of 202
 
The Ring programming language version 1.5.4 book - Part 44 of 185
The Ring programming language version 1.5.4 book - Part 44 of 185The Ring programming language version 1.5.4 book - Part 44 of 185
The Ring programming language version 1.5.4 book - Part 44 of 185
 
The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185The Ring programming language version 1.5.4 book - Part 42 of 185
The Ring programming language version 1.5.4 book - Part 42 of 185
 
Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)Mary Had a Little λ (QCon)
Mary Had a Little λ (QCon)
 
The Ring programming language version 1.9 book - Part 49 of 210
The Ring programming language version 1.9 book - Part 49 of 210The Ring programming language version 1.9 book - Part 49 of 210
The Ring programming language version 1.9 book - Part 49 of 210
 
Inteligencia artificial 4
Inteligencia artificial 4Inteligencia artificial 4
Inteligencia artificial 4
 
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
 
The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202The Ring programming language version 1.8 book - Part 49 of 202
The Ring programming language version 1.8 book - Part 49 of 202
 
The Ring programming language version 1.8 book - Part 46 of 202
The Ring programming language version 1.8 book - Part 46 of 202The Ring programming language version 1.8 book - Part 46 of 202
The Ring programming language version 1.8 book - Part 46 of 202
 
The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84The Ring programming language version 1.2 book - Part 32 of 84
The Ring programming language version 1.2 book - Part 32 of 84
 
The Ring programming language version 1.3 book - Part 34 of 88
The Ring programming language version 1.3 book - Part 34 of 88The Ring programming language version 1.3 book - Part 34 of 88
The Ring programming language version 1.3 book - Part 34 of 88
 
The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181The Ring programming language version 1.5.2 book - Part 43 of 181
The Ring programming language version 1.5.2 book - Part 43 of 181
 
Advanced MongoDB #1
Advanced MongoDB #1Advanced MongoDB #1
Advanced MongoDB #1
 
Testable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScriptTestable, Object-Oriented JavaScript
Testable, Object-Oriented JavaScript
 
Spine JS
Spine JSSpine JS
Spine JS
 
The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212The Ring programming language version 1.10 book - Part 52 of 212
The Ring programming language version 1.10 book - Part 52 of 212
 

Similaire à Appcelerator titanium

Titanium Introduction
Titanium IntroductionTitanium Introduction
Titanium Introduction
chortlehoort
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
Justin Lee
 
Develping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator TitaniumDevelping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator Titanium
Hasin Hayder
 

Similaire à Appcelerator titanium (20)

Titanium Introduction
Titanium IntroductionTitanium Introduction
Titanium Introduction
 
Titanium Introduction
Titanium IntroductionTitanium Introduction
Titanium Introduction
 
Cassandra rapid prototyping with achilles
Cassandra rapid prototyping with achillesCassandra rapid prototyping with achilles
Cassandra rapid prototyping with achilles
 
20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介20110525[Taipei GTUG] titanium mobile簡介
20110525[Taipei GTUG] titanium mobile簡介
 
The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184The Ring programming language version 1.5.3 book - Part 15 of 184
The Ring programming language version 1.5.3 book - Part 15 of 184
 
The Ring programming language version 1.8 book - Part 19 of 202
The Ring programming language version 1.8 book - Part 19 of 202The Ring programming language version 1.8 book - Part 19 of 202
The Ring programming language version 1.8 book - Part 19 of 202
 
Spicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QASpicy javascript: Create your first Chrome extension for web analytics QA
Spicy javascript: Create your first Chrome extension for web analytics QA
 
jQuery Rescue Adventure
jQuery Rescue AdventurejQuery Rescue Adventure
jQuery Rescue Adventure
 
Develping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator TitaniumDevelping iOS and Android apps using Appcelerator Titanium
Develping iOS and Android apps using Appcelerator Titanium
 
mobl
moblmobl
mobl
 
The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.10 book - Part 22 of 212The Ring programming language version 1.10 book - Part 22 of 212
The Ring programming language version 1.10 book - Part 22 of 212
 
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
ANDROID USING SQLITE DATABASE ADMINISTRATORS ~HMFTJ
 
The Ring programming language version 1.9 book - Part 21 of 210
The Ring programming language version 1.9 book - Part 21 of 210The Ring programming language version 1.9 book - Part 21 of 210
The Ring programming language version 1.9 book - Part 21 of 210
 
Writing videogames with titanium appcelerator
Writing videogames with titanium appceleratorWriting videogames with titanium appcelerator
Writing videogames with titanium appcelerator
 
The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210The Ring programming language version 1.9 book - Part 99 of 210
The Ring programming language version 1.9 book - Part 99 of 210
 
The Ring programming language version 1.5.2 book - Part 14 of 181
The Ring programming language version 1.5.2 book - Part 14 of 181The Ring programming language version 1.5.2 book - Part 14 of 181
The Ring programming language version 1.5.2 book - Part 14 of 181
 
The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31The Ring programming language version 1.4.1 book - Part 12 of 31
The Ring programming language version 1.4.1 book - Part 12 of 31
 
Роман Иовлев «Open Source UI Automation Tests on C#»
Роман Иовлев «Open Source UI Automation Tests on C#»Роман Иовлев «Open Source UI Automation Tests on C#»
Роман Иовлев «Open Source UI Automation Tests on C#»
 
Cross platform Mobile development on Titanium
Cross platform Mobile development on TitaniumCross platform Mobile development on Titanium
Cross platform Mobile development on Titanium
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 

Plus de Kadhem Soltani (7)

Digital marketing
Digital marketingDigital marketing
Digital marketing
 
Gouvernorat de tataouine en chiffres
Gouvernorat de tataouine en chiffresGouvernorat de tataouine en chiffres
Gouvernorat de tataouine en chiffres
 
Gouvernorat de kébili en chiffres
Gouvernorat de kébili en chiffresGouvernorat de kébili en chiffres
Gouvernorat de kébili en chiffres
 
Gouvernorat de Médenine en chiffres
Gouvernorat de Médenine en chiffresGouvernorat de Médenine en chiffres
Gouvernorat de Médenine en chiffres
 
Gouvernorat de Gabès en chiffres
Gouvernorat de Gabès en chiffresGouvernorat de Gabès en chiffres
Gouvernorat de Gabès en chiffres
 
Criirad n-27905-3-phosphogypse-gabes
Criirad n-27905-3-phosphogypse-gabesCriirad n-27905-3-phosphogypse-gabes
Criirad n-27905-3-phosphogypse-gabes
 
Building Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and IonicBuilding Mobile Apps with Cordova , AngularJS and Ionic
Building Mobile Apps with Cordova , AngularJS and Ionic
 

Dernier

EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 

Appcelerator titanium

  • 1. DEVELOPING ANDROID APPS USING TITANIUM
  • 2. Soltani Kadhem Web and Mobile Developer
  • 3. iPhone (objective-C) • Android (Java , Google Style) • RIM (Java, Blackberry) • Symbian (old school C)
  • 4. What is Titanium Mobile ? • Open source • Build native, cross-platform mobile apps • Using only JavaScript,HTML and CSS • One codebase for multiple platforms
  • 5.
  • 6. Small intro about Titanium Studio - Powerful Eclipse-based IDE - It will help you create, run for test and deploy (to app store) .
  • 7. i Studio (why it so powerful)… • It always notifies you about latest SDK and Studio updates .
  • 8. i Studio (why it so powerful)… • It is so smart, because it catches mistakes immediately!
  • 9. i Studio (why it so powerful)… • Syntax highlighting
  • 10. i Studio (why it so powerful)… • Content assist and more…
  • 12. {code} LET’S GET INTO THE INTERESTING PART. CODING…
  • 13. Titanium, DESIGNING A SAMPLE UI Ti.UI.createWindow({ backgroundColor:"#FFF" }); win.open();
  • 14. Titanium, ADD a container var view = Ti.UI.createView({ top:10, left:10, height:300, width:300, backgroundColor:"#AAA", borderRadius:10 }); win.add(view);
  • 15. Titanium, add a button var button = Ti.UI.createButton({ title:"Click Me", top:10, left:10, height:40, width:280 }); view.add(button);
  • 16. Titanium, add a button button.addEventListener("cli ck", function(){ alert("Comment gagner de l'argent avec google"); } );
  • 17. Titanium, OPEN A DIALOG var dlg = Ti.UI.createOptionDialog({ title:"Delete?", options: ["Yes","No"], cancel:1 }); dlg.addEventListener("click" , function(e){ alert(e.index); }); dlg.show();
  • 18. Titanium, ITS NOT ONLY ABOUT UI • DATABASE • WEB SERVICES • MEDIA ELEMENTS • SOCIAL NETWORK
  • 19. Titanium, EVERYTHING SQLITE SQLite Manager
  • 20. Why SQLite fit? • SQLite does not need tobe «installed» before it is used. •There is no « setup » procedure. •There is no need for an administrator to create a new database. •There is no real notion of « initiating a connection ». •Accessing SQLite DB is damn easy(open,query,close).
  • 22. Titanium, INSTALL A DATABASE Use database with your default data – var db = Ti.Database.install( ‘test.db’, ‘DB1’) Create or open an existing database - var db = Ti.Database.open(‘DB1’)
  • 23. Titanium, CREATE TABLE db.execute(‘ CREATE TABLE IF NOT EXISTS users ( id INTEGER, Name TEXT, LastName TEXT, mail TEXT, PRIMARY KEY(id) )’);
  • 24. Titanium, INSERT var result = db.execute(“ INSERT INTO users (Name, LastName, mail) VALUES (‘Kadhem’, ‘Soltani’, ‘kadhem.soltani@outlook,com’) “);
  • 25. Titanium, UPDATE var result = db.execute(‘ UPDATE users SET Name = ‘Wael’ WHERE id = 1 );
  • 26. Titanium, DELETE var result = db.execute(‘ DELETE FROM users WHERE id = 1‘);
  • 27. Titanium, READ var result = db.execute(‘ SELECT (id, Name, LastName) FROM users WHERE id = 1 );
  • 28. Titanium, READ Iterate through rows - while (result.isValidRow()) { var name = result.fieldByName(‘name’); result.next(); }
  • 30. roduction To Appcelerator Titanium http://www.youtube.com/watch? v=I6iESgpZIwE http://www.youtube.com/watch? v=ohvw3WebAkY Kadhem,soltani@outlook,com