Slide 1

Slide 1 text

Cartographing Symfony Making sense of the Symfony Components when used standalone or in full-stack

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

Symfony 2.0 Full List of Components BrowserKit ClassLoader Config Console CssSelector DependencyInjection DomCrawler EventDispatcher Filesystem Finder Form HttpFoundation HttpKernel Locale Process Routing Security Serializer Templating Translation Validator Yaml 22 components

Slide 4

Slide 4 text

Symfony 5.2 Full List of Components Asset BrowserKit Cache Config Console CssSelector DependencyInjection DomCrawler Dotenv ErrorHandler EventDispatcher ExpressionLanguage Filesystem Finder Form HttpClient HttpFoundation HttpKernel Inflector Intl Ldap Lock Mailer Messenger Mime Notifier OptionsResolver Process PropertyAccess PropertyInfo RateLimiter Routing Security Semaphore Serializer Stopwatch String Templating Translation Uid Validator VarDumper VarExporter WebLink Workflow Yaml 26 NEW components
 *compared to Symfony 2.0

Slide 5

Slide 5 text

core features utility features application features framework features

Slide 6

Slide 6 text

74.336 Dependents Overall

Slide 7

Slide 7 text

Core Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Workflow VarDumper Uid Validator Yaml

Slide 8

Slide 8 text

Core Features Improve on core PHP functionality • HttpFoundation provides OOP on top of superglobals • String provides clear API around mb_* and other string functions • Uid provides OOP for handling UUID/ULID-strings • VarExport works around limitations of clone • …

Slide 9

Slide 9 text

Core Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Workflow VarDumper Uid Validator Yaml

Slide 10

Slide 10 text

Core Features Filesystem

Slide 11

Slide 11 text

12.187 Dependents on Core Features

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

Utility Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Workflow VarDumper Uid Validator Yaml

Slide 15

Slide 15 text

Utility Features Components that can be used outside of Symfony, e.g. in libraries • Process • Finder • EventDispatcher

Slide 16

Slide 16 text

Utility Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 17

Slide 17 text

Utility Features Finder

Slide 18

Slide 18 text

Utility Features Finder

Slide 19

Slide 19 text

37.240 Dependents on Utility Features

Slide 20

Slide 20 text

No content

Slide 21

Slide 21 text

Application Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 22

Slide 22 text

Application Features Application components, that usually work on top of the framework, core or utility features • Messenger supports Mailer optionally uses Serializer • Form relies on Validation (optionally), HttpFoundation and OptionResolver

Slide 23

Slide 23 text

Application Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 24

Slide 24 text

Application Features Messenger

Slide 25

Slide 25 text

9.627 Dependents on Application Features

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

Framework Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 28

Slide 28 text

Framework Features Components that primarily build up Symfony as an application framework • HttpKernel ties config, routing, error handling for web app together • Config loads human processable config files and validates them • DependencyInjection takes config and creates PHP service configuration • Routing provides a way to determine which Controller should be used • ErrorHandler centralizes & streamlines error-/exception-handling • Templating renders output for Response

Slide 29

Slide 29 text

Framework Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 30

Slide 30 text

Framework Features DependencyInjection

Slide 31

Slide 31 text

15.282 Dependents on Framework Features * * Symfony Bundles

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

No content

Slide 34

Slide 34 text

Framework Features Asset BrowserKit Cache Config CssSelector DependencyInjection DomCrawler Console ErrorHandler EventDispatcher ExpressionLanguage Filesystem DotEnv Form HttpClient HttpFoundation Inflector Intl Ldap HttpKernel Mailer Messenger Mime Notifier Lock Finder Process PropertyAccess PropertyInfo Routing Security Semaphore RateLimiter Stopwatch String Templating Translation Serializer OptionsResolver VarExporter Weblink Yaml VarDumper Uid Validator Workflow

Slide 35

Slide 35 text

core features utility features application features framework features less coupled more coupled

Slide 36

Slide 36 text

core features utility features easier to use harder to use application features framework features

Slide 37

Slide 37 text

core features utility features easier to use standalone harder to use standalone application features framework features

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

Symfony 2.8 • Assets • ExpressionLanguage • Intl • Ldap • OptionsResolver • PropertyInfo

Slide 42

Slide 42 text

Symfony 3.4 • Cache • DotEnv • Inflector • WebLink • Workflow

Slide 43

Slide 43 text

Symfony 4.4 • ErrorHandler • HttpClient • Messenger • Mime • Notifier • VarExporter

Slide 44

Slide 44 text

Symfony 5.2 • RateLimiter • Semaphore • String • Uid

Slide 45

Slide 45 text

https://matthiasnoback.nl/book/principles-of-package-design/

Slide 46

Slide 46 text

The Release/Reuse Equivalence Principle The Common Reuse Principle The Common Closure Principle The Acyclic Dependencies Principle The Stable Dependencies Principle The Stable Abstractions Principle

Slide 47

Slide 47 text

ISO/IEC 25010

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

Decoupled?! Using Symfony Components standalone is really difficult!

Slide 50

Slide 50 text

No content

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

No content

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

No content

Slide 60

Slide 60 text

No content

Slide 61

Slide 61 text

No content

Slide 62

Slide 62 text

No content

Slide 63

Slide 63 text

No content

Slide 64

Slide 64 text

NIH Why doesn’t Symfony just reuse existing libraries?

Slide 65

Slide 65 text

No content

Slide 66

Slide 66 text

No content

Slide 67

Slide 67 text

No content

Slide 68

Slide 68 text

Where is Waldo? Why doesn’t Symfony have feature X, Y or Z?

Slide 69

Slide 69 text

No content

Slide 70

Slide 70 text

No content