SlideShare ist ein Scribd-Unternehmen logo
1 von 138
Downloaden Sie, um offline zu lesen
*
 PHPBenelux
 -
 Antwerp/2013




Annotations
 in
 PHP
        y
 E xist!
   T he
                                                                             on
 twitter                           Rafael
 Dohms
                                                                                                                                                            @rdohms
Rafael Dohms




                                                                                                                                                                                          photo credit: Eli White
        @rdohms


 Evangelist, Speaker and
      Contributor.

Developer at WEBclusive.

Enabler at AmsterdamPHP.




            we
 make
 awesome
 crowd-funding
 software!
a
 little
 history                                                                                                                                                 existing
 uses



                                                                                     What?                                   Why?                                                             Where?




                                                                                                                           How?
                                                                                                                                     ustom
 ann otations
                                                                                     Impl ementing
 c DMSFilter
                                                                                             based
 on
 

                                                                                                                                       show
 me
 the
 code!
http://ecdesignrebels.blogspot.com




   w h a t?                                                                           ta tio ns?
                                            re
 an no
W ha t
 a
-- In English --
An annotation is a note that is made while
        reading any form of text.
something
 that
 describes
 an
 aspect
 of
 the
 subject



              -- In English --
An annotation is a note that is made while
        reading any form of text.
-- In Code Speak --

“An annotation is metadata attached to your
     code, that can be read at runtime.”



“Annotations do not directly affect program
               semantics”
-- In Code Speak --

“An annotation is metadata attached to your
     code, that can be read at runtime.”
   effects
 are
 only
 observed
 at


“Annotations do not directly affect program
               semantics”
-- In Code Speak --

“An annotation is metadata attached to your
     code, that can be read at runtime.”
   effects
 are
 only
 observed
 at


“Annotations do not directly affect program
               semantics”
                                                                                                                                                just
 like
 your
 notes
Annotations in the wild



                          C#
annotations

              Annotations in the wild



                                         C#
                                        attributes
@Entity
                   @Table(name = people)
                   class Person implements Serializable {
                     @Id
                     @GeneratedValue(strategy = GenerationType.AUTO)
                     private Integer id;


annotations

              Annotations in the wild



                                                      C#
                                                    attributes
@Entity
                           @Table(name = people)
                           class Person implements Serializable {
                             @Id
                             @GeneratedValue(strategy = GenerationType.AUTO)
                             private Integer id;


annotations

                  Annotations in the wild
 public class Customer




                                                              C#
 {
     [Required]
     [StringLength(50)]
     public string Prename { get; set; }

     [Column(TypeName = image)]
     public byte[] Image { get; set; }
                                                            attributes
@Entity
                           @Table(name = people)
                           class Person implements Serializable {
                             @Id
                             @GeneratedValue(strategy = GenerationType.AUTO)
                             private Integer id;


annotations                                                     after
 v1.5

                  Annotations in the wild
 public class Customer




                                                              C#
 {
     [Required]
     [StringLength(50)]
     public string Prename { get; set; }

     [Column(TypeName = image)]
     public byte[] Image { get; set; }
                                                            attributes
@Entity
                                                                                           @Table(name = people)
                                                                                           class Person implements Serializable {
                                                                                             @Id
                                                                                             @GeneratedValue(strategy = GenerationType.AUTO)
                                                                                             private Integer id;


annotations                                                                                                                     after
 v1.5

                                                                   Annotations in the wild
    public class Customer




                                                                                                                              C#
    {
        [Required]
        [StringLength(50)]
        public string Prename { get; set; }

                  [Column(TypeName = image)]
                  public byte[] Image { get; set; }
                                                                                                                            attributes
 since
 first
 release
No
 core
 
annotation
 support
Questions?
Questions?

I’m
 kidding!
phpDoc
~2000
PHP
 5.1
  Reflection
 supports
 
   getDocComments()



phpDoc
~2000                              2005
PHP
 5.1
                 Reflection
 supports
 
                  getDocComments()



phpDoc
~2000                                                                         2005



                                      First
 
                                   Annotation
 Engines
 in
 PHP
PHP
 5.1
                 Reflection
 supports
 
                  getDocComments()



phpDoc
~2000                                                                         2005                                   2008



                                      First
 
                                   Annotation
 Engines
 in
 PHP
PHP
 5.1
                 Reflection
 supports
 
                  getDocComments()



phpDoc
~2000                                                                         2005                                   2008



                                      First
 
                                                                                                                           Doctrine
 2
 
                                   Annotation
                                                                                                                        Annotation
 Engine
 Engines
 in
 PHP
PHP
 5.1
                 Reflection
 supports
 
                  getDocComments()

                                                                                                                      RFC:
 Annotations
 
                                                                                                                     in
 core
 w/
 custom
 
phpDoc                                                                                                                                                      syntax

~2000                                                                         2005                                   2008                                                       2010



                                      First
 
                                                                                                                                          Doctrine
 2
 
                                   Annotation
                                                                                                                                       Annotation
 Engine
 Engines
 in
 PHP
PHP
 5.1
                 Reflection
 supports
 
                  getDocComments()

                                                                                                                      RFC:
 Annotations
                             ED
                                                                                                                                                                                                 CTustom
 
                                                                                                                     in
 core
 JE/
 c
                                                                                                                                                                                               w
phpDoc                                                                                                                                                       E
                                                                                                                                                           Rsyntax
~2000                                                                         2005                                   2008                                          2010



                                      First
 
                                                                                                                                      Doctrine
 2
 
                                   Annotation
                                                                                                                                   Annotation
 Engine
 Engines
 in
 PHP
PHP

Weitere ähnliche Inhalte

Was ist angesagt?

Técnicas estratigráficas
Técnicas estratigráficasTécnicas estratigráficas
Técnicas estratigráficas
grupfcuan
 
Intervenção do homem nos subsistemas terrestres
Intervenção do homem nos subsistemas terrestresIntervenção do homem nos subsistemas terrestres
Intervenção do homem nos subsistemas terrestres
Mariana Cordeiro
 
Resumo 11º ano - rochas sedimentares
Resumo   11º ano - rochas sedimentaresResumo   11º ano - rochas sedimentares
Resumo 11º ano - rochas sedimentares
Hugo Martins
 
Ppt2 AbsorçãO Radicular
Ppt2   AbsorçãO RadicularPpt2   AbsorçãO Radicular
Ppt2 AbsorçãO Radicular
Nuno Correia
 
Geo 9 formação das rochas sedimentares (quimiogénicas)
Geo 9   formação das rochas sedimentares (quimiogénicas)Geo 9   formação das rochas sedimentares (quimiogénicas)
Geo 9 formação das rochas sedimentares (quimiogénicas)
Nuno Correia
 

Was ist angesagt? (20)

Técnicas estratigráficas
Técnicas estratigráficasTécnicas estratigráficas
Técnicas estratigráficas
 
Managing user's data with Spring Session
Managing user's data with Spring SessionManaging user's data with Spring Session
Managing user's data with Spring Session
 
WebRTC getStats - WebRTC Meetup Tokyo 5 LT
WebRTC getStats - WebRTC Meetup Tokyo 5 LTWebRTC getStats - WebRTC Meetup Tokyo 5 LT
WebRTC getStats - WebRTC Meetup Tokyo 5 LT
 
Era Cenozoica - Eras Geológicas
Era Cenozoica - Eras Geológicas Era Cenozoica - Eras Geológicas
Era Cenozoica - Eras Geológicas
 
Use Node.js to create a REST API
Use Node.js to create a REST APIUse Node.js to create a REST API
Use Node.js to create a REST API
 
Intervenção do homem nos subsistemas terrestres
Intervenção do homem nos subsistemas terrestresIntervenção do homem nos subsistemas terrestres
Intervenção do homem nos subsistemas terrestres
 
Geologia 11 meteorização química
Geologia 11   meteorização químicaGeologia 11   meteorização química
Geologia 11 meteorização química
 
Começando com Vue.js
Começando com Vue.jsComeçando com Vue.js
Começando com Vue.js
 
Spring Framework - Data Access
Spring Framework - Data AccessSpring Framework - Data Access
Spring Framework - Data Access
 
Acidos nucleicos resumo
Acidos nucleicos   resumoAcidos nucleicos   resumo
Acidos nucleicos resumo
 
Resumo 11º ano - rochas sedimentares
Resumo   11º ano - rochas sedimentaresResumo   11º ano - rochas sedimentares
Resumo 11º ano - rochas sedimentares
 
Spring Data JPA
Spring Data JPASpring Data JPA
Spring Data JPA
 
Ppt2 AbsorçãO Radicular
Ppt2   AbsorçãO RadicularPpt2   AbsorçãO Radicular
Ppt2 AbsorçãO Radicular
 
Cognos analytics 導入&サンプルセットアップ手順書
Cognos analytics 導入&サンプルセットアップ手順書Cognos analytics 導入&サンプルセットアップ手順書
Cognos analytics 導入&サンプルセットアップ手順書
 
FT8 - ROCHAS SEDIMENTARES
FT8 - ROCHAS SEDIMENTARESFT8 - ROCHAS SEDIMENTARES
FT8 - ROCHAS SEDIMENTARES
 
Spring Framework - AOP
Spring Framework - AOPSpring Framework - AOP
Spring Framework - AOP
 
Spring + WebSocket integration
Spring + WebSocket integrationSpring + WebSocket integration
Spring + WebSocket integration
 
Introdução ao Framework Jason: Sistemas Multi-agentes na Prática
Introdução ao Framework Jason: Sistemas Multi-agentes na PráticaIntrodução ao Framework Jason: Sistemas Multi-agentes na Prática
Introdução ao Framework Jason: Sistemas Multi-agentes na Prática
 
Introdução a JPA (2010)
Introdução a JPA (2010)Introdução a JPA (2010)
Introdução a JPA (2010)
 
Geo 9 formação das rochas sedimentares (quimiogénicas)
Geo 9   formação das rochas sedimentares (quimiogénicas)Geo 9   formação das rochas sedimentares (quimiogénicas)
Geo 9 formação das rochas sedimentares (quimiogénicas)
 

Ähnlich wie Annotations in PHP: They Exist

Ähnlich wie Annotations in PHP: They Exist (20)

Annotations in PHP - ConFoo 2013
Annotations in PHP - ConFoo 2013Annotations in PHP - ConFoo 2013
Annotations in PHP - ConFoo 2013
 
Annotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnConAnnotating with Annotations - DPC UnCon
Annotating with Annotations - DPC UnCon
 
PHP Annotations: They exist! - JetBrains Webinar
 PHP Annotations: They exist! - JetBrains Webinar PHP Annotations: They exist! - JetBrains Webinar
PHP Annotations: They exist! - JetBrains Webinar
 
Overcoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And ArchitectureOvercoming The Impedance Mismatch Between Source Code And Architecture
Overcoming The Impedance Mismatch Between Source Code And Architecture
 
Annotating with Annotations
Annotating with AnnotationsAnnotating with Annotations
Annotating with Annotations
 
Annotating with Annotations - PHPBenelux June/2012
Annotating with Annotations - PHPBenelux June/2012Annotating with Annotations - PHPBenelux June/2012
Annotating with Annotations - PHPBenelux June/2012
 
Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - ForumPHP 2012
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Extension and Evolution
Extension and EvolutionExtension and Evolution
Extension and Evolution
 
Getting started with titanium
Getting started with titaniumGetting started with titanium
Getting started with titanium
 
Getting started with Appcelerator Titanium
Getting started with Appcelerator TitaniumGetting started with Appcelerator Titanium
Getting started with Appcelerator Titanium
 
Devoxx 2009: The Lift Framework
Devoxx 2009: The Lift FrameworkDevoxx 2009: The Lift Framework
Devoxx 2009: The Lift Framework
 
Designing Optimized Symbols for InduSoft Web Studio Projects
Designing Optimized Symbols for InduSoft Web Studio ProjectsDesigning Optimized Symbols for InduSoft Web Studio Projects
Designing Optimized Symbols for InduSoft Web Studio Projects
 
iOS Application Development
iOS Application DevelopmentiOS Application Development
iOS Application Development
 
Annotations in PHP, They Exist.
Annotations in PHP, They Exist.Annotations in PHP, They Exist.
Annotations in PHP, They Exist.
 
Model-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax DefinitionModel-Driven Software Development - Language Workbenches & Syntax Definition
Model-Driven Software Development - Language Workbenches & Syntax Definition
 
Framework engineering JCO 2011
Framework engineering JCO 2011Framework engineering JCO 2011
Framework engineering JCO 2011
 
C#ppt
C#pptC#ppt
C#ppt
 
CoCoViLa @ devclub.eu
CoCoViLa @ devclub.euCoCoViLa @ devclub.eu
CoCoViLa @ devclub.eu
 

Mehr von Rafael Dohms

Mehr von Rafael Dohms (20)

The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024The Individual Contributor Path - DPC2024
The Individual Contributor Path - DPC2024
 
Application Metrics - IPC2023
Application Metrics - IPC2023Application Metrics - IPC2023
Application Metrics - IPC2023
 
How'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision RecordsHow'd we get here? A guide to Architectural Decision Records
How'd we get here? A guide to Architectural Decision Records
 
Architectural Decision Records - PHPConfBR
Architectural Decision Records - PHPConfBRArchitectural Decision Records - PHPConfBR
Architectural Decision Records - PHPConfBR
 
Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)Application Metrics (with Prometheus examples)
Application Metrics (with Prometheus examples)
 
Application metrics - Confoo 2019
Application metrics - Confoo 2019Application metrics - Confoo 2019
Application metrics - Confoo 2019
 
Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18Writing code you won’t hate tomorrow - PHPCE18
Writing code you won’t hate tomorrow - PHPCE18
 
Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18Application Metrics (with Prometheus examples) #PHPDD18
Application Metrics (with Prometheus examples) #PHPDD18
 
Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18Application metrics with Prometheus - DPC18
Application metrics with Prometheus - DPC18
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
 
Composer The Right Way - 010PHP
Composer The Right Way - 010PHPComposer The Right Way - 010PHP
Composer The Right Way - 010PHP
 
Writing Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, UtrechtWriting Code That Lasts - #Magento2Seminar, Utrecht
Writing Code That Lasts - #Magento2Seminar, Utrecht
 
Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16Composer the Right Way - PHPSRB16
Composer the Right Way - PHPSRB16
 
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
 
Composer the Right Way - MM16NL
Composer the Right Way - MM16NLComposer the Right Way - MM16NL
Composer the Right Way - MM16NL
 
Composer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRNComposer The Right Way - PHPUGMRN
Composer The Right Way - PHPUGMRN
 
Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16Composer the Right Way - PHPBNL16
Composer the Right Way - PHPBNL16
 
“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.“Writing code that lasts” … or writing code you won’t hate tomorrow.
“Writing code that lasts” … or writing code you won’t hate tomorrow.
 
A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015A Journey into your Lizard Brain - PHP Conference Brasil 2015
A Journey into your Lizard Brain - PHP Conference Brasil 2015
 

Kürzlich hochgeladen

Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 

Annotations in PHP: They Exist