Appcelerator titanium

  • View
    511

  • Download
    1

Embed Size (px)

DESCRIPTION

http://novavision-it.tn/

Text of Appcelerator titanium

  • 1. DEVELOPINGANDROIDAPPS USINGTITANIUM

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. Small intro about TitaniumStudio - Powerful Eclipse-based IDE - It will help you create, run for test and deploy (to app store) . 6. i Studio (why it so powerful) It always notifies you about latest SDK andStudio updates . 7. i Studio (why it so powerful) It is so smart, because it catches mistakesimmediately! 8. i Studio (why it so powerful) Syntax highlighting 9. i Studio (why it so powerful) Content assist and more 10. Project structure 11. {code}LETS GET INTO THE INTERESTINGPART. CODING 12. Titanium, DESIGNING A SAMPLE UITi.UI.createWindow({backgroundColor:"#FFF"});win.open(); 13. Titanium, ADD a container var view = Ti.UI.createView({ top:10, left:10, height:300, width:300, backgroundColor:"#AAA", borderRadius:10 }); win.add(view); 14. Titanium, add a button var button = Ti.UI.createButton({ title:"Click Me", top:10, left:10,height:40, width:280 }); view.add(button); 15. Titanium, add a button button.addEventListener("cli ck",function(){alert("Comment gagner de largent avec google");} ); 16. Titanium, OPEN A DIALOGvar dlg =Ti.UI.createOptionDialog({ title:"Delete?", options:["Yes","No"], cancel:1 });dlg.addEventListener("click",function(e){alert(e.index); });dlg.show(); 17. Titanium, ITS NOT ONLY ABOUT UI DATABASE WEB SERVICES MEDIA ELEMENTS SOCIAL NETWORK 18. Titanium, EVERYTHING SQLITE SQLite Manager 19. Why SQLite t? 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). 20. {code} 21. Titanium, INSTALL A DATABASEUse 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) 22. Titanium, CREATE TABLE db.execute( CREATE TABLEIF NOT EXISTS users (id INTEGER,Name TEXT, LastName TEXT,mail TEXT,PRIMARY KEY(id) )); 23. Titanium, INSERTvar result = db.execute(INSERT INTOusers(Name, LastName, mail)VALUES(Kadhem, Soltani,kadhem.soltani@outlook,com)); 24. Titanium, UPDATE var result = db.execute(UPDATE usersSETName = Wael WHEREid = 1 ); 25. Titanium, DELETE var result = db.execute(DELETE FROM users WHERE id = 1); 26. Titanium, READvar result = db.execute( SELECT (id, Name, LastName) FROM users WHERE id = 1); 27. Titanium, READIterate through rows - while (result.isValidRow()) {var name = result.fieldByName(name);result.next(); } 28. Thank you, QUESTIONS?? 29. roduction To Appcelerator Titanium http://www.youtube.com/watch? v=I6iESgpZIwEhttp://www.youtube.com/watch?v=ohvw3WebAkY Kadhem,soltani@outlook,com