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 in SOA
Search
Wolfgang Pfnür
September 05, 2012
Programming
2
820
Symfony2 in SOA
Symfony2 in einer Service-Orientierten Architektur am Beispiel eines devbliss Projekts.
Wolfgang Pfnür
September 05, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
地方に住むエンジニアの残酷な現実とキャリア論
ichimichi
2
600
Benchmark
sysong
0
230
Elixir で IoT 開発、 Nerves なら簡単にできる!?
pojiro
1
150
SODA - FACT BOOK
sodainc
1
1.1k
今ならAmazon ECSのサービス間通信をどう選ぶか / Selection of ECS Interservice Communication 2025
tkikuc
11
2.7k
Beyond Portability: Live Migration for Evolving WebAssembly Workloads
chikuwait
0
380
Passkeys for Java Developers
ynojima
3
870
Create a website using Spatial Web
akkeylab
0
290
事業戦略を理解してソフトウェアを設計する
masuda220
PRO
22
6.2k
A2A プロトコルを試してみる
azukiazusa1
2
780
Is Xcode slowly dying out in 2025?
uetyo
1
170
Gleamという選択肢
comamoca
6
740
Featured
See All Featured
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.3k
Typedesign – Prime Four
hannesfritz
42
2.7k
Become a Pro
speakerdeck
PRO
28
5.4k
The Illustrated Children's Guide to Kubernetes
chrisshort
48
50k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
4
200
Six Lessons from altMBA
skipperchong
28
3.8k
How STYLIGHT went responsive
nonsquared
100
5.6k
The Pragmatic Product Professional
lauravandoore
35
6.7k
GitHub's CSS Performance
jonrohan
1031
460k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
22k
Transcript
Symfony2 in SOA Kifah Abbad, devbliss GmbH Luis Quintela Garcia,
devbliss GmbH Wolfgang Pfnür, devbliss GmbH
Vorab • Grober Überblick über komplexe Themen • Am Beispiel
von Projekt-X • Fragen bitte am Ende
TOC • Basics ◦ SOA ◦ Beispiele für Services ◦
RESTlike • Architektur Projekt-X • Symfony
SOA - Service-Oriented Architecture • Unterteilung in kleine Einheiten •
Vorteile ◦ Wiederverwendbarkeit ◦ Wartbarkeit ◦ Skalierbarkeit in der Entwicklung
Beispiele für Services • Chat • Commenting • Rating •
Pernod (Persistent Notification Daemon) • Buschfunk • ...
RESTlike • Zustandslos • URL => Resource • HTTP Method
=> CRUD • /users (POST, GET) • /users/{userId} (PUT, GET, DELETE) • /users/{userId}/albums/{albumId}
TOC • Basics • Architektur Projekt-X ◦ Frontend ◦ Firewall
◦ Symfony Service Container ◦ Services ◦ Inter-Service Kommunikation • Symfony
Frontend • Entkoppelung Server - Client • Validierung auf Client
• Statisches nicht immer neu laden ◦ AJAX • Optisch ansprechend • GWT (Google Web Toolkit)
None
Firewall • Janitor ◦ In der Blütezeit von VZ entwickelt
◦ Nginx ◦ Extrem viele Requests, zentrale Komponente ◦ Routen-Regex per Service-Config-Endpunkt ◦ AuthLevels • Juanitor ◦ Janitor mit Lua Konfiguration statt rewrites
None
Symfony Service Container • Bundle => Service • Schnelle Entwicklung
• Einfaches Deployment • Trotzdem: Service-Orientierte Architektur • Später Hochlast-Services extrahieren
None
Services • Problemspezifische Sprache • Problemspezifische Architektur • Existierende Services
• Vorhandene Sprach-Kenntnisse nutzen • Abwechslung ;-)
None
Inter-Service Kommunikation • Synchron ◦ HTTP ◦ Subrequest Symfony-Intern •
Asynchron ◦ AMQP (RabbitMQ) • Sonst nichts! • Keine Bundle-Übergreifenden Imports! ◦ Automatische Überwachung
TOC • Basics • Architektur Projekt-X • Symfony ◦ Entscheidungsfindung
◦ Routing ◦ ORM ◦ DMS ◦ Testing
Entscheidungsfindung • VZ-Redesign := PHP • Verschiedene Frameworks getestet ◦
Schnelligkeit ◦ Dependency Injection (gut für Tests) ◦ Coding Standards ◦ Symfony2 => Bestes Framework für PHP • Projekt-X: ◦ Wissen vorhanden ◦ Gute Erfahrungen
Routing • Warum kein FoSRestBundle? ◦ Befürchtung: zu unflexibel (Dezember
2010) • Routen per Annotation • AuthLevel + Regex für J(u)anitor • RequestListener per URL-Annotation aktivieren (z.B. GUID-to-ID)
ORM • Doctrine • Quasi Standard für Symfony • Mischen
von Mysql und MongoDB möglich
DMS • Domain-Model-Schema in Yaml • Objektdefinition ◦ Properties (mit
Typ) ◦ Validatoren ◦ Initialer Wert • Generierung von DTOs für alle Sprachen • Symfony-Entities erben von DTOs ◦ Doctrine Annotationen in Entities
None
None
Testing • Unittests ◦ Mocking (einfach dank Dependency Injection) •
Doctests (Python) ◦ Dokumentation der Routen ◦ Dokumentation der Benutzung ◦ Integrationstests
None
None
Exception Listener • Nur JSON erlaubt - auch bei Exceptions
◦ Client muss ja wissen, dass etwas kaputt ist • Doctests erwarten also JSON ◦ Es werden auch Fehlerfälle getestet • Anzeige von Fehlern im Browser (bcat) • Symfony-Fehlerscreen-HTML im JSON Payload (nur im Debug Mode)
Danke für die Aufmerksamkeit Fragen?