SlideShare una empresa de Scribd logo
1 de 36
Cappuccino
 An “awesome” web framework


               flickr.com/kubina
What is Cappuccino?
   Apart from a delicious beverage




flickr.com/longo
What is Cappuccino?
   Apart from a delicious beverage




                                     ๏ Objective-C style coding
                                     ๏ create desktop-like web apps
                                     ๏ No CSS, HTML or DOM
                                     ๏ No compilation
                                     ๏ No plugins required
                                     ๏ Runs client side
                                     ๏ AJAX calls to remote server
flickr.com/longo
Quick and dirty
      Let’s get cappuccino




      flickr.com/stinkiepinkie_infinity
Quick and dirty
                                          Let’s get cappuccino




๏ Go to cappuccino.org/starter
๏ Unzip the package
๏ Go to the NewApplication folder
๏ Open index.html to start
๏ Start developing!                       flickr.com/stinkiepinkie_infinity
flickr.com/digitalcolony




The folder structure
            Help, I can’t find my files...
flickr.com/digitalcolony

                                           ‣ AppFolder/
                                             ‣ Frameworks/
                                             ‣ Resources/
                                             - index.html
                                             - index-debug.html
                                             - Info.plist
                                             - main.j
                                             - AppController.j
The folder structure
            Help, I can’t find my files...
Objective-J
How to write some Cocoa like code


                 flickr.com/sondyaustin
user.setName(“Jake”);
‣ [user setName:”Jake”];

  user.setNameAndAge(“Jake”, 12];
‣ [user setName:”Jake” andAge:12];

  User.getList();
‣ [User list];
                                     Objective-J
                                     How to write some Cocoa like code


                                                      flickr.com/sondyaustin
flickr.com/cgc



Now let’s write a class
It’s like Cocoa, but different!
flickr.com/cgc



Now let’s write a class
                                       A Objective-J class
It’s like Cocoa, but different!
                                  @import <Foundation/CPObject.j>
                                  @import “... .j”
                                  @implement MyClass : CPObject
                                  {
                                      CPString objectString;
                                  }
                                  - (void)methodNameWithParam:(CPString)text
                                  { ... }
                                  + (void)staticMethod
                                  { ... }
                                  @end
flickr.com/cgc



Now let’s write a class
                                                       A Objective-J class
It’s like Cocoa, but different!
                                                  @import <Foundation/CPObject.j>
                                                  @import “... .j”
                                                  @implement MyClass : CPObject
                                                  {
                                                      CPString objectString;
                                                  }
                                                  - (void)methodNameWithParam:(CPString)text
                                                  { ... }

   Use an object and it’s methods                 + (void)staticMethod
          var object = [[MyClass alloc] init];    { ... }
          [object methodNameWithParam:”good!”];   @end
flickr.com/cgc



Now let’s write a class
                                                          A Objective-J class
It’s like Cocoa, but different!
                                                     @import <Foundation/CPObject.j>
                                                     @import “... .j”
                                       Accessors
 CPString objectString @accessors;                   @implement MyClass : CPObject
                                                     {
 - (void)setObjectString:(CPString)value {...}           CPString objectString;
 - (CPString)objectString { return objectString; }   }
                                                     - (void)methodNameWithParam:(CPString)text
                                                     { ... }

   Use an object and it’s methods                    + (void)staticMethod
          var object = [[MyClass alloc] init];       { ... }
          [object methodNameWithParam:”good!”];      @end
flickr.com/cgc



Now let’s write a class
It’s like Cocoa, but different!
flickr.com/cgc



Now let’s write a class                 Variables
                                  ...
It’s like Cocoa, but different!
                                  globalVariable = “global variable”
                                  var fileVariable = “file scoped variable”
                                  @implement MyClass : CPObject
                                  { CPString objectVariable; }
                                  - (void)method
                                  {
                                        objectVariable = “object variable”;
                                        var functionVariable = “function variable”;
                                        aNewGlobalVariable = “another global variable”;
                                  }
                                  @end
flickr.com/cgc



Now let’s write a class                                         Variables
                                                          ...
It’s like Cocoa, but different!
                                                          globalVariable = “global variable”
                                                          var fileVariable = “file scoped variable”
                                                          @implement MyClass : CPObject
                                                          { CPString objectVariable; }
                                                          - (void)method
                                             Categories
        @implementation CPString (MyImplementation)       {
        - (CPString)upper                                       objectVariable = “object variable”;
        {                                                       var functionVariable = “function variable”;
            return [self uppercaseString];                      aNewGlobalVariable = “another global variable”;
        }                                                 }
        @end                                              @end
flickr.com/jdebner



      Go and delegate!
You’re like the boss that delegates everything
flickr.com/jdebner



      Go and delegate!
You’re like the boss that delegates everything




                                                 ๏ Customize behavior without subclassing
                                                 ๏ Move event handling to other class
                                                 ๏ @selector to pass a method as a
                                                   parameter
flickr.com/jdebner



      Go and delegate!
You’re like the boss that delegates everything
flickr.com/jdebner



      Go and delegate!
You’re like the boss that delegates everything




                               Calling class that sets the delegate
                                  var request = [CPURLRequest requestWithURL:"http://www.fousa.be/articles.json"];
                                  [request setHTTPMethod:"GET"];
                                  connection = [CPURLConnection connectionWithRequest:request delegate:self];
flickr.com/jdebner



      Go and delegate!
You’re like the boss that delegates everything




                               Calling class that sets the delegate
                                  var request = [CPURLRequest requestWithURL:"http://www.fousa.be/articles.json"];
                                  [request setHTTPMethod:"GET"];
                                  connection = [CPURLConnection connectionWithRequest:request delegate:self];



                                The delegate class
                                  - (void)connection:(CPURLConnection)myConnection didReceiveData:(CPString)data

                                  - (void)connection:(CPURLConnection)connection didFailWithError:(CPString)error

                                  - (void)connectionDidFinishLoading:(CPURLConnection)connection
flickr.com/pandiyan




                     Where is my memory?
                               This is some weird shit...
flickr.com/pandiyan




                                     Where is my memory?
                                               This is some weird shit...




  ๏ Garbage collection
  ๏ No retain / release
  ๏ Common leaks are handled
  ๏ Still possible to leak objects
flickr.com/ianlloyd




                     The HTML
                       This is where it all begins
flickr.com/ianlloyd




                                                                                      The HTML
                                                                                               This is where it all begins




                                                                                     index.html
<head>
    <title>NewApplication</title>
    <script type = "text/javascript">
         OBJJ_MAIN_FILE = "main.j";
    </script>
    <script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script>
</head>
flickr.com/splatt




                       main.j
 This is where it all begins + 1
flickr.com/splatt
                                     @import <Foundation/Foundation.j>
                                     @import <AppKit/AppKit.j>
                                     @import "AppController.j"


                                     function main(args, namedArgs)
                                     {
                                         CPApplicationMain(args, namedArgs);
                                     }
                                   main.j




                       main.j
 This is where it all begins + 1
Our AppController
     This is where it all begins + 2


                     flickr.com/paulhami
@import <Foundation/CPObject.j>
@implementation AppController : CPObject
{
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
{
    // The first method to be called in your app
}
@end
                                                     AppController.j



                                                                       Our AppController
                                                                            This is where it all begins + 2


                                                                                            flickr.com/paulhami
flickr.com/ecstaticist




    Ruby on Rails
     YES, they match!
flickr.com/ecstaticist
                        ๏ Communicate through AJAX calls
                        ๏ Data exchange with JSON




    Ruby on Rails
     YES, they match!
flickr.com/ecstaticist
                        ๏ Communicate through AJAX calls
                        ๏ Data exchange with JSON




                        Your controller
                           def index
                            @articles = Article.all
                            respond_to do |format|
    Ruby on Rails            format.json { :render :json =>
     YES, they match!        @articles }
                            end
                           end
flickr.com/pelesfury




The end
 I’m in love
flickr.com/pelesfury
๏ Cocoa like development
๏ Layer on top of your website
๏ Mac OS X like web applications




                                   The end
                                    I’m in love
flickr.com/jcarlosn




     References
So you can see I’m not making this up!
flickr.com/jcarlosn




          References
     So you can see I’m not making this up!




๏ cappuccino.org
๏ 280atlas.com
๏ 280slides.com
๏ cappuccinocasts.com
๏ documentation

Más contenido relacionado

La actualidad más candente

Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptForziatech
 
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...Akhil Mittal
 
An Introduction to JavaScript
An Introduction to JavaScriptAn Introduction to JavaScript
An Introduction to JavaScripttonyh1
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorialDoeun KOCH
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done RightMariusz Nowak
 
Java script Techniques Part I
Java script Techniques Part IJava script Techniques Part I
Java script Techniques Part ILuis Atencio
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascriptDoeun KOCH
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJWORKS powered by Ordina
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsRan Mizrahi
 
Metaprogramming in JavaScript
Metaprogramming in JavaScriptMetaprogramming in JavaScript
Metaprogramming in JavaScriptMehdi Valikhani
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Ran Mizrahi
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJamshid Hashimi
 

La actualidad más candente (18)

Javascript
JavascriptJavascript
Javascript
 
Object Oriented Programming In JavaScript
Object Oriented Programming In JavaScriptObject Oriented Programming In JavaScript
Object Oriented Programming In JavaScript
 
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...
Diving in OOP (Day 3): Polymorphism and Inheritance (Dynamic Binding/Run Time...
 
An Introduction to JavaScript
An Introduction to JavaScriptAn Introduction to JavaScript
An Introduction to JavaScript
 
Java script tutorial
Java script tutorialJava script tutorial
Java script tutorial
 
JavaScript Modules Done Right
JavaScript Modules Done RightJavaScript Modules Done Right
JavaScript Modules Done Right
 
Java script Techniques Part I
Java script Techniques Part IJava script Techniques Part I
Java script Techniques Part I
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
 
JavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UXJavaScript Basics and Best Practices - CC FE & UX
JavaScript Basics and Best Practices - CC FE & UX
 
WEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScriptWEB TECHNOLOGIES JavaScript
WEB TECHNOLOGIES JavaScript
 
Object Oriented Javascript
Object Oriented JavascriptObject Oriented Javascript
Object Oriented Javascript
 
How AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design PatternsHow AngularJS Embraced Traditional Design Patterns
How AngularJS Embraced Traditional Design Patterns
 
Metaprogramming in JavaScript
Metaprogramming in JavaScriptMetaprogramming in JavaScript
Metaprogramming in JavaScript
 
Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)Intro to node.js - Ran Mizrahi (28/8/14)
Intro to node.js - Ran Mizrahi (28/8/14)
 
JavaScript Core
JavaScript CoreJavaScript Core
JavaScript Core
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQuery
 
JavaScript OOPs
JavaScript OOPsJavaScript OOPs
JavaScript OOPs
 
Java Script Best Practices
Java Script Best PracticesJava Script Best Practices
Java Script Best Practices
 

Similar a Cappuccino

Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkAndreas Korth
 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web KitNokiaAppForum
 
Meet Elcodi, the flexible e-commerce components built on Symfony2
Meet Elcodi, the flexible e-commerce components built on Symfony2Meet Elcodi, the flexible e-commerce components built on Symfony2
Meet Elcodi, the flexible e-commerce components built on Symfony2Aldo Chiecchia
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript WidgetsKonstantin Käfer
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overviewFantageek
 
Brew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoBrew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoHoward Lewis Ship
 
Migrating Babel from CommonJS to ESM
Migrating Babel     from CommonJS to ESMMigrating Babel     from CommonJS to ESM
Migrating Babel from CommonJS to ESMIgalia
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScriptDonald Sipe
 
Best Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIBest Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIICS
 
Cocoa for Web Developers
Cocoa for Web DevelopersCocoa for Web Developers
Cocoa for Web Developersgeorgebrock
 
Working with Cocoa and Objective-C
Working with Cocoa and Objective-CWorking with Cocoa and Objective-C
Working with Cocoa and Objective-CKazunobu Tasaka
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftOleksandr Stepanov
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to JavascriptAmit Tyagi
 
Objective C 基本介紹
Objective C 基本介紹Objective C 基本介紹
Objective C 基本介紹Giga Cheng
 
Swift - One step forward from Obj-C
Swift -  One step forward from Obj-CSwift -  One step forward from Obj-C
Swift - One step forward from Obj-CNissan Tsafrir
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IICS
 

Similar a Cappuccino (20)

Cappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application FrameworkCappuccino - A Javascript Application Framework
Cappuccino - A Javascript Application Framework
 
Parte II Objective C
Parte II   Objective CParte II   Objective C
Parte II Objective C
 
Petri Niemi Qt Web Kit
Petri Niemi Qt Web KitPetri Niemi Qt Web Kit
Petri Niemi Qt Web Kit
 
Meet Elcodi, the flexible e-commerce components built on Symfony2
Meet Elcodi, the flexible e-commerce components built on Symfony2Meet Elcodi, the flexible e-commerce components built on Symfony2
Meet Elcodi, the flexible e-commerce components built on Symfony2
 
Developing JavaScript Widgets
Developing JavaScript WidgetsDeveloping JavaScript Widgets
Developing JavaScript Widgets
 
Objective-C Runtime overview
Objective-C Runtime overviewObjective-C Runtime overview
Objective-C Runtime overview
 
Brew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with CappuccinoBrew up a Rich Web Application with Cappuccino
Brew up a Rich Web Application with Cappuccino
 
iOS API Design
iOS API DesigniOS API Design
iOS API Design
 
Migrating Babel from CommonJS to ESM
Migrating Babel     from CommonJS to ESMMigrating Babel     from CommonJS to ESM
Migrating Babel from CommonJS to ESM
 
Object Oriented JavaScript
Object Oriented JavaScriptObject Oriented JavaScript
Object Oriented JavaScript
 
Javascript
JavascriptJavascript
Javascript
 
Best Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part IIIBest Practices in Qt Quick/QML - Part III
Best Practices in Qt Quick/QML - Part III
 
Cocoa for Web Developers
Cocoa for Web DevelopersCocoa for Web Developers
Cocoa for Web Developers
 
Working with Cocoa and Objective-C
Working with Cocoa and Objective-CWorking with Cocoa and Objective-C
Working with Cocoa and Objective-C
 
Protocol-Oriented Programming in Swift
Protocol-Oriented Programming in SwiftProtocol-Oriented Programming in Swift
Protocol-Oriented Programming in Swift
 
Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
 
jQuery Objects
jQuery ObjectsjQuery Objects
jQuery Objects
 
Objective C 基本介紹
Objective C 基本介紹Objective C 基本介紹
Objective C 基本介紹
 
Swift - One step forward from Obj-C
Swift -  One step forward from Obj-CSwift -  One step forward from Obj-C
Swift - One step forward from Obj-C
 
Best Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part IBest Practices in Qt Quick/QML - Part I
Best Practices in Qt Quick/QML - Part I
 

Último

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Cappuccino

  • 1. Cappuccino An “awesome” web framework flickr.com/kubina
  • 2. What is Cappuccino? Apart from a delicious beverage flickr.com/longo
  • 3. What is Cappuccino? Apart from a delicious beverage ๏ Objective-C style coding ๏ create desktop-like web apps ๏ No CSS, HTML or DOM ๏ No compilation ๏ No plugins required ๏ Runs client side ๏ AJAX calls to remote server flickr.com/longo
  • 4. Quick and dirty Let’s get cappuccino flickr.com/stinkiepinkie_infinity
  • 5. Quick and dirty Let’s get cappuccino ๏ Go to cappuccino.org/starter ๏ Unzip the package ๏ Go to the NewApplication folder ๏ Open index.html to start ๏ Start developing! flickr.com/stinkiepinkie_infinity
  • 6. flickr.com/digitalcolony The folder structure Help, I can’t find my files...
  • 7. flickr.com/digitalcolony ‣ AppFolder/ ‣ Frameworks/ ‣ Resources/ - index.html - index-debug.html - Info.plist - main.j - AppController.j The folder structure Help, I can’t find my files...
  • 8. Objective-J How to write some Cocoa like code flickr.com/sondyaustin
  • 9. user.setName(“Jake”); ‣ [user setName:”Jake”]; user.setNameAndAge(“Jake”, 12]; ‣ [user setName:”Jake” andAge:12]; User.getList(); ‣ [User list]; Objective-J How to write some Cocoa like code flickr.com/sondyaustin
  • 10. flickr.com/cgc Now let’s write a class It’s like Cocoa, but different!
  • 11. flickr.com/cgc Now let’s write a class A Objective-J class It’s like Cocoa, but different! @import <Foundation/CPObject.j> @import “... .j” @implement MyClass : CPObject { CPString objectString; } - (void)methodNameWithParam:(CPString)text { ... } + (void)staticMethod { ... } @end
  • 12. flickr.com/cgc Now let’s write a class A Objective-J class It’s like Cocoa, but different! @import <Foundation/CPObject.j> @import “... .j” @implement MyClass : CPObject { CPString objectString; } - (void)methodNameWithParam:(CPString)text { ... } Use an object and it’s methods + (void)staticMethod var object = [[MyClass alloc] init]; { ... } [object methodNameWithParam:”good!”]; @end
  • 13. flickr.com/cgc Now let’s write a class A Objective-J class It’s like Cocoa, but different! @import <Foundation/CPObject.j> @import “... .j” Accessors CPString objectString @accessors; @implement MyClass : CPObject { - (void)setObjectString:(CPString)value {...} CPString objectString; - (CPString)objectString { return objectString; } } - (void)methodNameWithParam:(CPString)text { ... } Use an object and it’s methods + (void)staticMethod var object = [[MyClass alloc] init]; { ... } [object methodNameWithParam:”good!”]; @end
  • 14. flickr.com/cgc Now let’s write a class It’s like Cocoa, but different!
  • 15. flickr.com/cgc Now let’s write a class Variables ... It’s like Cocoa, but different! globalVariable = “global variable” var fileVariable = “file scoped variable” @implement MyClass : CPObject { CPString objectVariable; } - (void)method { objectVariable = “object variable”; var functionVariable = “function variable”; aNewGlobalVariable = “another global variable”; } @end
  • 16. flickr.com/cgc Now let’s write a class Variables ... It’s like Cocoa, but different! globalVariable = “global variable” var fileVariable = “file scoped variable” @implement MyClass : CPObject { CPString objectVariable; } - (void)method Categories @implementation CPString (MyImplementation) { - (CPString)upper objectVariable = “object variable”; { var functionVariable = “function variable”; return [self uppercaseString]; aNewGlobalVariable = “another global variable”; } } @end @end
  • 17. flickr.com/jdebner Go and delegate! You’re like the boss that delegates everything
  • 18. flickr.com/jdebner Go and delegate! You’re like the boss that delegates everything ๏ Customize behavior without subclassing ๏ Move event handling to other class ๏ @selector to pass a method as a parameter
  • 19. flickr.com/jdebner Go and delegate! You’re like the boss that delegates everything
  • 20. flickr.com/jdebner Go and delegate! You’re like the boss that delegates everything Calling class that sets the delegate var request = [CPURLRequest requestWithURL:"http://www.fousa.be/articles.json"]; [request setHTTPMethod:"GET"]; connection = [CPURLConnection connectionWithRequest:request delegate:self];
  • 21. flickr.com/jdebner Go and delegate! You’re like the boss that delegates everything Calling class that sets the delegate var request = [CPURLRequest requestWithURL:"http://www.fousa.be/articles.json"]; [request setHTTPMethod:"GET"]; connection = [CPURLConnection connectionWithRequest:request delegate:self]; The delegate class - (void)connection:(CPURLConnection)myConnection didReceiveData:(CPString)data - (void)connection:(CPURLConnection)connection didFailWithError:(CPString)error - (void)connectionDidFinishLoading:(CPURLConnection)connection
  • 22. flickr.com/pandiyan Where is my memory? This is some weird shit...
  • 23. flickr.com/pandiyan Where is my memory? This is some weird shit... ๏ Garbage collection ๏ No retain / release ๏ Common leaks are handled ๏ Still possible to leak objects
  • 24. flickr.com/ianlloyd The HTML This is where it all begins
  • 25. flickr.com/ianlloyd The HTML This is where it all begins index.html <head> <title>NewApplication</title> <script type = "text/javascript"> OBJJ_MAIN_FILE = "main.j"; </script> <script src = "Frameworks/Objective-J/Objective-J.js" type = "text/javascript"></script> </head>
  • 26. flickr.com/splatt main.j This is where it all begins + 1
  • 27. flickr.com/splatt @import <Foundation/Foundation.j> @import <AppKit/AppKit.j> @import "AppController.j" function main(args, namedArgs) { CPApplicationMain(args, namedArgs); } main.j main.j This is where it all begins + 1
  • 28. Our AppController This is where it all begins + 2 flickr.com/paulhami
  • 29. @import <Foundation/CPObject.j> @implementation AppController : CPObject { } - (void)applicationDidFinishLaunching:(CPNotification)aNotification { // The first method to be called in your app } @end AppController.j Our AppController This is where it all begins + 2 flickr.com/paulhami
  • 30. flickr.com/ecstaticist Ruby on Rails YES, they match!
  • 31. flickr.com/ecstaticist ๏ Communicate through AJAX calls ๏ Data exchange with JSON Ruby on Rails YES, they match!
  • 32. flickr.com/ecstaticist ๏ Communicate through AJAX calls ๏ Data exchange with JSON Your controller def index @articles = Article.all respond_to do |format| Ruby on Rails format.json { :render :json => YES, they match! @articles } end end
  • 34. flickr.com/pelesfury ๏ Cocoa like development ๏ Layer on top of your website ๏ Mac OS X like web applications The end I’m in love
  • 35. flickr.com/jcarlosn References So you can see I’m not making this up!
  • 36. flickr.com/jcarlosn References So you can see I’m not making this up! ๏ cappuccino.org ๏ 280atlas.com ๏ 280slides.com ๏ cappuccinocasts.com ๏ documentation