SlideShare une entreprise Scribd logo
1  sur  27
Smalltalk in the pocket
 Building applications for the iPhone
Disclaimer


  I’m very sorry, my english sucks... badly
             But I’ll do my best
Esteban Lorenzano

On 1994 G. Rossi teach me that Smalltalk was the
future.
  But future wasn’t here, so I worked in a lot of crap
Until 2007, where I, with two friends founded
Smallworks to work on the future promised
Where to start?
The iPhone

Why we want to use it?
Capabilities
  Think on i386
  RAM Memory growing (256M for 3GS)
  Just one thread at a time
Why Smalltalk?

Because we like it :)
Code fast and flexible
Get rid of that ugly compile cycle and memory
management issues
We can take benefict from the green threads of Pharo/
Squeak
Where do we stand?
 “Ad hoc” VM
 Objective-C bridge
 Some applications already in the AppleStore
   Look for “WikiServer” and “Fractions Calculator”, for
   instance

So, thanks John!
Our goal


  To provide a framework for programming
       the iPhone in a “Smalltalk way”
Deimos - Basics (1)

 “Some kind” MVC Framework
  Model: Anything you want
  View: a NIB file
  Controller: Deimos
Deimos - Basics (2)

 Uses external files
   You need to compile the “Ad hoc” VM each time
   This is because of the NIB files, mainly.
 Uses ObjectiveC bridge
Deimos - Creating a view (1)
 On Objective-C side
 Yes... you need to create the NIB files outside the
 smalltalk image
   Very important: use #tag property from UI widgets
     #tag is there for using it, so... is not so bad
     (althought I don’t like it)
Deimos - Creating a view (2)
 On Pharo side
 Extend DEView
   override #createViewDefinition and maybe
   #initializeContents
 Register for execution
Deimos - Access widgets
This is why the #tag property must be assigned: we
look for them recursively, as childs of an UIView
We wrap (and cache) all this UI widgets as equivallent
Deimos widgets
  You look for them just once
  You can interact with them as Smalltalk objects
Deimos - Event callbacks
 Once you mapped your widget, it is very simple
Deimos - Navigate views
 [#show:|#showModal:|push:]/#answer: circuit
   Yes, very similar to Seaside, I “borrowed” that
 #push: makes a show inside a navigation controller
 (that “flows” the views). Works only when views are
 inside a navigation.
Deimos - Internals (1)
Using contexts to handle window navigations
  So we can stack views and control behavior in a
  fashion way
Deimos - Internals (2)
 Announcements for handling events
   For internal use (e.g. #onAnswer:)
   Also provided for developers
     (yes, right now that means: me)
Deimos - Internals (3)
 Using one green thread for each:
   Delegate object
   Event callback
 This can be a problem in the future, but right now is
 working pretty cool
Deimos - Internals (4)
 Using WeakRegistry for disposing the not-used views
   A controversial solution (but working)
 Maybe we can use a “cached views solution” to get
 better performance, but it is still being studied.
Show time!
Problems found (1)
The “dead lock problem”
  Being worked on (by John... and my self testing)
Philosophical problem: how do I test this?
  Debugging is also a problem inside callbacks
Problems found (2)
Performance
  Not really an issue, but you have to take into account
  that you are programming for the iPhone
Image size
  Very tight to performace
Future
...a Sponsor, maybe?
Stabilization and optimization
call & return full cycle support
  I don’t like the #onAnswer: stuff...
  I don’t know how to do this, and even if possible, but I
  will try
Use bundles to avoid VM recompilation.
  Cool be nice, but I’m not sure about this point... I like
  more the next point
...far in the future
 Getting rid of NIB files, using a declarative style
   Lot of problems to solve (aquire images, for instance)
   But this will drive us back to full-smalltalk
   programming, so it worths the effort.
   Why not an iMagritte?
Why is called “Deimos”
It is not about greek/roman mythology
Is about “being around Mars”
  “...but that’s another story, and should be told
  another time” (Michael Ende, The Neverending Story)
Questions?
Thank you!
Esteban Lorenzano - estebanlm@smallworks.com.ar

Contenu connexe

Tendances

Smooth Animations for Web & Hybrid
Smooth Animations for Web & HybridSmooth Animations for Web & Hybrid
Smooth Animations for Web & HybridFITC
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme FrameworkJoe Casabona
 
This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.Masaki Komagata
 
Sinatra + Heroku
Sinatra + HerokuSinatra + Heroku
Sinatra + Herokulvrubygroup
 
Speed Up That Site! - a guide to caching plugins
Speed Up That Site! - a guide to caching pluginsSpeed Up That Site! - a guide to caching plugins
Speed Up That Site! - a guide to caching pluginsPeter Baylies
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful APISang Cù
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008geraldbauer
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineIrfan Maulana
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayEddie Kao
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentationsith33
 
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02careersblog
 
WebGL Camp 4 - A3 3D Engine
WebGL Camp 4 - A3 3D EngineWebGL Camp 4 - A3 3D Engine
WebGL Camp 4 - A3 3D Engineaerotwist
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)Rajat Pratap Singh
 
ZeroMQ at Oredev 2013
ZeroMQ at Oredev 2013ZeroMQ at Oredev 2013
ZeroMQ at Oredev 2013Ashic Mahtab
 
JRuby - The Best of Java and Ruby
JRuby - The Best of Java and RubyJRuby - The Best of Java and Ruby
JRuby - The Best of Java and RubyEvgeny Rahman
 

Tendances (20)

Phaser presentation
Phaser presentationPhaser presentation
Phaser presentation
 
Smooth Animations for Web & Hybrid
Smooth Animations for Web & HybridSmooth Animations for Web & Hybrid
Smooth Animations for Web & Hybrid
 
Introduction to Phaser.js
Introduction to Phaser.jsIntroduction to Phaser.js
Introduction to Phaser.js
 
Building a Simple Theme Framework
Building a Simple Theme FrameworkBuilding a Simple Theme Framework
Building a Simple Theme Framework
 
This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.This is presentation at Mitaka.rb #10.
This is presentation at Mitaka.rb #10.
 
Sinatra + Heroku
Sinatra + HerokuSinatra + Heroku
Sinatra + Heroku
 
Speed Up That Site! - a guide to caching plugins
Speed Up That Site! - a guide to caching pluginsSpeed Up That Site! - a guide to caching plugins
Speed Up That Site! - a guide to caching plugins
 
Nodejs - Building a RESTful API
Nodejs - Building a RESTful APINodejs - Building a RESTful API
Nodejs - Building a RESTful API
 
EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008EuRuKo JRuby Talk 2008
EuRuKo JRuby Talk 2008
 
Intro to EmberJS
Intro to EmberJSIntro to EmberJS
Intro to EmberJS
 
Nodeconf npm 2011
Nodeconf npm 2011Nodeconf npm 2011
Nodeconf npm 2011
 
Journey To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The MachineJourney To The Front End World - Part3 - The Machine
Journey To The Front End World - Part3 - The Machine
 
CoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-TuesdayCoffeeScript-Ruby-Tuesday
CoffeeScript-Ruby-Tuesday
 
Hello npm
Hello npmHello npm
Hello npm
 
HTML5 Video Presentation
HTML5 Video PresentationHTML5 Video Presentation
HTML5 Video Presentation
 
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
Jqueryforbeginnersjqueryconference2009 090914063709 Phpapp02
 
WebGL Camp 4 - A3 3D Engine
WebGL Camp 4 - A3 3D EngineWebGL Camp 4 - A3 3D Engine
WebGL Camp 4 - A3 3D Engine
 
Web development basics (Part-2)
Web development basics (Part-2)Web development basics (Part-2)
Web development basics (Part-2)
 
ZeroMQ at Oredev 2013
ZeroMQ at Oredev 2013ZeroMQ at Oredev 2013
ZeroMQ at Oredev 2013
 
JRuby - The Best of Java and Ruby
JRuby - The Best of Java and RubyJRuby - The Best of Java and Ruby
JRuby - The Best of Java and Ruby
 

En vedette

Archives in the Hadron Collider
Archives in the Hadron ColliderArchives in the Hadron Collider
Archives in the Hadron ColliderEuropeana
 
Europeana Publishing Framework (Concept) at Culture Jam
Europeana Publishing Framework (Concept) at Culture JamEuropeana Publishing Framework (Concept) at Culture Jam
Europeana Publishing Framework (Concept) at Culture JamEuropeana
 
110322 Social media för företag
110322 Social media för företag110322 Social media för företag
110322 Social media för företagPetter Kolseth
 
Comm 101 20121101_handout_version
Comm 101 20121101_handout_versionComm 101 20121101_handout_version
Comm 101 20121101_handout_versionPeter Thayer
 
Avaliação de métodos de Segmentação mediante algoritmos de Machine Learning
Avaliação de métodos de Segmentação mediante algoritmos de Machine LearningAvaliação de métodos de Segmentação mediante algoritmos de Machine Learning
Avaliação de métodos de Segmentação mediante algoritmos de Machine Learningtookumy
 
Impact workshop glasgow
Impact workshop glasgowImpact workshop glasgow
Impact workshop glasgowEuropeana
 
Networking Now & Personal Branding
Networking Now & Personal BrandingNetworking Now & Personal Branding
Networking Now & Personal BrandingPreston Lewis
 
Sistema solar per Marta i Carlota
Sistema solar  per Marta i CarlotaSistema solar  per Marta i Carlota
Sistema solar per Marta i Carlotajoanmolar
 
Kyocera FS-C-5030-N Operation Guide
Kyocera FS-C-5030-N Operation GuideKyocera FS-C-5030-N Operation Guide
Kyocera FS-C-5030-N Operation GuidePeter Thayer
 
Europeana cloud jun 2016
Europeana cloud jun 2016 Europeana cloud jun 2016
Europeana cloud jun 2016 Europeana
 
Masin De Epoca La Monaco Pt Blog
Masin De Epoca La Monaco  Pt BlogMasin De Epoca La Monaco  Pt Blog
Masin De Epoca La Monaco Pt Blogserbionel
 
Prehistoria 2
Prehistoria 2Prehistoria 2
Prehistoria 2joanmolar
 
Comics and the Storytelling Imperative
Comics and the Storytelling ImperativeComics and the Storytelling Imperative
Comics and the Storytelling ImperativeRyan Evans
 
PELÀEZ HERMANOS S.A
PELÀEZ HERMANOS S.APELÀEZ HERMANOS S.A
PELÀEZ HERMANOS S.Ajennynaranjo
 
Abel Gance & J'accuse: Cinematic Pacifism & Filmic Poetry
Abel Gance & J'accuse: Cinematic Pacifism & Filmic PoetryAbel Gance & J'accuse: Cinematic Pacifism & Filmic Poetry
Abel Gance & J'accuse: Cinematic Pacifism & Filmic PoetryRyan Evans
 

En vedette (20)

Archives in the Hadron Collider
Archives in the Hadron ColliderArchives in the Hadron Collider
Archives in the Hadron Collider
 
Europeana Publishing Framework (Concept) at Culture Jam
Europeana Publishing Framework (Concept) at Culture JamEuropeana Publishing Framework (Concept) at Culture Jam
Europeana Publishing Framework (Concept) at Culture Jam
 
5 keys for success!
5 keys for success!5 keys for success!
5 keys for success!
 
110322 Social media för företag
110322 Social media för företag110322 Social media för företag
110322 Social media för företag
 
Comm 101 20121101_handout_version
Comm 101 20121101_handout_versionComm 101 20121101_handout_version
Comm 101 20121101_handout_version
 
Avaliação de métodos de Segmentação mediante algoritmos de Machine Learning
Avaliação de métodos de Segmentação mediante algoritmos de Machine LearningAvaliação de métodos de Segmentação mediante algoritmos de Machine Learning
Avaliação de métodos de Segmentação mediante algoritmos de Machine Learning
 
Impact workshop glasgow
Impact workshop glasgowImpact workshop glasgow
Impact workshop glasgow
 
Networking Now & Personal Branding
Networking Now & Personal BrandingNetworking Now & Personal Branding
Networking Now & Personal Branding
 
Sistema solar per Marta i Carlota
Sistema solar  per Marta i CarlotaSistema solar  per Marta i Carlota
Sistema solar per Marta i Carlota
 
Kyocera FS-C-5030-N Operation Guide
Kyocera FS-C-5030-N Operation GuideKyocera FS-C-5030-N Operation Guide
Kyocera FS-C-5030-N Operation Guide
 
Europeana cloud jun 2016
Europeana cloud jun 2016 Europeana cloud jun 2016
Europeana cloud jun 2016
 
Pares p4
Pares p4Pares p4
Pares p4
 
Masin De Epoca La Monaco Pt Blog
Masin De Epoca La Monaco  Pt BlogMasin De Epoca La Monaco  Pt Blog
Masin De Epoca La Monaco Pt Blog
 
Prehistoria 2
Prehistoria 2Prehistoria 2
Prehistoria 2
 
Comics and the Storytelling Imperative
Comics and the Storytelling ImperativeComics and the Storytelling Imperative
Comics and the Storytelling Imperative
 
iBizLog - ESUG2010
iBizLog - ESUG2010iBizLog - ESUG2010
iBizLog - ESUG2010
 
PELÀEZ HERMANOS S.A
PELÀEZ HERMANOS S.APELÀEZ HERMANOS S.A
PELÀEZ HERMANOS S.A
 
Abel Gance & J'accuse: Cinematic Pacifism & Filmic Poetry
Abel Gance & J'accuse: Cinematic Pacifism & Filmic PoetryAbel Gance & J'accuse: Cinematic Pacifism & Filmic Poetry
Abel Gance & J'accuse: Cinematic Pacifism & Filmic Poetry
 
Reef - ESUG2011
Reef  - ESUG2011Reef  - ESUG2011
Reef - ESUG2011
 
Reef - ESUG 2010
Reef - ESUG 2010Reef - ESUG 2010
Reef - ESUG 2010
 

Similaire à Smalltalk in the pocket - Building applications for the iPhone

Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentDavid Catuhe
 
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di PriscoFwdays
 
Tales of Suckage and Awesomeness (Full Frontal 2012)
Tales of Suckage and Awesomeness (Full Frontal 2012)Tales of Suckage and Awesomeness (Full Frontal 2012)
Tales of Suckage and Awesomeness (Full Frontal 2012)Chris Wilson
 
PhoneGap by Dissection
PhoneGap by DissectionPhoneGap by Dissection
PhoneGap by DissectionDaniel_Rhodes
 
phonegapbydissection
phonegapbydissectionphonegapbydissection
phonegapbydissectionDaniel Rhodes
 
DevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sgDevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sgNicolas Mas
 
Prototyping in code
Prototyping in codePrototyping in code
Prototyping in codeMarcin Ignac
 
Designing Moblin For MIDs (with notes)
Designing Moblin For MIDs (with notes)Designing Moblin For MIDs (with notes)
Designing Moblin For MIDs (with notes)Nick Richards
 
Ten Lessons in Designing Content for Mobile
Ten Lessons in Designing Content for MobileTen Lessons in Designing Content for Mobile
Ten Lessons in Designing Content for MobileVicke Cheung
 
Visual Rhetoric March 25th
Visual Rhetoric March 25thVisual Rhetoric March 25th
Visual Rhetoric March 25thMiami University
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java ProgrammingKaty Allen
 
Docker experience @inbotapp
Docker experience @inbotappDocker experience @inbotapp
Docker experience @inbotappJilles van Gurp
 
What is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfWhat is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfShaiAlmog1
 
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian Heigl
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian HeiglOSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian Heigl
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian HeiglNETWAYS
 
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyone
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyoneOSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyone
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyoneNETWAYS
 
Embracing Uncertainty: Learning to Think Responsively
Embracing Uncertainty: Learning to Think ResponsivelyEmbracing Uncertainty: Learning to Think Responsively
Embracing Uncertainty: Learning to Think ResponsivelyChad Currie
 
Framer for the win - Using Framer prototypes for your app project. (For Melbo...
Framer for the win - Using Framer prototypes for your app project. (For Melbo...Framer for the win - Using Framer prototypes for your app project. (For Melbo...
Framer for the win - Using Framer prototypes for your app project. (For Melbo...Jinju Jang
 

Similaire à Smalltalk in the pocket - Building applications for the iPhone (20)

Postmortem of a uwp xaml application development
Postmortem of a uwp xaml application developmentPostmortem of a uwp xaml application development
Postmortem of a uwp xaml application development
 
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco"Leveraging the Event Loop for Blazing-Fast Applications!",  Michael Di Prisco
"Leveraging the Event Loop for Blazing-Fast Applications!", Michael Di Prisco
 
Tales of Suckage and Awesomeness (Full Frontal 2012)
Tales of Suckage and Awesomeness (Full Frontal 2012)Tales of Suckage and Awesomeness (Full Frontal 2012)
Tales of Suckage and Awesomeness (Full Frontal 2012)
 
PhoneGap by Dissection
PhoneGap by DissectionPhoneGap by Dissection
PhoneGap by Dissection
 
phonegapbydissection
phonegapbydissectionphonegapbydissection
phonegapbydissection
 
DevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sgDevOps: Building by feature with immutable infrastructure at Serv.sg
DevOps: Building by feature with immutable infrastructure at Serv.sg
 
Prototyping in code
Prototyping in codePrototyping in code
Prototyping in code
 
Designing Moblin For MIDs (with notes)
Designing Moblin For MIDs (with notes)Designing Moblin For MIDs (with notes)
Designing Moblin For MIDs (with notes)
 
Ten Lessons in Designing Content for Mobile
Ten Lessons in Designing Content for MobileTen Lessons in Designing Content for Mobile
Ten Lessons in Designing Content for Mobile
 
Visual Rhetoric March 25th
Visual Rhetoric March 25thVisual Rhetoric March 25th
Visual Rhetoric March 25th
 
Designing A Project Using Java Programming
Designing A Project Using Java ProgrammingDesigning A Project Using Java Programming
Designing A Project Using Java Programming
 
Is Python still production ready ? Ludovic Gasc
Is Python still production ready ? Ludovic GascIs Python still production ready ? Ludovic Gasc
Is Python still production ready ? Ludovic Gasc
 
OOP vs COP
OOP vs COPOOP vs COP
OOP vs COP
 
Docker experience @inbotapp
Docker experience @inbotappDocker experience @inbotapp
Docker experience @inbotapp
 
What is Codename One - Transcript.pdf
What is Codename One - Transcript.pdfWhat is Codename One - Transcript.pdf
What is Codename One - Transcript.pdf
 
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian Heigl
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian HeiglOSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian Heigl
OSDC 2017 | Experiences with Rudder, is it really for everyone? by Florian Heigl
 
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyone
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyoneOSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyone
OSDC 2017 - Florian Heigl - Experiences with rudder, is it really for everyone
 
Embracing Uncertainty: Learning to Think Responsively
Embracing Uncertainty: Learning to Think ResponsivelyEmbracing Uncertainty: Learning to Think Responsively
Embracing Uncertainty: Learning to Think Responsively
 
Framer for the win - Using Framer prototypes for your app project. (For Melbo...
Framer for the win - Using Framer prototypes for your app project. (For Melbo...Framer for the win - Using Framer prototypes for your app project. (For Melbo...
Framer for the win - Using Framer prototypes for your app project. (For Melbo...
 
QtEmbedded
QtEmbeddedQtEmbedded
QtEmbedded
 

Plus de Esteban Lorenzano

Pharo: A roadmap to solid evolution.
Pharo: A roadmap to solid evolution.Pharo: A roadmap to solid evolution.
Pharo: A roadmap to solid evolution.Esteban Lorenzano
 
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...Esteban Lorenzano
 
Seaside, El framework hereje
Seaside, El framework herejeSeaside, El framework hereje
Seaside, El framework herejeEsteban Lorenzano
 

Plus de Esteban Lorenzano (7)

Spec 2.0
Spec 2.0Spec 2.0
Spec 2.0
 
Pharo: A roadmap to solid evolution.
Pharo: A roadmap to solid evolution.Pharo: A roadmap to solid evolution.
Pharo: A roadmap to solid evolution.
 
Voyage by example
Voyage by exampleVoyage by example
Voyage by example
 
Voyage - PharoConf 2012
Voyage - PharoConf 2012Voyage - PharoConf 2012
Voyage - PharoConf 2012
 
Mars - ESUG 2010
Mars - ESUG 2010Mars - ESUG 2010
Mars - ESUG 2010
 
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...
Cruzando Fronteras - Respuestas revolucionarias a la crisis de las web-applic...
 
Seaside, El framework hereje
Seaside, El framework herejeSeaside, El framework hereje
Seaside, El framework hereje
 

Smalltalk in the pocket - Building applications for the iPhone

  • 1. Smalltalk in the pocket Building applications for the iPhone
  • 2. Disclaimer I’m very sorry, my english sucks... badly But I’ll do my best
  • 3. Esteban Lorenzano On 1994 G. Rossi teach me that Smalltalk was the future. But future wasn’t here, so I worked in a lot of crap Until 2007, where I, with two friends founded Smallworks to work on the future promised
  • 5. The iPhone Why we want to use it? Capabilities Think on i386 RAM Memory growing (256M for 3GS) Just one thread at a time
  • 6. Why Smalltalk? Because we like it :) Code fast and flexible Get rid of that ugly compile cycle and memory management issues We can take benefict from the green threads of Pharo/ Squeak
  • 7. Where do we stand? “Ad hoc” VM Objective-C bridge Some applications already in the AppleStore Look for “WikiServer” and “Fractions Calculator”, for instance So, thanks John!
  • 8. Our goal To provide a framework for programming the iPhone in a “Smalltalk way”
  • 9. Deimos - Basics (1) “Some kind” MVC Framework Model: Anything you want View: a NIB file Controller: Deimos
  • 10. Deimos - Basics (2) Uses external files You need to compile the “Ad hoc” VM each time This is because of the NIB files, mainly. Uses ObjectiveC bridge
  • 11. Deimos - Creating a view (1) On Objective-C side Yes... you need to create the NIB files outside the smalltalk image Very important: use #tag property from UI widgets #tag is there for using it, so... is not so bad (althought I don’t like it)
  • 12. Deimos - Creating a view (2) On Pharo side Extend DEView override #createViewDefinition and maybe #initializeContents Register for execution
  • 13. Deimos - Access widgets This is why the #tag property must be assigned: we look for them recursively, as childs of an UIView We wrap (and cache) all this UI widgets as equivallent Deimos widgets You look for them just once You can interact with them as Smalltalk objects
  • 14. Deimos - Event callbacks Once you mapped your widget, it is very simple
  • 15. Deimos - Navigate views [#show:|#showModal:|push:]/#answer: circuit Yes, very similar to Seaside, I “borrowed” that #push: makes a show inside a navigation controller (that “flows” the views). Works only when views are inside a navigation.
  • 16. Deimos - Internals (1) Using contexts to handle window navigations So we can stack views and control behavior in a fashion way
  • 17. Deimos - Internals (2) Announcements for handling events For internal use (e.g. #onAnswer:) Also provided for developers (yes, right now that means: me)
  • 18. Deimos - Internals (3) Using one green thread for each: Delegate object Event callback This can be a problem in the future, but right now is working pretty cool
  • 19. Deimos - Internals (4) Using WeakRegistry for disposing the not-used views A controversial solution (but working) Maybe we can use a “cached views solution” to get better performance, but it is still being studied.
  • 21. Problems found (1) The “dead lock problem” Being worked on (by John... and my self testing) Philosophical problem: how do I test this? Debugging is also a problem inside callbacks
  • 22. Problems found (2) Performance Not really an issue, but you have to take into account that you are programming for the iPhone Image size Very tight to performace
  • 23. Future ...a Sponsor, maybe? Stabilization and optimization call & return full cycle support I don’t like the #onAnswer: stuff... I don’t know how to do this, and even if possible, but I will try Use bundles to avoid VM recompilation. Cool be nice, but I’m not sure about this point... I like more the next point
  • 24. ...far in the future Getting rid of NIB files, using a declarative style Lot of problems to solve (aquire images, for instance) But this will drive us back to full-smalltalk programming, so it worths the effort. Why not an iMagritte?
  • 25. Why is called “Deimos” It is not about greek/roman mythology Is about “being around Mars” “...but that’s another story, and should be told another time” (Michael Ende, The Neverending Story)
  • 27. Thank you! Esteban Lorenzano - estebanlm@smallworks.com.ar