diff --git a/hello.css b/hello.css index a6e079081770c1897882b49c63d68717ad92acee..ab4f7902913f1c759029fbebe8a1e3c8462719e8 100644 --- a/hello.css +++ b/hello.css @@ -37,6 +37,11 @@ code { font-family: Circular, "League Gothic", Impact, sans-serif; font-weight: bold; letter-spacing: 1px; + text-transform: none; + /*text-shadow: #1E19C2 1px 1px 4px;*/ +} +.reveal h4 { + font-size: 1.5em; } .reveal pre { @@ -67,6 +72,19 @@ code { height: 150px; } +#hello { + line-height: 1.1; +} +#hello img { + border-radius: 50% !important; + -webkit-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.51); + -moz-box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.51); + box-shadow: 1px 1px 2px 0px rgba(0,0,0,0.51); +} +#hello .job { + font-size: 0.7em; +} + #universcine, #manomano { display: inline-block; } @@ -150,4 +168,4 @@ code { blockquote.twitter-tweet { /*transform: scale(2);*/ -} \ No newline at end of file +} diff --git a/index.md b/index.md index 7def9e7b0e3a7af2b4dbb092ac9e383cb7b1b9c6..0857afa3072d5969548a27873bfc823f85b053b6 100644 --- a/index.md +++ b/index.md @@ -1,26 +1,24 @@ -# Ne soyez plus l'esclave de Doctrine +# NE SOYEZ PLUS L'ESCLAVE DE DOCTRINE --- +<!-- .slide: id="hello" --> ## Hello! <div style="width: 50%; float: left;"> -Grégoire Paris<br /> -Software Engineer<br /> <span id="gregoire"></span><br /> - <div id="gregoire_company"> - <div id="universcine"> -  - </div> - <div id="universcine">➡ </div> - <div id="manomano"> -  - </div> - </div> +**Grégoire PARIS**<br /> +<span class="job"> +Software Engineer<br /> +Universciné → ManoMano<br /> +</span> </div> <div style="width: 50%; float: right;" id="maxime"> -Maxime Veber<br /> -Backend developer<br /> - +<br /> +**Maxime VEBER**<br /> +<span class="job"> +Backend Developer<br /> +Agence BiiG +</span> </div> --- @@ -36,6 +34,7 @@ Backend developer<br /> Notes: Juste pour dire que nous n'avons rien à voir avec la team de Doctrine et qu'il faut les remercier. --- +<!-- .slide: class="lot_of_code" --> ## Vous avez dit entité ? ```php @@ -72,13 +71,15 @@ Notes: - Pas de setter pour id, il est setté par Doctrine après la persistence --- -## ️❤️ Domain Driven Design ❤️ +## ️ Domain Driven Design - Représenter les **règles métier** dans les entités - Avoir une API expressive - Respecter l'encapsulation - Séparer le **domaine** de l'infrastructure +<span style="font-size: 1.5em;">❤️</span> + Notes: - Il existe d'autres architectures, cf le talk sur le clean code de Romain Kuzniak @@ -326,10 +327,10 @@ class Article } ``` -<span style="font-size: 3em;color: red;">❌</span> +<span style="font-size: 2em;color: red;">❌</span> --- -### tarifhaus/doctrine-nullable-embeddable +## tarifhaus/doctrine-nullable-embeddable Nécessite un setter. @@ -343,7 +344,30 @@ Nécessite un setter. ✨ _sisi, c'est possible_ ✨ --- -## Repository as a Service +## Repository as a Service: before + +```php +class ArticleRepository extends EntityRepository +{ + // your methods +} +``` + +```yaml +app.infrastructure.doctrine.user_repository: + class: App\Infrastructure\Doctrine\UserRepository + factory: ["@doctrine.orm.entity_manager", getRepository] + arguments: + - App\Model\User +``` + +``` +[Doctrine\ORM\ORMException] +The EntityManager is closed. +``` + +--- +## Repository as a Service: after Depuis DoctrineBundle 1.8.0 (novembre 2017) : @@ -362,10 +386,12 @@ class ArticleRepository extends ServiceEntityRepository ✔ Enregistrement en tant que service simple --- -## Les repositories +## L'interface ServiceEntityRepositoryInterface ```php -final class DoctrineArticleRepository implements ArticleRepositoryInterface, ServiceEntityRepositoryInterface +final class DoctrineArticleRepository implements + ArticleRepositoryInterface, + ServiceEntityRepositoryInterface { private $entityManager; @@ -400,6 +426,8 @@ coup… slide suivant $repository = $entityManager->getRepository(Article::class); ``` +<span style="font-size: 1.5em;">👍</span> + --- ## Les repositories, ça peut grossir @@ -537,7 +565,7 @@ Note: <!-- .slide: data-background="./iwantmore.gif" --> --- -### Quelle API pour interroger la base de données? +## Quelle API pour interroger la base de données ? <table> <tr> @@ -600,7 +628,7 @@ $comments = $query->getResult(); SQL + Objets --- -### Les dépendances circulaires entre paquets +## Les dépendances circulaires entre paquets Problème : @@ -621,14 +649,14 @@ doctrine: ``` --- -# What's next +# What's next? --- # Support de MariaDB dans Doctrine 3 --- <!-- .slide: data-background="./explosion2.gif" --> -# La configuration YAML est dépréciée +# La configuration Doctrine YAML est dépréciée ---