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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Wolfgang Pfnür
September 05, 2012
Programming
840
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Symfony2 in SOA
Symfony2 in einer Service-Orientierten Architektur am Beispiel eines devbliss Projekts.
Wolfgang Pfnür
September 05, 2012
Other Decks in Programming
See All in Programming
JavaDoc 再入門
nagise
1
380
フロントエンドとバックエンドで「1文字」を揃えよう
youkidearitai
PRO
0
730
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
Performance Engineering for Everyone
elenatanasoiu
0
200
Oxcを導入して開発体験が向上した話
yug1224
4
330
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
360
OSもどきOS
arkw
0
580
Contextとはなにか
chiroruxx
1
360
The NotImplementedError Problem in Ruby
koic
1
900
1B+ /day規模のログを管理する技術
broadleaf
0
110
Claspは野良GASの夢をみるか
takter00
0
200
スマートグラスで並列バイブコーディング
hyshu
0
260
Featured
See All Featured
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.3k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
210
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
170
Test your architecture with Archunit
thirion
1
2.3k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
310
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Typedesign – Prime Four
hannesfritz
42
3.1k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
1
360
The Curse of the Amulet
leimatthew05
2
13k
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
410
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
850
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?