Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Iliad or Seaside ?
Search
newapplesho
May 27, 2010
Programming
0
78
Iliad or Seaside ?
第20回Smalltalk勉強会資料.IliadとSeasideについて
newapplesho
May 27, 2010
Tweet
Share
More Decks by newapplesho
See All by newapplesho
OpenRestyについて
newapplesho
0
85
Continuous Integration for Pharo Smalltalk Part 2 (Travis CI)
newapplesho
0
170
今時なウェブ開発をSmalltalkでやってみる?
newapplesho
0
120
Continuous Integration for Pharo Smalltalk
newapplesho
0
130
Elasticsearch for Pharo Smalltalk
newapplesho
0
150
SourceCode Management with Pharo Smalltalk - Pharo Smalltalkソースコード管理方法
newapplesho
0
110
RUNNING Smalltalk - 実践Smalltalk
newapplesho
0
90
AWS SDK for Smalltalk
newapplesho
0
90
How Smalltalker Works
newapplesho
0
78
Other Decks in Programming
See All in Programming
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
ゆるやかにgolangci-lintのルールを強くする / Kyoto.go #56
utgwkk
2
390
SymfonyCon Vienna 2025: Twig, still relevant in 2025?
fabpot
3
1.2k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
7
1.3k
フロントエンドのディレクトリ構成どうしてる? Feature-Sliced Design 導入体験談
osakatechlab
8
4.1k
コンテナをたくさん詰め込んだシステムとランタイムの変化
makihiro
1
130
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
create_tableをしただけなのに〜囚われのuuid編〜
daisukeshinoku
0
260
良いユニットテストを書こう
mototakatsu
8
2.5k
短期間での新規プロダクト開発における「コスパの良い」Goのテスト戦略」 / kamakura.go
n3xem
2
170
暇に任せてProxmoxコンソール 作ってみました
karugamo
2
720
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
260
Featured
See All Featured
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
32
2.7k
How to Think Like a Performance Engineer
csswizardry
22
1.2k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Faster Mobile Websites
deanohume
305
30k
Optimizing for Happiness
mojombo
376
70k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Designing Experiences People Love
moore
138
23k
Automating Front-end Workflow
addyosmani
1366
200k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
Navigating Team Friction
lara
183
15k
Gamification - CAS2011
davidbonilla
80
5.1k
Transcript
Smalltalkษڧձ - Iliad ٢ా ᠳ 2010-05-27 2010-06-01 վྑ൛ Iliad or
Seaside ? 1 20106݄3༵
Smalltalkษڧձ - Iliad IliadͷΠϯετʔϧ •iliad-8.1-Squeak4.1-ja-all-in-one.zip iliad-8.1, ຊޠύονద༻ࡁΈ •iliad-8.1-Squeak4.1-ja-all-in-one-Demo.zip iliad-8.1, ຊޠύονద༻ࡁΈ,
αϯϓϧίʔυ 2 20106݄3༵
Smalltalkษڧձ - Iliad ͜ͷεϥΠυิ MyTestApplication.st iliad-8.1-Squeak4.1-ja-all-in-one-Demo.zipͷ ./demosource/ ʹιʔείʔυ͕͋Γ·͢ 3 20106݄3༵
Smalltalkษڧձ - Iliad IliadνϡʔτϦΞϧ SwazooIliad startOn: 9090. αʔόͷىಈ SwazooIliad stop.
αʔόͷఀࢭ WorkspaceͰҎԼͷίʔυΛdo it 4 20106݄3༵
Smalltalkษڧձ - Iliad Iliadىಈ֬ೝ WebϒϥβͰ http://localhost:9090/browseʹΞΫηε 5 20106݄3༵
Smalltalkษڧձ - Iliad IliadͰHello World Hello Worldͱදࣔ͢ΔWeb AppΛ࡞͢Δ 6 20106݄3༵
Smalltalkษڧձ - Iliad IliadͷXHTMLϨϯμϦϯά •ςϯϓϨʔτํࣜͰͳ͍ •ϨϯμϥΦϒδΣΫτʹϝοηʔδΛૹΔ͜ͱͰ XHTML͕ੜ͞ΕΔ 7 20106݄3༵
Smalltalkษڧձ - Iliad ίϯτϩʔϥʔͷ࡞ ίϯτϩʔϥͰ͋ΔILApplicationͷαϒΫϥεΛ࡞ ʢMyTestApplicationͱͯ͠ఆٛʣ MyTestApplication>>(class)path ! ^'myTestApp' ΞϓϦέʔγϣϯΛݺͼग़ͨ͢ΊͷύεΛࢦఆ͢Δ
WebϒϥβͰ http://localhost:9090/myTestAppʹ ΞΫηε ਅͬനͳը໘͕දࣔ͞ΕΔ 8 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLϨϯμϦϯά index ^ [:e | ! !
e text: 'Hello World'. ]. MyTestApplication ϝιουΧςΰϦcontrollersʹ͢Δ͜ͱ σϑΥϧτίϯτϩʔϥͱͯ͠ݺͼग़͞ΕΔindexʹ ҎԼͷίʔυΛهड़ e ILXHTMLElementͷΠϯελϯε MyTestApplication.st 9 20106݄3༵
Smalltalkษڧձ - Iliad IliadͱSeasideͷൺֱ •Seasideͱͷҧ͍ •ͲͪΒΛબ͖͔͢ SmalltalkͷWeb Framework 10 20106݄3༵
Smalltalkษڧձ - Iliad IliadͱSeasideͷൺֱ߲ •XHTMLͷϨϯμϦϯά •CSS, JavaScript •ϑϩʔ੍ޚ •SessionͱResponseʢࢀߟʣ •։ൃڥͱରԠSmalltalk
11 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (1) ݟग़͠ <h1>I love Squeak</h1> 12
20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (1) ݟग़͠ <h1>I love Squeak</h1> index
^ [:e | ! ! e h1: 'I love Squeak'. ]. renderContentOn:html html heading:'I love Squeak.' level:1. ILApplication subclass WAComponent subclass 13 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (2) Ϧετ <ul> <li>Apple</li> <li>Banana</li> <li>Orange</li>
</ul> 14 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (2) Ϧετ <ul><li>...</li></ul> index ^ [:e
| | ul | ! ! ul := e ul. ! ! #('Apple' 'Banana' 'Orange') do:[:v | | li | ! ! ! li := ul li. ! ! ! li text: v ]]. DomʹΑΔXMLॲཧͱಉ͡Πϝʔδ 15 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (2) Ϧετ <ul><li>...</li></ul> renderContentOn:html ! html
unorderedList:[ ! ! #('Apple' 'Banana' 'Orange') do:[:v | ! ! html listItem:v ]]. 16 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (3) ςʔϒϧ <table border="1"> <tr> <td>Apple</td>
<td>Banana</td> <td>Orange</td> </tr> </table> 17 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (3) ςʔϒϧ index ! ^ [:e
| | table row | ! ! table := e table border:1. ! ! row := table tr. ! ! #('Apple' 'Banana' 'Orange') do:[:v | | td | ! ! ! td := row td. ! ! ! td text: v ]]. ILApplication subclass 18 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯά (3) ςʔϒϧ renderContentOn:html ! html table
border:1; with:[ ! ! html tableRow:[ ! ! #('Apple' 'Banana' 'Orange') do:[:v | ! ! html tableData:v ]]]. WAComponent subclass 19 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLϨϯμϦϯά Raw data index ^ [:e |
! ! e html: '<h1>aaa</h1>'. ]. renderContentOn:html html html:'<h1>aaa</h1>'. WAComponent subclass ILApplication subclass HTMLΛͦͷ··ग़ྗ 20 20106݄3༵
Smalltalkษڧձ - Iliad XHTMLͷϨϯμϦϯάҧ͍ BlockΛreturn͢Δهड़ํ๏ tagΛͦͷ··ΠϝʔδͰར༻Ͱ͖Δ tagͷਖ਼໊ࣜΛΒͳ͍ͱϝοηʔδΛૹΕͳ͍ 21 20106݄3༵
Smalltalkษڧձ - Iliad JavaScript,CSSͷಋೖ 1.Iliad, SeasideͱʹSqueak imageʹιʔεΛಡΈࠐΈ 2.ΞϓϦέʔγϣϯଆͰϥΠϒϥϦͷબ ҎԼͷखॱ͕ඞཁ 22
20106݄3༵
Smalltalkษڧձ - Iliad ֎෦ιʔε(CSS,JavaScirpt)ͷಡΈࠐΈ ILMemoryDirectoryͷsubclassΛ࡞ MyMemoryDirectory addFileAt:'./css/main.css' MyMemoryDirectory addAllFilesIn:'./css/' ·ͨ
Workspace্ͰҎԼͷίʔυΛ࣮ߦ 23 20106݄3༵
Smalltalkษڧձ - Iliad CSS,JavaScriptͷಋೖ४උ MyMemoryDirectory >> path ! ^'stylesheets' MyMemoryDirectory(class)>>initialize
! "self initialize" ! ILFileHandler addDirectory: self new MyMemoryDirectory.st Library.ws ΞϓϦέʔγϣϯΛݺͼग़ͨ͢ΊͷύεΛࢦఆ͢Δ ILFileHandlerʹొ 24 20106݄3༵
Smalltalkษڧձ - Iliad CSS,JavaScriptͷಋೖ imageʹಡΈࠐΜͩCSS 25 20106݄3༵
Smalltalkษڧձ - Iliad ϥΠϒϥϦͷબ styles ! ^#('/stylesheets/main.css') updatePage: aPage !
super updatePage: aPage. ! aPage head stylesheet href: '/stylesheet/main.css' ILApplication subclass ILWidget subclass 26 20106݄3༵
Smalltalkษڧձ - Iliad ILWidgetͱ •ILApplicationͷࢠཁૉʹͳΔΫϥε •ΠϯλʔϑΣʔεͷߏͱͷอ͕࣋Մೳ sample http://localhost:9090/examples/counters/ 27 20106݄3༵
Smalltalkษڧձ - Iliad JavaScript HTMLϨϯμϦϯάʹϝοηʔδΛૹΔ͚ͩͰੜ͞ΕΔ JavaScript contents ! ^[:e |
! ! e p onClick:(...); text:'1+1?'.]. ILWidget subclass 28 20106݄3༵
Smalltalkษڧձ - Iliad JavaScript,CSSͷಋೖ४උ WAFileLibraryͷsubclassΛ࡞ MyFileLibrary addFileAt:'./css/main.css'. MyFileLibrary addAllFilesIn: './css/'.
·ͨ Workspace্ͰҎԼͷίʔυΛ࣮ߦ 29 20106݄3༵
Smalltalkษڧձ - Iliad JavaScript,CSSͷಋೖํ๏ >>updateRoot:anHtmlRoot super updateRoot: anHtmlRoot. anHtmlRoot stylesheet
url: MyFileLibrary / #mainCss. >>(class) initialize ! |app| ! app := (WAAdmin register: self asApplicationAt: '...') ! ! addLibrary: MyFileLibrary. WAComponent subclass WAComponent subclass ϥΠϒϥϦͷબ 30 20106݄3༵
Smalltalkษڧձ - Iliad Ajax JQuery script.aculo.us JQueryʢSeaside 3.0ΑΓར༻Մೳʣ ඪ४AjaxϥΠϒϥϦ 31
20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ ྫ: ϩάΠϯ࣌ͷϑϩʔ Web։ൃͰΉॲཧ ೝূޭ ొ ೝূࣦഊ
Login main page User register 32 20106݄3༵
Smalltalkษڧձ - Iliad login user register main ೝূޭ ొ ೝূࣦഊ
33 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ MyTask>>go ! | user | !
loginAnswer:= self call:(MyLoginComponent new). ! loginAnswer = #registerUser ! ! ifTrue:[ user := self call: (MyUserRegisterComponent new) ] ifFalse:[ user := loginAnswer ]. ! user ifNotNil:[ ! ! self session login: user.]. self call:(MyMainComponent new). WATask subclass:#MyTask 34 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ(Seaside) WATask>>goͰϑϩʔશମΛهड़ MyLoginComponent MyUserRegisterComponent MyMainComponent MyTask call:
answer: ೝূࣦഊ ೝূޭ ॊೈͳϑϩʔ੍ޚ͕هड़Մೳ 35 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ MyIliad-Login.st ControllerͰ͋ΔILApplicationͰϑϩʔΛཧ ҰൠతͳWeb Frameworkͱಉ༷ͳߟ͑ํ Ruby on
Rails, Zend Framework MyIliad-Login.stΛfile inͯ֬͠ೝ͍ͯͩ͘͠͞ 36 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ(Iliad - 1) ILApplication subclass: #MyFlowApplication !
instanceVariableNames: 'flow' ! classVariableNames: '' ! poolDictionaries: '' ! category: 'MyIliad-Login' MyIliad-Login.st index ! ^ [:e | ! ! e build: self flow.] login ! flow := MyLoginWidget new main ! flow := MyMainWidget new. register ! flow := MyUserRegisterWidget new. flow ! ^ flow ifNil:[ flow := MyLoginWidget new ] flow: anObject ! flow := anObject ίϯτϩʔϥ͕ࢠཁૉʢWidgetʣΛஔ͖͑Δ 37 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ(Iliad - 2) ILWidget subclass: #MyLoginWidget !
instanceVariableNames: 'user' ! classVariableNames: '' ! poolDictionaries: '' ! category: 'MyIliad-Login' login ! ((user user = 'admin') and:[ user password = 'admin']) ! ! ifTrue:[ self application main. ] ! ! ifFalse:[ ! ! ! self application register. ]. MyIliad-Login.st ίϯτϩʔϥʹͤΔ contents ^[:e | e form build: [:form | form text:'User ID'. form input action:[:v | user user: v. ]. form text:'Password'. form password action:[:v | user password: v. ]. form button text: 'create'; action: [ self login ]]] 38 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ(Iliad - 3) ILWidget subclass: #MyUserRegisterWidget !
instanceVariableNames: 'user' ! classVariableNames: '' ! poolDictionaries: '' ! category: 'MyIliad-Login' addUser ! "͜͜ʹϢʔβՃॲཧ" ! self application main. MyIliad-Login.st contents ^[:e | e form build: [:form | form text:'User ID'. form input action:[:v | user user: v. ]. form text:'Password'. form password action:[:v | user password: v. ]. form button text: 'create'; action: [ self addUser ]]] ίϯτϩʔϥʹͤΔ 39 20106݄3༵
Smalltalkษڧձ - Iliad ϑϩʔ੍ޚ •Controller͕ભҠॲཧΛߦͳΘͳ͚ΕͳΒͳ͍ •Seasideͱҧ͍ϒϥβͷόοΫϘλϯΛ࣮ߦ͞ΕΔ ͱ߹ੑ͕औΕͳ͍ʢैདྷͷWeb Frameworkͱಉ͡ʣ •IliadILWidget͕ར༻Ͱ͖ΔͰैདྷΑΓྑ͍ 40
20106݄3༵
Smalltalkษڧձ - Iliad Advance •Session •Response ࢀߟ SmalltalkͰWebαΠτΛ࡞Γ͍ͨਓ 41 20106݄3༵
Smalltalkษڧձ - Iliad Session SessionManager sessionClass: MySession ݱ࣌Ͱ͔ͬͨํ๏ ILSessionͷαϒΫϥεΛ࡞ 42
20106݄3༵
Smalltalkษڧձ - Iliad Session >>(class) initialize app := MyTask registerAsApplication:
'myTask'. app preferenceAt: #sessionClass put: MySession. WASessionͷαϒΫϥεΛ࡞ WAComponent subclass 43 20106݄3༵
Smalltalkษڧձ - Iliad Response (1) ࣗಈੜ͞ΕΔXHMTMLҎ֎ͷใͷग़ྗ XML, RSS,SVG... ը૾ϑΝΠϧͷμϯϩʔμ 44
20106݄3༵
Smalltalkษڧձ - Iliad Response (2) respondOn: aResponse aResponse contentType:'text/xml'; contents:
self svg. ILApplication subclass MySVGApplication.st self svg SVGͷςΩετΛฦ͢ϝιου respondOn:ΛΦʔόϥΠυ͢Δ 45 20106݄3༵
Smalltalkษڧձ - Iliad Response (3) 2.8ܥ renderContentOn:html self session returnResponse:
(WAResponse new !! contentType: 'text/xml'; ! ! nextPutAll: self makeSVG; ! ! yourself) WAComponent subclass 46 20106݄3༵
Smalltalkษڧձ - Iliad Response (4) renderContentOn: html ! self requestContext
respond: [:response | ! ! response ! ! initializeOn: self svg ; contentType: 'text/xml'] 3.0ܥ WAComponent subclass 47 20106݄3༵
Smalltalkษڧձ - Iliad Response (5) ResponseΛ༻͍ͨsvgͷग़ྗ 48 20106݄3༵
Smalltalkษڧձ - Iliad ։ൃڥ ϒϥβ্Ͱͷ ։ൃ ຊޠ Documents গͳ͍ ଟ͍
49 20106݄3༵
Smalltalkษڧձ - Iliad ϒϥβ্Ͱͷ։ൃ •Browser •Halo •Stylesheet •Debugger Iliadʹ࣮͞Ε͍ͯͳ͍ 50
20106݄3༵
Smalltalkษڧձ - Iliad ຊޠͷରԠํ๏ കᖒ͞ΜΑΓຊޠԽύονఏڙ ʢPharoͰར༻Մೳʣ GRUtf8SqCodec.st ILSite default codec:
(GRUtf8SqCodec new). GRUtf8SqCodec.st Λfile in͢Δ WorkspaceͰҎԼͷίʔυΛdo it 51 20106݄3༵
Smalltalkษڧձ - Iliad ରԠSmalltalk Squeak Pharo VisualWorks GNU Smalltalk GemStone
Dolphin Smalltalk VASmalltalk Squeak Pharo GNU Smalltalk VisualWorksʢରԠ༧ఆʣ 52 20106݄3༵
Smalltalkษڧձ - Iliad Iliadͷݸਓతײ •SmalltalkҎ֎ͷWebϓϩάϥϚ͕Ҡߦ͢Δʹ͍͍͔ •·ͩ·ͩDocuments͕Γͳ͍ •Web্Ͱͷ։ൃ͕Ͱ͖ΔͱΑ͍ •ඇৗʹܰྔͰ୳ࡧ͍͢͠ 53 20106݄3༵
Smalltalkษڧձ - Iliad ࢀߟใ • Iliad http://www.iliadproject.org/index • Seaside http://www.seaside.st/
• GNU Smalltalk http://smalltalk.gnu.org/ Iliad ϝʔϦϯάϦετ http://groups.google.fr/group/iliad 54 20106݄3༵
Smalltalkษڧձ - Iliad Έͳ͞ΜͲ͏ࢥ͍·͔ͨ͠ʁ 55 20106݄3༵