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
Developing Web Apps with Symfony2, Doctrine and...
Search
Amal Raghav
October 26, 2012
Programming
230
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Developing Web Apps with Symfony2, Doctrine and MongoDB
Amal Raghav
October 26, 2012
Other Decks in Programming
See All in Programming
手動確認はもう限界 〜XCUITestでCustom URL Schemeの遷移を起動種別ごとに自動テストする〜 / Testing Custom URL Schemes with XCUITest
otouto
0
110
How I Stole PSI from Android Studio - DroidKaigi2026
worker8
0
110
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
140
Building an Out-of-Order CPU
latte72
1
760
新卒PdEのリアル
ryu1013
1
490
AI に Inclusive UI を書かせよう — Design Rules Skill で Compose UI を作り直す
theoriatec2024
1
480
What We Talk About When We Talk About XP
m_seki
2
590
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
120
選挙速報を多くのユーザーへ 届ける Live Activities 設計
hamayokokuririn
0
130
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
370
[GoCon2026] When Goroutines Are Not Enough: Runtime Locality in High-Throughput Go
takehaya
6
2.1k
Intent as Code
shoppingjaws
6
970
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Making the Leap to Tech Lead
cromwellryan
135
10k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
Making Projects Easy
brettharned
120
6.7k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Test your architecture with Archunit
thirion
2
2.4k
Balancing Empowerment & Direction
lara
6
1.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
520
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Design in an AI World
tapps
1
310
Transcript
Developing Web Apps with Symfony2, Doctrine and MongoDB Friday, 26
October 12
Who Am I? •Software Engineer at TechJini Solutions •Working with
PHP/Symfony for last 4 years •@kertz on Twitter and Github Friday, 26 October 12
The Whys? •Why Symfony2? •Why Doctrine? Friday, 26 October 12
Symfony2 •Made of reusable components •A community that built Doctrine,
Behat, Composer, Assetic and more •The backbone for future versions of Drupal & phpBB Friday, 26 October 12
Doctrine •Highly configurable •Supports MySQL, PgSQL, Oracle, SQlite, MongoDB and
CouchDB •Doctrine Query Language Friday, 26 October 12
Installation • Composer Dependency Manager (http:// getcomposer.org) $ curl -s
http://getcomposer.org/installer | php $ php composer.phar create-project symfony/framework- standard-edition sf-mongo 2.1.x-dev Friday, 26 October 12
Adding MongoDB { "require": { "doctrine/mongodb-odm-bundle": "3.0.*" }, "minimum-stability": "dev"
} $ composer.phar update doctrine/mongodb-odm-bundle composer.json AppKernel.php Friday, 26 October 12
Configuration doctrine_mongodb: connections: default: server: mongodb://localhost:27017 options: {} default_database: sfmongo
document_managers: default: auto_mapping: true config.yml Friday, 26 October 12
Bundles •Why Bundles? •Creating your own bundles $ app/console generate:bundle
Friday, 26 October 12
Register Bundles AppKernel.php Friday, 26 October 12
What are we building? •A simple image sharing app •Store/Retrieve
images in/from GridFS •Allow comments for images Friday, 26 October 12
Image.php The Document schema for images Friday, 26 October 12
ImageController.php Controller for uploading images Friday, 26 October 12
new.html.twig The template for uploading images Friday, 26 October 12
ImageController.php Retrieving the images Friday, 26 October 12
In Retrospect •A form to upload an image and add
caption •Store images in MongoDB with GridFS •Retrieve images •That was quick, wasn’t it? Friday, 26 October 12
Comment.php The Document schema for comments Friday, 26 October 12
Image.php Add a reference to comments Friday, 26 October 12
ImageController.php Controller for comments Friday, 26 October 12
ImageController.php comments.html.twig Viewing comments for images Friday, 26 October 12
In Retrospect (again) •Allow comments for image •Show comments for
images by id Friday, 26 October 12
Repositories & DQL • Create custom repositories • Using Doctrine
Query Builder Friday, 26 October 12
CommentRepository.php Repository for comments Friday, 26 October 12
Set repository location Comment.php Friday, 26 October 12
CommentController.php Calling Repository functions Friday, 26 October 12
Bundles to watch •SonataAdminBundle http://github.com/sonata-project/SonataAdminBundle •FOSUserBundle http://github.com/FriendsOfSymfony/FOSUserBundle •FOQElasticaBundle http://github.com/Exercise/FOQElasticaBundle Friday,
26 October 12
The End. Questions? Friday, 26 October 12