Introduction to Cappuccino

3,148 views
3,088 views

Published on

Introduction to the Cappuccino web application framework from 280 North.

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

  • Be the first to like this

No Downloads
Views
Total views
3,148
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
46
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to Cappuccino

  1. 1. Intro to Cappuccino jason harwig
  2. 2. [cappuccino description] • Open source (LGPL2) • Client side (BYOBE) • Web application Framework
  3. 3. [cappuccino background]
  4. 4. Extending JavaScript
  5. 5. • Classical Inheritance • Imports • No Compilation step (GWT)
  6. 6. Prototype, Jquery, Dojo extend without new syntax
  7. 7. var Animal = Class.create({ initialize: function(name, sound) { this.name = name; this.sound = sound; }, speak: function() { alert(this.name + quot; says: quot; + this.sound + quot;!quot;); } });
  8. 8. ES4, JS 2 Syntax
  9. 9. class C extends B { function C(m) { mem = m } public function getmem() { return mem } private var mem : Object };
  10. 10. Extend a language without breaking legacy/future scripts? create a superset of JavaScript
  11. 11. Look to History Objective-C
  12. 12. Objective-J superset of JavaScript
  13. 13. Objective-J Implementation
  14. 14. Obj ective-J Ja vaScript Object ive-J File Prep rocessor
  15. 15. -J File • Valid JavaScript is valid Objective-J Objective • Syntax resembled Objective-C
  16. 16. import <Foundation/CPObject.j> @implementation Animal : CPObject { CPString name; CPString sound; } - (void)speak { alert(name + quot; says: quot; + sound + quot;!quot;); }
  17. 17. • Written in JavaScript ive-J Object • No Plugin Required • No Compile Step P repro cessor
  18. 18. Language Features
  19. 19. @import quot;MyClass.jquot; ...
  20. 20. No Memory Management
  21. 21. Categories
  22. 22. import <Foundation/CPString.j> @implementation CPString (Reversing) - (CPString)reverse { var reversedString = quot;quot;, index = [self length]; while(index--) reversedString += [self characterAtIndex: index]; return reversedString; } @end
  23. 23. Static Variables
  24. 24. Cappuccino Cocoa Framework implemented in Objective-J
  25. 25. quot;Cappuccino is designed for applications, not web pages.quot; - cappuccino.org
  26. 26. Goodbye HTML, CSS, DOM
  27. 27. Hello Cocoa for the web
  28. 28. NSTex tField CPTe xtField
  29. 29. CAAnimation CPDocument CPMutableArray CPString CABasicAnimation CPDocumentController CPMutableIndexSet CPTabView CAFlashLayer CPDOMDisplayServer CPNinePartImage CPTabViewItem CALayer CPDOMWindowBridge CPNotification CPTextField CAMediaTimingFunction CPDOMWindowLayer CPNotificationCenter CPThreePartImage CAPropertyAnimation CPEnumerator CPNull CPToolbar CPAnimation CPEvent CPNumber CPToolbarItem CPApplication CPException CPObject CPUndoManager CPArray CPFlashMovie CPPanel CPURLConnection CPArray CPFlashView CPPasteboard CPURLRequest CPBundle CPFont CPPopUpButton CPURLResponse CPButton CPFontManager CPProgressIndicator CPUserSessionManager CPClipView CPGraphicsContext CPPropertyListSerialization CPValue CPCoder CPHTTPURLResponse CPResponder CPView CPCollectionView CPImage CPRunLoop CPWebScriptObject CPCollectionViewItem CPImageView CPScroller CPWebView CPColorPanel CPIndexSet CPScrollView CPWindow CPColorPicker CPIndexSet CPSecureTextField CPWindowController CPColorWell CPInvocation CPSegmentedControl CPColorWheelColorPicker CPJSONPConnection CPShadow CPControl CPKeyedArchiver CPShadowView CPCookie CPKeyedUnarchiver CPSlider CPData CPKulerColorPicker CPSliderColorPicker CPDate CPMenu CPSortDescriptor CPDictionary CPMenuItem CPSplitView
  30. 30. Application Structure
  31. 31. AppController.j AppKit Frameworks Foundation NewApplication index.html Objective-J Info.plist main.j
  32. 32. Cappuccino Starter
  33. 33. Lights Off
  34. 34. Build Tools Steam Press Bake
  35. 35. • Manage the build proces • Create application S team • Compile application for release
  36. 36. • Code optimizer Press • Combine into on js
  37. 37. • Like Rails Capistrano Bake • Atomic releases
  38. 38. Further Research • NIB2CIB - User Interface Builder github.com/280north/cappuccino/wikis/nib2cib • Cappucchino Documentation, Tutorials, Demos cappuccino.org

×