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!
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();
}