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
sappoRo.R #12 初心者セッション
kosugitti
0
280
Webフレームワークとともに利用するWeb components / JSConf.jp おかわり
spring_raining
1
130
dbt Pythonモデルで実現するSnowflake活用術
trsnium
0
270
ABEMA iOS 大規模プロジェクトにおける段階的な技術刷新 / ABEMA iOS Technology Upgrade
akkyie
1
240
CSS Linter による Baseline サポートの仕組み
ryo_manba
1
160
自力でTTSモデルを作った話
zgock999
0
120
CDKを使ったPagerDuty連携インフラのテンプレート化
shibuya_shogo
0
120
Django NinjaによるAPI開発の効率化とリプレースの実践
kashewnuts
1
290
1年目の私に伝えたい!テストコードを怖がらなくなるためのヒント/Tips for not being afraid of test code
push_gawa
1
650
「個人開発マネタイズ大全」が教えてくれたこと
bani24884
1
290
CloudNativePGを布教したい
nnaka2992
0
120
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
8
1.5k
Featured
See All Featured
Designing on Purpose - Digital PM Summit 2013
jponch
117
7.1k
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.7k
Building Better People: How to give real-time feedback that sticks.
wjessup
367
19k
Java REST API Framework Comparison - PWX 2021
mraible
29
8.4k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
175
52k
What's in a price? How to price your products and services
michaelherold
244
12k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
660
Navigating Team Friction
lara
183
15k
Building Adaptive Systems
keathley
40
2.4k
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?