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
Symfony2を1年間実践で使ってみて学んだこと
Search
Katsuhiro Ogawa
April 21, 2012
Programming
5
6.4k
Symfony2を1年間実践で使ってみて学んだこと
PHPカンファレンス北海道
2012.04.21
Katsuhiro Ogawa
April 21, 2012
Tweet
Share
More Decks by Katsuhiro Ogawa
See All by Katsuhiro Ogawa
新規プロダクト開発に伴う既存マイクロサービスのリアーキテクティングとその後
fivestar
1
130
Goで学ぶSOLID原則
fivestar
0
280
メルカリ CSE チームの 歩みと取り組み / Steps and Tries in the CSE team for Mercari
fivestar
2
870
Go in Corporate Solutions Engineering
fivestar
0
2.4k
いつまでPHP 5.x使ってるの
fivestar
1
1.9k
PHP のドキュメントを読んで PHP のことをもっと知ろう
fivestar
1
3.1k
CrocosSecurityBundleを Symfony3.0に対応した話
fivestar
0
230
PHP BLT だけど HTML5 の コンテンツモデルのお話
fivestar
0
2.3k
THE NEW "PERFECT PHP" WILL BE COMING SOON
fivestar
0
8k
Other Decks in Programming
See All in Programming
Outline View in SwiftUI
1024jp
1
320
Ethereum_.pdf
nekomatu
0
460
Snowflake x dbtで作るセキュアでアジャイルなデータ基盤
tsoshiro
2
520
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
Less waste, more joy, and a lot more green: How Quarkus makes Java better
hollycummins
0
100
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
100
Remix on Hono on Cloudflare Workers
yusukebe
1
280
A Journey of Contribution and Collaboration in Open Source
ivargrimstad
0
880
RubyLSPのマルチバイト文字対応
notfounds
0
120
初めてDefinitelyTypedにPRを出した話
syumai
0
400
聞き手から登壇者へ: RubyKaigi2024 LTでの初挑戦が 教えてくれた、可能性の星
mikik0
1
130
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
654
59k
Adopting Sorbet at Scale
ufuk
73
9.1k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5k
Writing Fast Ruby
sferik
627
61k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
42
9.2k
Navigating Team Friction
lara
183
14k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
Gamification - CAS2011
davidbonilla
80
5k
Being A Developer After 40
akosma
86
590k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
93
16k
Statistics for Hackers
jakevdp
796
220k
Scaling GitHub
holman
458
140k
Transcript
Symfony2Λ1࣮ؒફͰ ͬͯΈֶͯΜͩ͜ͱ גࣜձࣾΫϩίε খ༤େ
ࣗݾհ •খ ༤େ / ͓͕Θ ͔ͭͻΖ @fivestr •גࣜձࣾΫϩίε •ຊSymfonyϢʔβʔձ •PHPྺ6
( ≒ ϓϩάϥϛϯάྺ) •http://fivestar.hatenablog.com/
ஶॻ •ύʔϑΣΫτPHP •symfony 1.4ʹΑΔWebΞϓϦέʔγϣϯ։ൃ •ܦιϑτΤΞ
ࠓͷ༰ •Ϋϩίεͷ׆ಈհ •Symfonyʹ͍ͭͯ •͜ͷ1ͰֶΜͩ͜ͱ •ॻ੶ͷએʢҰ൪େࣄʣ
גࣜձࣾΫϩίε •2011.02.07ʹཱ •http://crocos.co.jp/ •5ਓͷPHPΤϯδχΞ •ओͳۀFacebookΞϓϦ։ൃ •डୗͰͳ͘ASP
αʔϏεհ(اۀ͚) •CrocosϚʔέςΟϯά •Facebook͚ϚʔέςΟϯάεΠʔτ •ݱࡏ8ͭͷΞϓϦΛఏڙ •CrocosΧλϩά •ָఱ্Ͱൢച͍ͯ͠ΔΛFacebook ϖʔδ্Ͱදࣔ͢ΔΞϓϦ
αʔϏεհ(Ұൠ͚) •Crocosεέδϡʔϥ •Crocosεϙοτ •CrocosΑ͕͖ͤ •Crocosݒ •ͯ͢FacebookΞϓϦ
Facebookެೝʂ •Ϋϩίε͕FacebookͷೝఆϚʔέςΟϯ άσϕϩούʔʹͳΓ·ͨ͠ʂ(ຊॳʂ) •4.19ʹൃද͞Ε͔ͨΓ •ࠃͰ4ࣾͷΈ
։ൃͷελΠϧ •֤ΞϓϦ͝ͱʹ୲͕1ਓ •2ਓ1νʔϜͰਐḿλεΫΛཧ •֤ࣗɺ1ʙ3िؒ͘Β͍ͰػೳΛ࡞ͬͯ ϦϦʔεΛ܁Γฦ͍ͯ͠Δ
։ൃʹ͍ͭͯ •αʔόαΠυͯ͢PHP •Symfony2ϑϨʔϜϫʔΫΛ࠾༻
Symfony2 •ൺֱత৽͍͠ϑϨʔϜϫʔΫ •PHP 5.3Ҏ্
Symfony2Λ࠾༻ͨ͠ܦҢ •৽͔͔ͬͨ͠Β…… •࠾༻ͨ࣌͠·ͩΞϧϑΝ൛ •PHP 5.3͚ͷϑϨʔϜϫʔΫͱͯ͠ଞʹ ·ͱͳͷ͕ͳ͔ͬͨ
Symfonyͷಛ •Symfonyߴ͍ॊೈੑΛ࣋ͭ •ઃܭͷࣗ༝͕ߴ͍ͨΊɺઃܭεΩϧ͕ ͦΕͳΓʹٻΊΒΕΔ •։ൃॳ৺ऀʹෆ͖
SymfonyͱϞσϧ •SymfonyͰ༷ʑͳ͜ͱ͕ϞσϧΛத৺ʹ ߦΘΕΔ •ೖྗϑΥʔϜΛѻ͏ॲཧͷྲྀΕ 1.ϑΥʔϜσʔλΛϞσϧʹө 2.Ϟσϧͷঢ়ଶΛόϦσʔγϣϯ 3.ϞσϧͷσʔλΛσʔλϕʔεอଘ
SymfonyͱϞσϧ •SymfonyͰϞσϧϐϡΞͳPHPΦϒ δΣΫτͱͯ͠ѻ͏ •Γ͍ͨ͜ͱʹ࠷దԽͨ͠ΦϒδΣΫτ Λ༻ҙ͢ΔͱεϜʔζʹΛղܾՄೳ
SymfonyʹݶΒͣ •ϞσϧΞϓϦέʔγϣϯͰͬͱॏ ཁͳ෦ •ϑϨʔϜϫʔΫ͕༻ҙͨ͠Ϋϥε͚ͩͰ ͳ͘ɺඞཁʹ͋Θͤͯॊೈʹ࣮͢Δ
Symfonyͱόϯυϧ •Symfonyͷػೳόϯυϧͱ͍͏୯ҐͰ· ͱΊΒΕ͓ͯΓɺඞཁͳͷ͚ͩ͏͜ ͱ͕Ͱ͖Δ •ϑϨʔϜϫʔΫ͕༻ҙ͢Δػೳ͕߹Θͳ ͚Εແཧʹ͏ඞཁͳ͍
νʔϜʹ͋ͬͨͷΛ͏ •SymfonyΛ͍࢝Ίͯ1൪͍ͮΒ͔ͬͨ ͷ͕ඪ४ͷೝূͷΈ •ઃఆ͕ෳࡶͰѻ͍ͮΒ͔ͬͨͷͰɺγϯ ϓϧͳೝূͷΈΛ࣮ • https://github.com/crocos/CrocosSecurityBundle
όϯυϧʹΑΔ࠶ར༻ •͍ճͤΔίʔυόϯυϧʹ·ͱΊͯ ͍ճ͍ͯ͠Δ •GitͰཧ͍ͯ͠Δ
γϯϓϧʹ࡞Δ͜ͱ •ͲΜͳʹॊೈʹͰ͖Δ͔Βͱ͍͑ɺෳ ࡶԽͯ͠ཧ͕େม •ඞཁͳΛγϯϓϧʹ࣮͍ͯ͘͜͠ͱ ͕ޮతʹΞϓϦΛ։ൃ͍ͯ͘͠ίπ
YAGNIݪଇ •“You ain’t gonna need it” ͷུ •ඞཁʹͳΔ·Ͱ࣮͠ͳ͍
DI •“Dependency Injection” ͷུ •ґଘੑͷೖͱ͍͏ҙຯ •ΦϒδΣΫτؒͷґଘΛ͑ΔͨΊͷ ςΫχοΫ
None
DIίϯςφ •ґଘؔΛઃఆ͓ͯ͘͠ͱɺ͏·͍͜ͱ ͬͯ͘ΕΔΦϒδΣΫτ •͍͗͢ΔͱෳࡶʹͳΔͷͰ΄Ͳ΄Ͳʹ ͓ͯ͘͠
࠷ۙͷ՝ •ΞϓϦͷύϑΥʔϚϯε͕ѱ͍ •ͦͦνϡʔχϯάΛ͍ͯ͠ͳ͍ •SymfonyࣗମΘΓͱॏ͍ •ςετΛॻ͘ •PHP 5.4Խ
SymfonyͬͯͲ͏ͳͷʁ •Έ͍ͨͳΈͦΦϒδΣΫτࢦͰͰ ͖͍ͯΔਓʹద͍ͯ͠Δ •σβΠϯύλʔϯͳͲΛਵॴͰऔΓೖΕͯ ͍ΔͨΊɺύλʔϯΛ͍ͬͯΔͱΘΓ ͱεϜʔζʹֶशͰ͖Δ •υϝΠϯۦಈઃܭ (DDD)
ॻ੶հ •͕͜Ε·Ͱ։ൃΛߦ͖ͬͯͨதͰֶΜ ͩ͜ͱΛॻ੶ʹ͠·ͨ͠ •ݱͷ։ൃऀ͚
ޮతͳWeb ΞϓϦέʔγϣϯ ͷ࡞Γํ •ٕज़ධࣾ •2,780ԁ •352ϖʔδ •5.29ൃച ISBN978-4-7741-5082-6
Part1 MVC։ൃͷجૅࣝ • 1ষ MVC։ൃͷ֓ཁ • 2ষ ΦϒδΣΫτࢦ
Part2 ϑϨʔϜϫʔΫΛར༻ ͢Δར • 3ষ ϨΨγʔίʔυͷܽ • 4ষ ϦϑΝΫλϦϯάɾσβΠϯύλʔ ϯ࣮ફ
• 5ষ ϑϨʔϜϫʔΫΛ׆༻͢Δ
Part3 ϞμϯPHP WebΞϓϦ έʔγϣϯ։ൃ • 6ষ ΞϓϦέʔγϣϯ։ൃΛ࢝ΊΔͨΊ ͷ४උ • 7ষ
σʔλϕʔεͱΤϯςΟςΟ • 8ষ ίϯτϩʔϥͱϏϡʔ • 9ষ ϑΥʔϜͱσʔλϕʔε
Part4 ػೳͷ࡞ͱ࣮ͷύ λʔϯԽ •10ষ Ϣʔβొ •11ষ ΠςϨʔγϣϯ •12ষ ཧը໘ •13ষ
ίϚϯυϥΠϯεΫϦϓτ •14ষ Ϣχοτςετ •15ষ ػೳςετ
None