Cappuccino - SDRuby 2009-08-06

1,096 views

Published on

Intro to the Cappuccino web framework (http://cappuccino.org)

Embedded version:
http://280slides.com/Viewer/?user=2167&name=sdruby-cappuccino&fullscreen

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,096
On SlideShare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
20
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Cappuccino - SDRuby 2009-08-06

  1. 1. Cappuccino<br />Brian Chapados<br />http://chapados.org<br />http://github.com/chapados<br />@chapados<br />SDRuby<br />August 6, 2009<br />
  2. 2. What is it?<br />&quot;Cappuccino is an open source application framework for developing applications that look and feel like the desktop software users are familiar with.&quot;<br />http://cappuccino.org/learn/<br />
  3. 3. Who made this?<br />http://280north.com<br />used framework to build:<br />http://280slides.com<br />
  4. 4. What is it?<br />http://280slides.com/Editor<br />
  5. 5. The Cappuccino Way<br />build web apps, notweb sites<br />
  6. 6.
  7. 7. The Cappuccino Way<br />All or nothing...<br />designed explicitly to build web applications from the ground up<br /><ul><li>no HTML
  8. 8. no CSS
  9. 9. no DOM manipulation
  10. 10. support for all major browsers</li></li></ul><li>Language: Objective-J<br />Objective-J<br /><ul><li>One language, one API
  11. 11. Superset of javascript
  12. 12. use javascript if you need it
  13. 13. tools for building, compiling to JS, bundling resources for distribution/deployment </li></li></ul><li>Framework: Cappuccino<br />Cappuccino<br /><ul><li>Cocoa-esque API
  14. 14. Battle-tested patterns for building desktop apps</li></li></ul><li>install (StarterKit)<br />http://cappuccino.org/download/<br />
  15. 15. install (github)<br />git clone git://github.com/280north/cappuccino.git<br />rake release<br />rake debug<br />rake install<br />
  16. 16. capp: setup an app<br />capp gen -f my-new-app<br />Generates a new app in<br />my-new-app<br />Info.plist<br />Resources<br />Rakefile<br />Frameworks<br />main.j<br />AppController.j<br />index.html<br />index-debug.html<br />
  17. 17. Demo pubmed app<br />
  18. 18. Common patterns<br /><ul><li>target -> action
  19. 19. delegation (instead of subclassing)
  20. 20. Model-View-Controller</li></li></ul><li>Target : Action<br />var searchButton = [CPButton buttonWithTitle:&quot;go&quot;];<br />[searchButton setAction:@selector(performSearch:)];<br />[searchButton setTarget:nil];<br />@selector() a way to encode a method name in a variable<br />target = nil<br />Search chain for a responder<br />... define perform search method<br />- (void)performSearch:(id)sender {<br /> // do search here<br />}<br />
  21. 21. Delegation<br />[_searchCollectionView setDelegate:self];<br />object &quot;self&quot; will respond to delegate messages<br />define desgined methods in the delegate class<br />// search history (CPCollectionView) delegate methods - (void)collectionViewDidChangeSelection:<br />(CPCollectionView)collectionView {<br /> // do something in response to selection change<br />}<br />
  22. 22. MVC<br />Controller<br />@implementation AppController : CPObject<br />{<br />PMSearch currentSearch;<br />CPCollectionView _searchCollectionView;<br />}<br />model<br />view<br />
  23. 23. MVC<br />Controller<br />@implementation AppController : CPObject<br />{<br />PMSearch currentSearch;<br />CPCollectionView _searchCollectionView;<br />}<br />model<br />view<br />
  24. 24. Learn More<br /><ul><li>http://cappuccino.org/learn
  25. 25. cappuccino mailing list (google groups)
  26. 26. http://cappuccinocasts.com/
  27. 27. example apps:
  28. 28. http://cappuccino.org/learn/demos/</li></li></ul><li>Cocoa books<br /><ul><li>Cocoa Programming for Mac OSX (3rd edition) - Hillegass
  29. 29. Apple's Cocoa Documentation</li></ul>In many cases, replace &quot;NS&quot; with &quot;CP&quot;<br />it works the same way<br />

×