SlideShare uma empresa Scribd logo
1 de 138
Baixar para ler offline
*
 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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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)
 

Semelhante a Annotations in PHP: They Exist

Semelhante a 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
 

Mais de Rafael Dohms

Mais de 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
 

Último

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Último (20)

Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
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
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
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
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
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...
 

Annotations in PHP: They Exist