jsconf.it 2011: a wondrous experience of sound, light, and code

99
A W ondrous Experience of Sound, Light, and Code Cappuccino and SproutCore in 45 Minutes YAY! @jfahrenkrug Johannes Fahrenkrug springenwerk.com herzpoetin.de Donnerstag, 12. Mai 2011

Upload: johannes-fahrenkrug

Post on 28-Dec-2014

1.992 views

Category:

Technology


2 download

DESCRIPTION

My JSConf.it 2011 presentation about the Cappuccino and SproutCore JavaScript application frameworks. Unfortunately the videos are missing...

TRANSCRIPT

Page 1: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

A Wondrous Experience of Sound, Light, and Code

Cappuccino and SproutCore in 45 Minutes

YAY!

@jfahrenkrugJohannesFahrenkrugspringenwerk.com herzpoetin.de

Donnerstag, 12. Mai 2011

Page 2: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

starstwins.comDonnerstag, 12. Mai 2011

Page 3: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

starstwins.com

Intro & SimilaritiesIntro & Similarities

Capp in 10

Video!

SC in 10

Video!

Wrap Up & RecommendationsWrap Up & Recommendations

Q & AQ & A

Donnerstag, 12. Mai 2011

Page 4: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Donnerstag, 12. Mai 2011

Page 5: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Desktop-ish

Donnerstag, 12. Mai 2011

Page 6: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Desktop-ish No Plugin

Donnerstag, 12. Mai 2011

Page 7: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Desktop-ish No Plugin

Cocoa-inspired

Donnerstag, 12. Mai 2011

Page 8: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Desktop-ish No Plugin

Cocoa-inspired

ouramericangeneration.orgDonnerstag, 12. Mai 2011

Page 9: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Similarities

Cocoa-inspired

Donnerstag, 12. Mai 2011

Page 10: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Cappuccino

Donnerstag, 12. Mai 2011

Page 11: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

Donnerstag, 12. Mai 2011

Page 12: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript

Donnerstag, 12. Mai 2011

Page 13: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript• Port of Apple’s Cocoa framework

Donnerstag, 12. Mai 2011

Page 14: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript• Port of Apple’s Cocoa framework• Low learning curve for iOS/Mac developers

Donnerstag, 12. Mai 2011

Page 15: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript• Port of Apple’s Cocoa framework• Low learning curve for iOS/Mac developers• No need to use HTML/JS/CSS

Donnerstag, 12. Mai 2011

Page 16: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript• Port of Apple’s Cocoa framework• Low learning curve for iOS/Mac developers• No need to use HTML/JS/CSS• Design UIs in Xcode’s Interface Builder

Donnerstag, 12. Mai 2011

Page 17: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Objective-J and JavaScript• Port of Apple’s Cocoa framework• Low learning curve for iOS/Mac developers• No need to use HTML/JS/CSS• Design UIs in Xcode’s Interface Builder• http://cappuccino.org

Donnerstag, 12. Mai 2011

Page 18: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Installation

2/10

1. git clone git://github.com/280north/cappuccino.git2. Run ./bootstrap.sh3. Add export PATH=”/usr/local/narwhal/bin:$PATH”

to your ~/.profile or ~/.zshrc4. Run jake sudo-install5. That’s it!

Donnerstag, 12. Mai 2011

Page 19: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

Donnerstag, 12. Mai 2011

Page 20: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

1. capp gen –t NibApplication my_awesome_app

Donnerstag, 12. Mai 2011

Page 21: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

1. capp gen –t NibApplication my_awesome_app2. Run nib2cib Resources/MainMenu.xib

Donnerstag, 12. Mai 2011

Page 22: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

1. capp gen –t NibApplication my_awesome_app2. Run nib2cib Resources/MainMenu.xib3. Open index.html

Donnerstag, 12. Mai 2011

Page 23: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

1. capp gen –t NibApplication my_awesome_app2. Run nib2cib Resources/MainMenu.xib3. Open index.html

Donnerstag, 12. Mai 2011

Page 24: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

Donnerstag, 12. Mai 2011

Page 25: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp

Donnerstag, 12. Mai 2011

Page 26: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp

Donnerstag, 12. Mai 2011

Page 27: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 28: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 29: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 30: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 31: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 32: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

1. cd MyAwesomeApp2. Run xcodecapp3. Edit the UI in Xcode

Donnerstag, 12. Mai 2011

Page 33: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

Donnerstag, 12. Mai 2011

Page 34: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

Class name

Donnerstag, 12. Mai 2011

Page 35: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

SuperclassClass name

Donnerstag, 12. Mai 2011

Page 36: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

Ivars

SuperclassClass name

Donnerstag, 12. Mai 2011

Page 37: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

Methods

Ivars

SuperclassClass name

Donnerstag, 12. Mai 2011

Page 38: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Objective-J

5/10

Donnerstag, 12. Mai 2011

Page 39: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

6/10

wallpaper110.com & United Plankton Pictures

Donnerstag, 12. Mai 2011

Page 40: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

6/10

wallpaper110.com & United Plankton Pictures

Donnerstag, 12. Mai 2011

Page 41: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

6/10

wallpaper110.com & United Plankton Pictures

Donnerstag, 12. Mai 2011

Page 42: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

6/10

wallpaper110.com & United Plankton Pictures

Donnerstag, 12. Mai 2011

Page 43: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Donnerstag, 12. Mai 2011

Page 44: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Bindings

Donnerstag, 12. Mai 2011

Page 45: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

BindingsKVO/KVC

Donnerstag, 12. Mai 2011

Page 46: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

BindingsKVO/KVC

NativeHost

Donnerstag, 12. Mai 2011

Page 47: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

BindingsKVO/KVC

Categories

NativeHost

Donnerstag, 12. Mai 2011

Page 48: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Testing

8/10

https://github.com/280north/OJTest

•Unit Tests•Specs•Mocks•Auto-Testing•Code Coverage

Donnerstag, 12. Mai 2011

Page 49: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Deployment

9/10

1. Run jake release2. Copy everything to any server, it's just static files3. Or run jake desktop for NativeHost

Donnerstag, 12. Mai 2011

Page 50: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

License

10/10

Donnerstag, 12. Mai 2011

Page 51: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

License

10/10

LGPLDonnerstag, 12. Mai 2011

Page 52: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Donnerstag, 12. Mai 2011

Page 53: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Donnerstag, 12. Mai 2011

Page 54: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Donnerstag, 12. Mai 2011

Page 56: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

SproutCore

Donnerstag, 12. Mai 2011

Page 57: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

Donnerstag, 12. Mai 2011

Page 58: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS

Donnerstag, 12. Mai 2011

Page 59: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS• Partly inspired by Apple’s Cocoa framework

Donnerstag, 12. Mai 2011

Page 60: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS• Partly inspired by Apple’s Cocoa framework• Partly inspired by Ruby on Rails

Donnerstag, 12. Mai 2011

Page 61: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS• Partly inspired by Apple’s Cocoa framework• Partly inspired by Ruby on Rails• Usable for desktop-ish AND "classic" applications

Donnerstag, 12. Mai 2011

Page 62: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS• Partly inspired by Apple’s Cocoa framework• Partly inspired by Ruby on Rails• Usable for desktop-ish AND "classic" applications• Touch & mobile support built-in

Donnerstag, 12. Mai 2011

Page 63: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Intro

1/10

• Straight JavaScript, HTML, CSS• Partly inspired by Apple’s Cocoa framework• Partly inspired by Ruby on Rails• Usable for desktop-ish AND "classic" applications• Touch & mobile support built-in• http://sproutcore.com

Donnerstag, 12. Mai 2011

Page 64: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Installation

2/10

Donnerstag, 12. Mai 2011

Page 65: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Installation

2/10

• gem install sproutcore

Donnerstag, 12. Mai 2011

Page 66: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Installation

2/10

• gem install sproutcore• gem install sproutcore --pre (to get the latest beta)

Donnerstag, 12. Mai 2011

Page 67: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Installation

2/10

• gem install sproutcore• gem install sproutcore --pre (to get the latest beta)• Installer from http://www.sproutcore.com

Donnerstag, 12. Mai 2011

Page 68: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

Donnerstag, 12. Mai 2011

Page 69: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

• sc-init my_awesome_app

Donnerstag, 12. Mai 2011

Page 70: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

• sc-init my_awesome_app• cd my_awesome_app

Donnerstag, 12. Mai 2011

Page 71: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

• sc-init my_awesome_app• cd my_awesome_app• Run sc-server

Donnerstag, 12. Mai 2011

Page 72: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

• sc-init my_awesome_app• cd my_awesome_app• Run sc-server• Open http://localhost:4020

Donnerstag, 12. Mai 2011

Page 73: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

New Project

3/10

• sc-init my_awesome_app• cd my_awesome_app• Run sc-server• Open http://localhost:4020

Donnerstag, 12. Mai 2011

Page 74: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

Donnerstag, 12. Mai 2011

Page 75: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Edit the UI

4/10

Donnerstag, 12. Mai 2011

Page 76: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

image from apple.com

Donnerstag, 12. Mai 2011

Page 77: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

Donnerstag, 12. Mai 2011

Page 78: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

Donnerstag, 12. Mai 2011

Page 79: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

Donnerstag, 12. Mai 2011

Page 80: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

Donnerstag, 12. Mai 2011

Page 81: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Hook Up UI

5/10

Donnerstag, 12. Mai 2011

Page 82: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Templates

6/10

image from sproutcore.com

Donnerstag, 12. Mai 2011

Page 83: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Templates

6/10

image from apple.com

http://guides.sproutcore.com/getting_started.html

Donnerstag, 12. Mai 2011

Page 84: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Donnerstag, 12. Mai 2011

Page 85: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Touch

Donnerstag, 12. Mai 2011

Page 86: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Touch Modules

Donnerstag, 12. Mai 2011

Page 87: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Touch Modules

DataStore

Donnerstag, 12. Mai 2011

Page 88: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Advanced Features

7/10

www.botanicalgarden.ubc.ca

Touch Modules

ThemesDataStore

Donnerstag, 12. Mai 2011

Page 89: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Testing

8/10

Donnerstag, 12. Mai 2011

Page 90: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Deployment

9/10

1. Run sc-build -rc my_awesome_app2. Copy everything to any server, it's just static files3. Or use the strobe gem (http://strobecorp.com)

Donnerstag, 12. Mai 2011

Page 91: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

License

10/10

Donnerstag, 12. Mai 2011

Page 92: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

License

10/10

Donnerstag, 12. Mai 2011

Page 93: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Donnerstag, 12. Mai 2011

Page 94: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Donnerstag, 12. Mai 2011

Page 95: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

http://bit.ly/jsconf-sc

Donnerstag, 12. Mai 2011

Page 96: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

starstwins.com

or ?

Donnerstag, 12. Mai 2011

Page 97: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

CAPPUCCINO OR SPROUTCORE?

NEITHER, USE FLASH!by Bubbachrissy

Donnerstag, 12. Mai 2011

Page 98: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

"@jtaby @me1000 says @cappuccino is so much better than @sproutcore. Is that true?"

"@me1000 @jtaby says @sproutcore is so much better than @cappuccino. Is that true?"

FUN!

Majd (@jtaby) Randy (@me1000)

Donnerstag, 12. Mai 2011

Page 99: JSConf.it 2011: A Wondrous Experience of Sound, Light, and Code

Grazie mille!

@jfahrenkrugJohannesFahrenkrugspringenwerk.com

Donnerstag, 12. Mai 2011