SlideShare ist ein Scribd-Unternehmen logo
1 von 26
TITANIUM & BACKBONE
Mads Møller
CTO – Napp
mm@napp.dk
@nappdev
TITANIUM OG BACKBONE

•
•
•
•
•
•

Hvorfor cross platform
Alloy
Backbone
Middleware
Case stories
Q&A
HVORFOR CROSS PLATFORM
HVORFOR CROSS PLATFORM
• Én kodebase
– Samme features på alle platforme
• Én udviklingsafdeling
– Java, objective-c, c# samlet i ét
• Kortere produktionstid
– 60% hurtigere udviklingstid
– Oftere nye features
ALLOY
ALLOY
• Model View Controller Framework
–
–
–
–

Vedligeholdt afAppcelerator
Modulopbygning
XML, CSS og JS
Backbone til databehandling
ALLOY MVC
Controller – /controllers/index.js
$.win.open(); // opens the window

View – /views/index.xml
<Alloy>
<Window id=“win” class="container">
<Label id=”text" text=”Hello World"/>
</Window>
</Alloy>

Style – /styles/index.tss
".container": {
backgroundColor: "white"
},
”#text": {
width: Ti.UI.SIZE,
height: Ti.UI.SIZE,
color: "#000"
}

Model - ?
BACKBONE.JS
BACKBONE – HVAD ER DET?
– Overførsel af data
• Typisk fra server til app

– Databehandling
• Sortering, filtering mv.

– Gem data lokalt i appen
• Database, filsystem

– Bygger på RESTful JSON
– Uafhængig af data strukturen
• XML, JSON osv..
BACKBONE I ALLOY
Adapter
exports.definition = {
config: {
columns: {
"city": "string",
"name": "string"
},
adapter: {
type: "sql",
collection_name: "baseball"
}
},
extendModel: function(Model) {
_.extend(Model.prototype, {
// extended functions and properties go here
});
return Model;
},
extendCollection: function(Collection) {
_.extend(Collection.prototype, {
// extended functions and properties go here
});
return Collection;
}
}
BACKBONE I ALLOY
Controller
var teams = Alloy.createCollection('baseball'); // get adapter
teams.fetch(); // get data from remote server
$.index.open(); // open window

View
<Alloy>
<Window class="container">
<TableView id="table" dataCollection="baseball">
<TableViewRow>
<Label id="city" text="{city}"/>
<Label id="name" text="{name}"/>
</TableViewRow>
</TableView>
</Window>
</Alloy>
BACKBONE I ALLOY
• Udvid - custom backbone adapter
– Alloy har indbygget: sql,
– REST API, SOAP mv.

• Migrations (SQL)
migration.up = function(migrator) {
migrator.db.execute('ALTER TABLE ' + migrator.table + ' ADD COLUMN country TEXT;');
};
migration.down = function(migrator) {
var db = migrator.db;
db.execute('DROP TABLE ' + migrator.table + ';');
};
BACKBONE I ALLOY
• Og meget meget mere…

www.backbonejs.org
MIDDLEWARE
MIDDLEWARE
• Uden middleware

• Med middleware
MIDDLEWARE – HVORFOR?
• Mission: “Thin client”
– Jo mindre app’en gør, desto bedre

• Det positive
– Hurtigere app
– Mindle ventetid for app brugeren
– Nemmere opdatering/fejlrettelse

• Det negative
– Kræver langt større servere
CASE STORIES
CASE: ORBICON
CASE: ORBICON
• I felten med en tablet
– SOAP webservice
• SOAP Backbone adapter
• Oversæt XML -> JSON

– Custom kort / overlays
– Kort data
– Tracking
CASE: ABB
CASE: ABB
• Moduler & API integration
– Native moduler: PDF, PUSH
– Cloud service integration
• Middleware: PDF konvertering

– Tracking
CASE: TO-DOOR
CASE: TO-DOOR
• Intern app
– Geo tracking
– Navigation
• Middleware

– C5 dynamics integration
• Middleware

– Rapportering
– SMS til slutkunde
CASE: STELLA POLARIS
CASE: STELLA POLARIS
• Bruger drevet indhold
– Event app
• Nyheder, kort, program, social

– Custom Backbone Rest API adapter
– Integration til Twitter & Instagram
• Middleware
Q& A
Mads Møller
CTO – Napp
mm@napp.dk
@nappdev

Weitere ähnliche Inhalte

Empfohlen

How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 

Empfohlen (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Titanium Alloy & Backbone

  • 1. TITANIUM & BACKBONE Mads Møller CTO – Napp mm@napp.dk @nappdev
  • 2. TITANIUM OG BACKBONE • • • • • • Hvorfor cross platform Alloy Backbone Middleware Case stories Q&A
  • 4. HVORFOR CROSS PLATFORM • Én kodebase – Samme features på alle platforme • Én udviklingsafdeling – Java, objective-c, c# samlet i ét • Kortere produktionstid – 60% hurtigere udviklingstid – Oftere nye features
  • 6. ALLOY • Model View Controller Framework – – – – Vedligeholdt afAppcelerator Modulopbygning XML, CSS og JS Backbone til databehandling
  • 7. ALLOY MVC Controller – /controllers/index.js $.win.open(); // opens the window View – /views/index.xml <Alloy> <Window id=“win” class="container"> <Label id=”text" text=”Hello World"/> </Window> </Alloy> Style – /styles/index.tss ".container": { backgroundColor: "white" }, ”#text": { width: Ti.UI.SIZE, height: Ti.UI.SIZE, color: "#000" } Model - ?
  • 9. BACKBONE – HVAD ER DET? – Overførsel af data • Typisk fra server til app – Databehandling • Sortering, filtering mv. – Gem data lokalt i appen • Database, filsystem – Bygger på RESTful JSON – Uafhængig af data strukturen • XML, JSON osv..
  • 10. BACKBONE I ALLOY Adapter exports.definition = { config: { columns: { "city": "string", "name": "string" }, adapter: { type: "sql", collection_name: "baseball" } }, extendModel: function(Model) { _.extend(Model.prototype, { // extended functions and properties go here }); return Model; }, extendCollection: function(Collection) { _.extend(Collection.prototype, { // extended functions and properties go here }); return Collection; } }
  • 11. BACKBONE I ALLOY Controller var teams = Alloy.createCollection('baseball'); // get adapter teams.fetch(); // get data from remote server $.index.open(); // open window View <Alloy> <Window class="container"> <TableView id="table" dataCollection="baseball"> <TableViewRow> <Label id="city" text="{city}"/> <Label id="name" text="{name}"/> </TableViewRow> </TableView> </Window> </Alloy>
  • 12. BACKBONE I ALLOY • Udvid - custom backbone adapter – Alloy har indbygget: sql, – REST API, SOAP mv. • Migrations (SQL) migration.up = function(migrator) { migrator.db.execute('ALTER TABLE ' + migrator.table + ' ADD COLUMN country TEXT;'); }; migration.down = function(migrator) { var db = migrator.db; db.execute('DROP TABLE ' + migrator.table + ';'); };
  • 13. BACKBONE I ALLOY • Og meget meget mere… www.backbonejs.org
  • 16. MIDDLEWARE – HVORFOR? • Mission: “Thin client” – Jo mindre app’en gør, desto bedre • Det positive – Hurtigere app – Mindle ventetid for app brugeren – Nemmere opdatering/fejlrettelse • Det negative – Kræver langt større servere
  • 19. CASE: ORBICON • I felten med en tablet – SOAP webservice • SOAP Backbone adapter • Oversæt XML -> JSON – Custom kort / overlays – Kort data – Tracking
  • 21. CASE: ABB • Moduler & API integration – Native moduler: PDF, PUSH – Cloud service integration • Middleware: PDF konvertering – Tracking
  • 23. CASE: TO-DOOR • Intern app – Geo tracking – Navigation • Middleware – C5 dynamics integration • Middleware – Rapportering – SMS til slutkunde
  • 25. CASE: STELLA POLARIS • Bruger drevet indhold – Event app • Nyheder, kort, program, social – Custom Backbone Rest API adapter – Integration til Twitter & Instagram • Middleware
  • 26. Q& A Mads Møller CTO – Napp mm@napp.dk @nappdev