Date post: | 11-May-2015 |
Category: |
Design |
Upload: | lukashurych |
View: | 1,676 times |
Download: | 0 times |
Preparing Cappuccino in 30 minutes
Lukáš Hurych
Objective-JCappuccino
Objective-J and Cappuccino
• Web applications
• Not for websites
• Similar to Objective-C (differences => JS)
• It’s just JavaScript with OO addition
• To make better programming language from JavaScript, add what’s missing (robust apps)
• Classes (inheritance), file import
Objective-J and Cappuccino
• Developed with Cappuccino framework
• Objective-C + Cocoa; Objective-J + Cappuccino
• No need to compile (but you can)
• No need any plug-ins
• Flash, Silverlight
• Native javascript (not halting system)
Objective-J and Cappuccino
• Develop desktop-like applications on web
• Basic UI - part of Cappuccino (eg. extJS)
Objective-J and Cappuccino
• All application logic on Objective-J (JavaScript) side
• Back-end - send/accept data (JSON)
What you can do?
• http://gomockingbird.com/
• http://280slides.com/
• http://githubissues.heroku.com/
Code
Classes
@import “CPObject.j” //basic class
@implementation Person : CPObject{CPString name;}
//methods
@end
Methods
- (void)setName:(CPString)aName{name = aName;}
- (CPString)name{return name;}
Methods
- (void)setJobTitle:(CPString)aJobTitlecompany:(CPString)aCompany{//body of method}
- (void)setJobTitle:(CPString)aJobTitle company:(CPString)aCompany{//body of method}
[person setJobtitle:”developer” company:”abdoc”];
Methods
var person = [[Person alloc] init];//chain[myPerson setName:”Lukáš”];
moveToBeginningOfSentenceAndModifySelection: //chatty cocoa
Methods
+ (id)personWithName:(CPString)aName{return [[self alloc] initWithName:aName];}
Development Environment
How to get started quickly with Cappuccino?
• Starter kit
• http://cappuccino.org/download/
Which platform?
• Ideal development on Mac OS X or Linux
• Cygwin on Windows
Preparing environment
• git clone git://github.com/280north/cappuccino
• gem install jake
• ./bootstrap.sh
• jake install
• export CAPP_BUILD=/Users/profile/cappuccino/build
• try: capp gen Test
Preparing environment
• capp tool
• new project
• nib2cib
• Interface Builder
How to efficiently start with Cappuccino
• Learn, learn, learn is not the right way, ok?
• Do something!
• Play, play, play!
• http://cappuccino.org/
• http://wiki.github.com/280north/cappuccino/
• http://cappuccinocasts.com/
How to efficiently start with Cappuccino
• Official documentation is not so good..
• http://cappuccino.org/learn/documentation/
• App for mac - CappKiDo
How to efficiently start with Cappuccino
• http://www.nice-panorama.com/Programmation/cappuccino/
• http://prejit.cz/6e
• http://www.springenwerk.com/2009/09/real-life-cappuccino-tutorial-part-1.html
• http://prejit.cz/6f
What to avoid?
• Reading a lot of theory
• Do something, really!
• Most common mistakes
• http://stackoverflow.com/
Live coding
Live coding
•What about simple todolist?
Any questions?
•Don’t hesitate to ask!