SlideShare a Scribd company logo
1 of 38
Download to read offline
ALLOYDEEP DIVE, BELOW THE SURFACE, AND OTHER
NAUTICAL METAPHORS
TiConf US
June 28-29 2013
Tremont Hotel in Baltimore
#ticonf
TONY LUKASAVAGE
Alloy Lead Engineer @ Appcelerator
@tonylukasavage
tlukasavage@appcelerator.com
CRASH COURSE
Alloy is an MVC framework for Appcelerator's Titanium
SDK built with Node.js. Through a compilation process it
aims to produce highly optimized, cross-platform
Javascript code.
from on .
CODESTRONG 2012 Breakout session - Alloy (MVC)
Application Framework Overview
Appcelerator Video Channel Vimeo
Models | Views | Controllers | Styles
var tabGroup = Titanium.UI.createTabGroup();
var win1 = Titanium.UI.createWindow({
title:'tab 1',
backgroundColor:'#fff'
});
var tab1 = Titanium.UI.createTab({
title:'tab 1',
window:win1
});
var label1 = Titanium.UI.createLabel({
text:'tab 1'
});
win1.add(label1);
win1.addEventListener('click',function(e){/* ... */});
var win2 = Titanium.UI.createWindow({
title:'tab 2',
backgroundColor:'#fff'
});
var tab2 = Titanium.UI.createTab({
title:'tab 2',
window:win2
});
var label2 = Titanium.UI.createLabel({
text:'tab 2'
});
win2.add(label2);
tabGroup.addTab(tab1);
tabGroup.addTab(tab2);
tabGroup.open();
DECLARATIVE UI
<Alloy>
<TabGroup>
<Tab title="tab1">
<Window title="tab1" backgroundColor="#fff">
<Label>tab 1</Label>
</Window>
</Tab>
<Tab title="tab2">
<Window title="tab2" backgroundColor="#fff">
<Label>tab 2</Label>
</Window>
</Tab>
</TabGroup>
</Alloy>
TSS
'Window': {
backgroundColor: '#fff',
navBarHidden: true
}
'Label': {
text: L('theString'),
color: '#222',
height: Ti.UI.SIZE,
font: {
fontSize: 18,
fontWeight: 'normal'
}
}
'.shadow': {
shadowColor: Alloy.CFG.shadowColor,
shadowOffset: {x:1,y:2}
}
'#index[platform=android]': {
exitOnClose: true
}
CONTROLLERS
var memory = ['magic show', 'wear $6000 suit'];
function forgetMeNow() {
memory.push('took forget-me-now');
setTimeout(function() { memory.pop() }, 1000 * 60 * 60 * 12);
}
exports.isNude = function() {
return false;
}
exports.isThereMoney = function(location) {
return location === 'banana stand';
}
try {
$.someWindow.open();
} catch (e) {
memory.push("I've made a huge mistake");
forgetMeNow();
}
MODELS
exports.definition = {
config: {
columns: {
item: "text",
done: "integer",
date_completed: "text"
},
adapter: {
type: "sql",
collection_name: "todo"
}
},
extendModel : function(Model) {
_.extend(Model.prototype, {
validate : function(attrs) { /* ... */ }
});
return Model;
},
extendCollection : function(Collection) {
_.extend(Collection.prototype, {
comparator: function(todo) { return todo.get('done'); }
});
return Collection;
}
}
WIDGETS
http://www.danielsefton.com/2012/10/ios-slider-menu-widget-for-titanium-alloy
SYNC ADAPTERS
Alloy + Backbone.js
Data persistence abstraction
Adapters:
SQLite
REST
ACS
CouchDB
BUILTINS
Backbone.js
Underscore.js
Moment.js
Titanium-specific libraries
var moment = require('alloy/moment');
BEST PRACTICES
* Standarize coding practices *
* Embedding Expertise *
* CommonJS *
* Parity Issues *
* Optimizations *
FASTER DEVELOPMENT
HIGH QUALITY APPS
H TO THE IZZO
INSTALLING ALLOY
# latest stable
[sudo] npm install -g alloy
# by version
[sudo] npm install -g alloy@1.1.3
# straight from github
[sudo] npm install -g git://github.com/appcelerator/alloy.git
DYNAMIC STYLING*
Modify and apply styles at runtime
New APIs
Alloy.createStyle()
Alloy.UI.create()
Alloy.addClass()
Alloy.removeClass()
Alloy.resetClass()
*available in Alloy 1.2.0
LISTVIEW MARKUP*
High performance lists
iOS & Android
Transition made easier with Alloy
Data binding support
*available in Alloy 1.2.0
NATIVE MODULES
IN MARKUP*
<Module id="paint" module="ti.paint"
method="createPaintView" platform="ios,android"/>
*available in Alloy 1.2.0
DEVICE OPTIMIZATIONS
Device Queries
Compiler Conditionals
Conditional Configurations
ALLOY.JMK
pre/post processing
Modify, beautify, minify, etc...
Even or , if you're into that sort of
thing
coffeescript Jade
OVERRIDES
NOTHING IS SACRED
...unless it breaks something
Alloy namespace functions
Backbone.js, Underscore.js, etc...
Even the core runtime library (alloy.js)
CONTROLLER
EVENTING
Alloy controllers have Backbone eventing
Lightweight, yet powerful
Loose coupling
VIEW MODEL BINDING
dataCollection
dataTransform
dataFilter
<TableView id="todoTable" dataCollection="todo"
dataFilter="whereFunction" dataTransform="transformFunction">
<Require src="row"/>
</TableView>
SOURCE MAPS
Maps generated code to source, and vice versa
Enables debugging, exceptions, and code processor
config.json toggling
{
"sourcemap": false
}
alloylove.com
COMMUNITY
All-Stars
Fokke Zandenberg ( )
David Bankier ( )
Aaron Saunders ( )
Jason Kneen ( )
Mads Moller ( )
Josh Jensen ( )
Twitter at
@fokkezb
@davidbankier
@aaronksaunders
@jasonkneen
@nappdev
@joshj
#tialloy
Q&A "alloy" tag
Alloy Google Group
THE FUTURE
DYNAMIC THEMES
→
LIGHTER, MORE
POWERFUL MODELING
Peel back the Alloy layer
Develop abstract model interface
Leverage Alloy's and framework of choice's features
NATIVE FORMATS
iOS Nib
Android XML
Native formatting optimizations
PACKAGE
MANAGEMENT
meets
Iterative development independent of Alloy releases
Same conventions, same results
alloylove.com npm
# Install a widget. Package manifest would determine that it's a widget
tpm install someCoolAssWidget
# Install a sync adapter.
tmp install syncToMyToaster
RESOURCES
Official Alloy Documentation
Q&A
Alloy Google Group
Alloy source code
Alloy test app collection
FIND ME
@tonylukasavage
tlukasavage@appcelerator.com
...or drinking whiskey in the next few minutes

More Related Content

Similar to Alloy: Deep Dive, Below The Surface, and Other Nautical Metaphors

Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy FrameworkTechday7
 
Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modulesomorandi
 
Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012Chris Barber
 
Codestrong 2012 breakout session exploring the new titanium command line in...
Codestrong 2012 breakout session   exploring the new titanium command line in...Codestrong 2012 breakout session   exploring the new titanium command line in...
Codestrong 2012 breakout session exploring the new titanium command line in...Axway Appcelerator
 
Git and GitHub for Testers
Git and GitHub for TestersGit and GitHub for Testers
Git and GitHub for TestersJosiah Renaudin
 
Appcelerator Titanium Alloy
Appcelerator Titanium AlloyAppcelerator Titanium Alloy
Appcelerator Titanium AlloyKarthi Ponnusamy
 
Appcelerator Titanium Alloy
Appcelerator Titanium Alloy Appcelerator Titanium Alloy
Appcelerator Titanium Alloy karthi-anubavam
 
Angular Extreme Performance - V2
Angular Extreme Performance - V2Angular Extreme Performance - V2
Angular Extreme Performance - V2Gustavo Costa
 
Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)Smail LOUNES
 
Giorgio Mandolini - Rapid application development con titanium appcelerator
Giorgio Mandolini - Rapid application development con titanium appceleratorGiorgio Mandolini - Rapid application development con titanium appcelerator
Giorgio Mandolini - Rapid application development con titanium appceleratorgdg-ancona
 
JavaME Deploy and Test - JMDF 2005
JavaME Deploy and Test - JMDF 2005JavaME Deploy and Test - JMDF 2005
JavaME Deploy and Test - JMDF 2005Edoardo Schepis
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013ralcocer
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Ricardo Alcocer
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first appAlessio Ricco
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Matt Raible
 
Platform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch EventPlatform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch EventFokke Zandbergen
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinsonmfrancis
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haulIan Robinson
 
Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9Anna Shymchenko
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Casessumitamar
 

Similar to Alloy: Deep Dive, Below The Surface, and Other Nautical Metaphors (20)

Titanium Alloy Framework
Titanium Alloy FrameworkTitanium Alloy Framework
Titanium Alloy Framework
 
Extending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native ModulesExtending Appcelerator Titanium Mobile through Native Modules
Extending Appcelerator Titanium Mobile through Native Modules
 
Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012Exploring the Titanium CLI - Codestrong 2012
Exploring the Titanium CLI - Codestrong 2012
 
Codestrong 2012 breakout session exploring the new titanium command line in...
Codestrong 2012 breakout session   exploring the new titanium command line in...Codestrong 2012 breakout session   exploring the new titanium command line in...
Codestrong 2012 breakout session exploring the new titanium command line in...
 
Git and GitHub for Testers
Git and GitHub for TestersGit and GitHub for Testers
Git and GitHub for Testers
 
Appcelerator Titanium Alloy
Appcelerator Titanium AlloyAppcelerator Titanium Alloy
Appcelerator Titanium Alloy
 
Appcelerator Titanium Alloy
Appcelerator Titanium Alloy Appcelerator Titanium Alloy
Appcelerator Titanium Alloy
 
Angular Extreme Performance - V2
Angular Extreme Performance - V2Angular Extreme Performance - V2
Angular Extreme Performance - V2
 
Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)Angular from Zero to Mastery - Training (Intermediate)
Angular from Zero to Mastery - Training (Intermediate)
 
Giorgio Mandolini - Rapid application development con titanium appcelerator
Giorgio Mandolini - Rapid application development con titanium appceleratorGiorgio Mandolini - Rapid application development con titanium appcelerator
Giorgio Mandolini - Rapid application development con titanium appcelerator
 
JavaME Deploy and Test - JMDF 2005
JavaME Deploy and Test - JMDF 2005JavaME Deploy and Test - JMDF 2005
JavaME Deploy and Test - JMDF 2005
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013Appcelerator Alloy Deep Dive - tiTokyo 2013
Appcelerator Alloy Deep Dive - tiTokyo 2013
 
Titanium appcelerator my first app
Titanium appcelerator my first appTitanium appcelerator my first app
Titanium appcelerator my first app
 
Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
Platform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch EventPlatform 4.0 Meetup Launch Event
Platform 4.0 Meetup Launch Event
 
Travelling Light for the Long Haul - Ian Robinson
Travelling Light for the Long Haul -  Ian RobinsonTravelling Light for the Long Haul -  Ian Robinson
Travelling Light for the Long Haul - Ian Robinson
 
Travelling light for the long haul
Travelling light for the long haulTravelling light for the long haul
Travelling light for the long haul
 
Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9Illia shestakov - The Future of Java JDK #9
Illia shestakov - The Future of Java JDK #9
 
Web Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use CasesWeb Components: Introduction and Practical Use Cases
Web Components: Introduction and Practical Use Cases
 

Recently uploaded

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsAndrey Dotsenko
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Neo4j
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024BookNet Canada
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 

Recently uploaded (20)

Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024Build your next Gen AI Breakthrough - April 2024
Build your next Gen AI Breakthrough - April 2024
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC BiblioShare - Tech Forum 2024
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 

Alloy: Deep Dive, Below The Surface, and Other Nautical Metaphors