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
Ruby's Line Breaks
yui_knk
2
470
MCP世界への招待: AIエンジニアが創る次世代エージェント連携の世界
gunta
4
880
ミリしらMCP勉強会
watany
4
740
これだけは知っておきたいクラス設計の基礎知識 version 2
masuda220
PRO
24
6k
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
1.2k
タイムゾーンの奥地は思ったよりも闇深いかもしれない
suguruooki
1
570
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
270
Coding Experience Cpp vs Csharp - meetup app osaka@9
harukasao
0
730
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
160
DataStoreをテストする
mkeeda
0
280
ベクトル検索システムの気持ち
monochromegane
31
9.9k
Day0 初心者向けワークショップ実践!ソフトウェアテストの第一歩
satohiroyuki
0
830
Featured
See All Featured
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
119
51k
We Have a Design System, Now What?
morganepeng
52
7.5k
Documentation Writing (for coders)
carmenintech
69
4.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
Practical Orchestrator
shlominoach
186
10k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
2.9k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
Rails Girls Zürich Keynote
gr2m
94
13k
Facilitating Awesome Meetings
lara
54
6.3k
Agile that works and the tools we love
rasmusluckow
328
21k
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?