Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
S H O Y O S H I D A
S O R A B I T O I N C
Smalltalk ?
3 1 M A R C H 2 0 1 7
Smalltalk
Smalltalker
https://fossbytes.com/most-loved-and-most-hated-programming-languages/
Which Are The Most Loved and Most Hated Programming...
Smalltalker
Web Seaside
Develop in Pharo, Run on Javascript
PharoJS
• https://pharojs.github.io/
• http://smalltalkhub.com/#!/~noury/PharoJS
• ESUG 2015
• Pharo JavaScript
Enterprise Pharo
( )
Smalltalk
Twitter
• Smalltalk All the Time & Everywhere
PharoJS
PharoJS
PharoJS
PharoJS
•
• Smalltalk
•
PharoJS
: Teapot
Smalltalk
Gofer it
smalltalkhubUser: 'noury' project: 'PharoJS';
configurationOf: #PharoJS ;
loadBleedingEdge.
C O D E + T E S T M O D E L
Pharo Pharo
counter := MyCounter new.
counter count.
counter increment.
counter count.
C O D E + T E S T I N T E G R AT I O N
C O D E + T E S T I N T E G R AT I O N
MyCounterController MyCounterBrowserApp
Model Controller
C O D E + T E S T I N T E G R AT I O N
MyCounterController MyCounterBrowserApp
Model Controller
MyCounterController
Object subclass: #MyCounterController
instanceVariableNames: 'counter countDisplay'
classVariableNames...
MyCounterController
MyCounterController>>increment
self counter increment.
self updateDisplay
MyCounterController>>reset
s...
MyCounterBrowserApp
PjFileBasedBrowserApp subclass: #MyCounterBrowserApp
instanceVariableNames: 'counter controller'
class...
MyCounterBrowserApp
MyCounterBrowserApp>>initialize
super initialize.
counter := MyCounter new.
controller := MyCounterCon...
MyCounterBrowserApp
MyCounterBrowserApp>>incrementButton
^ self domElementAt: 'incrementButton'
MyCounterBrowserApp>>reset...
MyCounterBrowserApp
MyCounterBrowserApp>>(class)appClasses
<pharoJsSkip>
^super appClasses, {MyCounter. MyCounterControlle...
C O D E + T E S T I N T E G R AT I O N
MyCounterController MyCounterBrowserApp
Model Controller
MyCounterBrowserApp setUpA...
C O D E + T E S T I N T E G R AT I O N
<!DOCTYPE html>
<meta charset="utf-8" />
<head>
<title>MyCounter</title>
</head>
<b...
PjTranspiler
PjTranspiler convertToJs:[ 1+1 ] .
jsString := PjTranspiler convertToJs:[ [ 1+ 1 ] ].
jsString := PjTranspile...
MyCounterBrowserAppTest
PjWebAppTestCase subclass: #MyCounterBrowserAppTest
instanceVariableNames: 'application countDispl...
MyCounterBrowserAppTest
MyCounterBrowserAppTest>>setUp
super setUp.
application := self currentApp.
countDisplay := applic...
MyCounterBrowserAppTest
MyCounterBrowserAppTest>>testClickOnIncrementButtonIncreasesCountAn
dUpdatesDisplay
1 to: 10 do: [...
MyCounterBrowserAppTest
MyCounterBrowserAppTest>>(class)appClass
^MyCounterBrowserApp
MyCounterBrowserAppTest>>(class)isAb...
T E S T P O R TA B I L I T Y
MyPharoCounterBrowserAppTest
MyCounterBrowserAppTest subclass: #MyPharoCounterBrowserAppTest
instanceVariableNames: ''
cla...
MyPharoCounterBrowserAppTest
MyCounterBrowserAppTest subclass: #MyPharoCounterBrowserAppTest
instanceVariableNames: ''
cla...
PjBridge
bridge := PjBridge startOn: 9001 title:'test'.
bridge clientTitle.
bridge evalBlock: [1+2].
bridge evalBlock: [|x...
• PharoJS Smalltalk
• Pharo JavaScript
今時なウェブ開発をSmalltalkでやってみる?
今時なウェブ開発をSmalltalkでやってみる?
今時なウェブ開発をSmalltalkでやってみる?
今時なウェブ開発をSmalltalkでやってみる?
Upcoming SlideShare
Loading in …5
×

今時なウェブ開発をSmalltalkでやってみる?

709 views

Published on

「Smalltalkってまだ生きているの?」とそんな悲しいことを質問されたりするので、Pharo Smalltalkで今時なウェブ開発をする方法について話します。
ESUG 2015で入賞したPharoJSやEnterprise Pharo本に掲載されているライブラリなどPharo Smalltalkでウェブ開発をする方法を話したいと思います。

Published in: Technology
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

今時なウェブ開発をSmalltalkでやってみる?

  1. 1. S H O Y O S H I D A S O R A B I T O I N C Smalltalk ? 3 1 M A R C H 2 0 1 7
  2. 2. Smalltalk
  3. 3. Smalltalker
  4. 4. https://fossbytes.com/most-loved-and-most-hated-programming-languages/ Which Are The Most Loved and Most Hated Programming Languages | 2017
  5. 5. Smalltalker
  6. 6. Web Seaside
  7. 7. Develop in Pharo, Run on Javascript
  8. 8. PharoJS • https://pharojs.github.io/ • http://smalltalkhub.com/#!/~noury/PharoJS • ESUG 2015 • Pharo JavaScript
  9. 9. Enterprise Pharo ( ) Smalltalk
  10. 10. Twitter
  11. 11. • Smalltalk All the Time & Everywhere PharoJS
  12. 12. PharoJS
  13. 13. PharoJS
  14. 14. PharoJS
  15. 15. • • Smalltalk • PharoJS
  16. 16. : Teapot
  17. 17. Smalltalk
  18. 18. Gofer it smalltalkhubUser: 'noury' project: 'PharoJS'; configurationOf: #PharoJS ; loadBleedingEdge.
  19. 19. C O D E + T E S T M O D E L Pharo Pharo counter := MyCounter new. counter count. counter increment. counter count.
  20. 20. C O D E + T E S T I N T E G R AT I O N
  21. 21. C O D E + T E S T I N T E G R AT I O N MyCounterController MyCounterBrowserApp Model Controller
  22. 22. C O D E + T E S T I N T E G R AT I O N MyCounterController MyCounterBrowserApp Model Controller
  23. 23. MyCounterController Object subclass: #MyCounterController instanceVariableNames: 'counter countDisplay' classVariableNames: '' package: 'PharoJS-Demo'
  24. 24. MyCounterController MyCounterController>>increment self counter increment. self updateDisplay MyCounterController>>reset self counter reset. self updateDisplay MyCounterController>>updateDisplay self countDisplay innerHTML: self counter count
  25. 25. MyCounterBrowserApp PjFileBasedBrowserApp subclass: #MyCounterBrowserApp instanceVariableNames: 'counter controller' classVariableNames: '' package: 'PharoJS-Demo'
  26. 26. MyCounterBrowserApp MyCounterBrowserApp>>initialize super initialize. counter := MyCounter new. controller := MyCounterController new. controller counter: counter. controller countDisplay: self countDisplay. self resetButton addEventListener: #click block: [ controller reset ]. self incrementButton addEventListener: #click block: [ controller increment ]
  27. 27. MyCounterBrowserApp MyCounterBrowserApp>>incrementButton ^ self domElementAt: 'incrementButton' MyCounterBrowserApp>>resetButton ^ self domElementAt: 'resetButton' MyCounterBrowserApp>>countDisplay ^ self domElementAt: 'countDisplay'
  28. 28. MyCounterBrowserApp MyCounterBrowserApp>>(class)appClasses <pharoJsSkip> ^super appClasses, {MyCounter. MyCounterController} MyCounterBrowserApp>>(class)appJsSubFolder ^'js' JavaScript
  29. 29. C O D E + T E S T I N T E G R AT I O N MyCounterController MyCounterBrowserApp Model Controller MyCounterBrowserApp setUpAppFolder. MyCounterBrowserApp appFolder. HTML
  30. 30. C O D E + T E S T I N T E G R AT I O N <!DOCTYPE html> <meta charset="utf-8" /> <head> <title>MyCounter</title> </head> <body> <div class="container"> <div id="countDisplay" class="countText">0</div> <button id="resetButton" class="resetButton">Reset</button> <button id="incrementButton" class="incrementButton">Increment</button> </div> <script language="javascript" type="text/javascript" src="js/index.js"></script> </body> </html> HTML
  31. 31. PjTranspiler PjTranspiler convertToJs:[ 1+1 ] . jsString := PjTranspiler convertToJs:[ [ 1+ 1 ] ]. jsString := PjTranspiler convertToJs:[:x | x + 1 ]. jsString := PjTranspiler convertToJs:[ [:x | x + 1] value:2 ]. PjTranspiler convertToJs: MyCounter. Smalltalk JavaScript
  32. 32. MyCounterBrowserAppTest PjWebAppTestCase subclass: #MyCounterBrowserAppTest instanceVariableNames: 'application countDisplay incrementButton resetButton' classVariableNames: '' package: 'PharoJS-Demo-Tests'
  33. 33. MyCounterBrowserAppTest MyCounterBrowserAppTest>>setUp super setUp. application := self currentApp. countDisplay := application countDisplay. resetButton := application resetButton. incrementButton := application incrementButton. MyCounterBrowserAppTest>>currentApp self subclassResponsibility
  34. 34. MyCounterBrowserAppTest MyCounterBrowserAppTest>>testClickOnIncrementButtonIncreasesCountAn dUpdatesDisplay 1 to: 10 do: [ : expectedCount | incrementButton click. self assert: countDisplay innerHTML equals: expectedCount asString ]
  35. 35. MyCounterBrowserAppTest MyCounterBrowserAppTest>>(class)appClass ^MyCounterBrowserApp MyCounterBrowserAppTest>>(class)isAbstract ^self == MyCounterBrowserAppTest MyCounterBrowserAppTest>>(class)targetPlatforms ^{PjSafari . PjGoogleChrome. PjFireFox. }
  36. 36. T E S T P O R TA B I L I T Y
  37. 37. MyPharoCounterBrowserAppTest MyCounterBrowserAppTest subclass: #MyPharoCounterBrowserAppTest instanceVariableNames: '' classVariableNames: '' package: 'PharoJS-Demo-Tests' MyPharoCounterBrowserAppTest>>currentApp ^MyCounterBrowserApp start.
  38. 38. MyPharoCounterBrowserAppTest MyCounterBrowserAppTest subclass: #MyPharoCounterBrowserAppTest instanceVariableNames: '' classVariableNames: '' package: 'PharoJS-Demo-Tests' MyPharoCounterBrowserAppTest>>currentApp ^ self evalBlock: [MyCounterBrowserApp currentInstance]
  39. 39. PjBridge bridge := PjBridge startOn: 9001 title:'test'. bridge clientTitle. bridge evalBlock: [1+2]. bridge evalBlock: [|x| x := 6 * 7]. bridge loadClass: MyCounter. bridge evalBlock: [ |counter| counter := MyCounter new. counter increment. counter count.]. bridge stop. JavaScript Interpreter
  40. 40. • PharoJS Smalltalk • Pharo JavaScript

×