Preparing Cappuccino in 30 minutes <ul><li>Lukáš Hurych </li></ul>
Objective-J Cappuccino Cappuccino
Objective-J and Cappuccino <ul><li>Web applications </li></ul><ul><li>Not for websites </li></ul><ul><li>Similar to Object...
Objective-J and Cappuccino <ul><li>Developed with Cappuccino framework </li></ul><ul><ul><li>Objective-C + Cocoa; Objectiv...
Objective-J and Cappuccino <ul><li>Develop desktop-like applications on web </li></ul><ul><li>Basic UI - part of Cappuccin...
 
Objective-J and Cappuccino <ul><li>All application logic on Objective-J (JavaScript) side </li></ul><ul><li>Back-end - sen...
What you can do? <ul><li>http://gomockingbird.com/ </li></ul><ul><li>http://280slides.com/ </li></ul><ul><li>http://github...
Code
Classes <ul><li>@import “CPObject.j”  //basic class </li></ul><ul><li>@implementation Person : CPObject </li></ul><ul><li>...
Methods <ul><li>- (void)setName:(CPString)aName </li></ul><ul><li>{ </li></ul><ul><ul><li>name = aName; </li></ul></ul><ul...
Methods <ul><li>- (void)setJobTitle:(CPString)aJobTitle </li></ul><ul><ul><ul><li>company:(CPString)aCompany </li></ul></u...
Methods var person = [[Person alloc] init]; //chain [myPerson setName:”Lukáš”]; moveToBeginningOfSentenceAndModifySelectio...
Methods <ul><li>+ (id)personWithName:(CPString)aName </li></ul><ul><li>{ </li></ul><ul><ul><li>return [[self alloc] initWi...
Development Environment
How to get started quickly with Cappuccino? <ul><li>Starter kit </li></ul><ul><li>http://cappuccino.org/download/ </li></ul>
Which platform? <ul><li>Ideal development on Mac OS X or Linux </li></ul><ul><li>Cygwin on Windows </li></ul>
Preparing environment <ul><li>git clone git://github.com/280north/cappuccino </li></ul><ul><li>gem install jake </li></ul>...
Preparing environment <ul><li>capp tool </li></ul><ul><ul><li>new project </li></ul></ul><ul><li>nib2cib </li></ul><ul><ul...
How to efficiently start with Cappuccino <ul><li>Learn, learn, learn is not the right way, ok? </li></ul><ul><li>Do someth...
How to efficiently start with Cappuccino <ul><li>Official documentation is not so good.. </li></ul><ul><ul><li>http://capp...
How to efficiently start with Cappuccino <ul><li>http://www.nice-panorama.com/Programmation/cappuccino/ </li></ul><ul><ul>...
What to avoid? <ul><li>Reading a lot of theory </li></ul><ul><li>Do something, really! </li></ul><ul><li>Most common mista...
Live coding
Live coding <ul><li>What about simple todolist? </li></ul>
Any questions? <ul><li>Don’t hesitate to ask! </li></ul>
Lukáš Hurych <ul><li>web/mac developer </li></ul><ul><li>@LukasHurych </li></ul><ul><li>http://abdoc.net </li></ul><ul><li...
Upcoming SlideShare
Loading in...5
×

Preparing Cappuccino in 30 minutes

1,346

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,346
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
10
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • You can interrupt me - just ask me.. Introduction My feelings about this stuff - be honest Are you okay with informal asking? Say ‘ty’ Content - tell listeners that if there will be a little of time I will do a quick live coding example I’ll be showing some stuff live You’ve come here because you wanted to know how to develop desktop-like applications in web environment.. And..
  • Ask listeners if they know what is it.. Objective-J (if someone know what is it/someone code anything in it..) Cappuccino Objective-C Raise my hand too!
  • Basics: Objective-J =&gt; language Cappuccino =&gt; framework
  • Developed as a part of Cappuccino framework
  • Objective-C syntax When I first saw Objective-C syntax, it made me vomit.. But now I’m falling love with Cocoa.. :D
  • Describe every line: You’re telling that you are making an implementation of class Person that inherits from basic class CPObject
  • Setters and getter Describe each block -/+ data type method data type argument
  • Again describe two part of this method - name and first parameter Messaging - smalltalk! On the last line we’re sending a message to object person
  • You’re reading method name as a normal sentence eg. Cocoa example
  • + is for class methods - static - is for object methods In this example you’re creating static method that’ll alloc a new object itself
  • Show download link on cappuccino.org page You just download the kit, unarchive it and you can develop your fist application Describe the most important things that are included in this package
  • It’s possible on windows, but it sux!
  • Show just beginning of installation Jake - modified Rake tool - compiling cappuccino git clone cappuccino, sudo gem install jake, download starter, sh bootstrap.sh, restart terminal, jake install, export CAPP_BUILD, capp gen Test -l
  • Show generating new project, describe what it contains - files, folders, etc. If you know Xcode, you also know IB Show quick example with Interface Builder and nib2cib - button, textField, HUD window -&gt; after button click capp gen Test -t NibApplication
  • The best source of informations about Cappucino is definitely GitHub - wiki
  • Compare CPTableView in online documentation and in cappkido app
  • Really great source of inspiration
  • Preparing Cappuccino in 30 minutes

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

      Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

    ×