Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
phalconのススメ@PHP BLT#5
Search
shun0102
July 20, 2016
Programming
2.4k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
phalconのススメ@PHP BLT#5
shun0102
July 20, 2016
Other Decks in Programming
See All in Programming
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
420
すこし踏み込む CancellationToken
htkym
2
1.7k
Next.js: The final boss of Web Performance
guaca
0
260
FactoryBotをやめればRSpecは速くなるのか?
yuta_onishi_97
0
500
golang-bob.pdf
iwatsukayura
0
130
Event is what happens
moro
2
790
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
790
Jetpack Compose Mechanisms
skydoves
3
820
カツオ、ご期待ください
suneo3476
0
190
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
690
sbt 2.0: takeoff
eed3si9n
0
160
phperだってパンチカードでコーディングしたい
o0h
PRO
0
340
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
320
Building AI with AI
inesmontani
PRO
1
1.3k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
300
Heart Work Chapter 1 - Part 1
lfama
PRO
10
37k
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
480
The Language of Interfaces
destraynor
162
27k
Transcript
Phalconͷεεϝ @PHP BLT #5 גࣜձࣾϢʔβʔϩʔΧϧ CTO ࡾ্ढ़ี @shun0102
ϑϨʔϜϫʔΫʹٻΊΔͷ ɾత ɹ- େྔͷτϥϑΟοΫΛ͘͞APIαʔόʔ ɾཉ͍͠ػೳ ɹ- DIίϯςφ ɹ- ϧʔλʔ ɹ-
MVCʢORMͳͯ͘OKʣ ɹ- ੑೳʢ͚Ε͍΄Ͳྑ͍ʣ
ಠࣗϑϨʔϜϫʔΫʁ ɾબࢶͱͯ͠શવ͋Γ ɾυΩϡϝϯτɺϝϯςφϯεੑɺॻ͖͢͞ͳͲ ɾଐਓੑ
ग़యɿhttps://github.com/kenjis/php-framework-benchmark
ࣗͰͱͬͨIFMMPXPSMEϕϯνϚʔΫ ڥ ɾGCP vCPU 2, memory 7.5GB ɾphp 7.0.8
0 1000 2000 3000 4000 raw phalcon 2.1 slim 3.4 lumen 5.4
ͦͷଞؾʹͳΔϑϨʔϜϫʔΫ ɾphalconͰΘΕ͍ͯΔZephirͰ࡞ΒΕͨIce ɾAuraͳͲͷίϯϙωϯτΛͬͨಠࣗϑϨʔϜϫʔΫʁ
1IBMDPOͷհ ɾCݴޠͰ࡞ΒΕͨPHPΤΫεςϯγϣϯ ɾ1.3ܥɿݹ͍҆ఆ൛ ɾ2.0ܥɿZephirͰ࡞Γ͞Εͨ৽͍҆͠ఆ൛ ɾ2.1ܥɿ2.1.0 rc1·ͰϦϦʔε PHP 7.0αϙʔτ LTS(3)ʹͳΔ༧ఆ
1IBMDPO։ൃऀπʔϧ $ phalcon project phalcon_hello ɾϓϩδΣΫτͷܗͷ࡞ ɾར༻ՄೳͳίϚϯυ $ phalcon commands
Available commands: commands (alias of: list, enumerate) controller (alias of: create-controller) module (alias of: create-module) model (alias of: create-model) all-models (alias of: create-all-models) project (alias of: create-project) scaffold (alias of: create-scaffold) migration (alias of: create-migration) webtools (alias of: create-webtools)
$ tree . ᵓ── app │ ᵓ── cache │ ᵓ──
config │ │ ᵓ── config.php │ │ ᵓ── loader.php │ │ └── services.php │ ᵓ── controllers │ │ ᵓ── ControllerBase.php │ │ └── IndexController.php │ ᵓ── migrations │ ᵓ── models │ └── views │ ᵓ── index │ │ └── index.volt │ ᵓ── index.volt │ └── layouts ᵓ── index.html └── public ᵓ── css ᵓ── files ᵓ── img ᵓ── index.php ᵓ── js └── temp σΟϨΫτϦߏࣗ༝͕ͩɺܗ͋Δ
ґଘੑͷೖ %* <?php use Phalcon\Session\Adapter\Files as SessionFiles; $di = new
Phalcon\Di(); $di->setShared('session', function () { $session = new SessionFiles(); $session->start(); return $session; }); $session = $di->get('session');
ϧʔςΟϯά 3PVUJOH
ΞϊςʔγϣϯʹΑΔϧʔλʔ
ΞϊςʔγϣϯʹΑΔϧʔλʔ
.7$ $ tree . ᵓ── app │ ᵓ── controllers │
│ ᵓ── ControllerBase.php │ │ └── IndexController.php │ ᵓ── models │ └── views │ ᵓ── index │ │ └── index.volt │ ᵓ── index.volt │ └── layouts
.7$ ɾView: VoltςϯϓϨʔτΤϯδϯʢΘͳͯ͘ྑ͍ʣ ɾModel: ಠࣗͷPHQL
·ͱΊ ɾߴͳPHP framework PhalconΛհ ɾࣗͷϕϯνϚʔΫͰੜPHPͷ1/2͘Β͍ɺ ɹଞΑΓ̎ഒҎ্͍ ɾػೳͱͯ͠DI, ϧʔςΟϯά, MVCͷհ