SlideShare a Scribd company logo
*
 PHPBenelux
 -
 June
 Meeting




Annotating
 with
 
  Annotations
   A
 look
 into
 Annotations
 in
 PHP



                                                                                                                             on
 twitter                                 Rafael
 Dohms
                                                                                                                                                                                                                  @rdohms
*
 PHPBenelux
 -
 June
 Meeting




Annotating
 with
 
  Annotations
   A
 look
 into
 Annotations
 in
 PHP



                                                                                                                             on
 twitter                                 Rafael
 Dohms
                                                                                                                                                                                                                  @rdohms
Rafael Dohms




                           photo credit: Eli White
        @rdohms


 Evangelist, Speaker and
      Contributor.

Developer at WEBclusive.

Enabler at AmsterdamPHP.
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 describes behavior of code and
     affects your application in runtime.”


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


“An annotation describes behavior of code and
     affects your application in runtime.”


 “Annotations do not directly affect program
                semantics”
            just
 like
 your
 notes
Annotating with Annotations - PHPBenelux June/2012
In
 2004:
 Metadata
 or
 
“General
 purpose
 Annotations”
In
 2004:
 Metadata
 or
 
“General
 purpose
 Annotations”




                                                                       available
 at
 Runtime
 using
 Reflection
In
 2004:
 Metadata
 or
 
“General
 purpose
 Annotations”

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

                                    @Column(length = 32)
                                    private String name;




                                                                       available
 at
 Runtime
 using
 Reflection
In
 2004:
 Metadata
 or
 
“General
 purpose
 Annotations”
                                                                                                                                                                    specific
 syntax
                    @Entity
                      @Table(name = people)
                      class Person implements Serializable {
                        @Id
                        @GeneratedValue(strategy = GenerationType.AUTO)
                        private Integer id;

                                    @Column(length = 32)
                                    private String name;




                                                                       available
 at
 Runtime
 using
 Reflection
Annotating with Annotations - PHPBenelux June/2012
No
 core
 
annotation
 support
Questions?
Questions?

I’m
 kidding!
Annotating with Annotations - PHPBenelux June/2012
Annotating with Annotations - PHPBenelux June/2012
phpDoc
~2000
PHP
 5.1
  Reflection
 supports
 
   getDocComments()



phpDoc
~2000                              2005
PHP
 5.1
                 Reflection
 supports

More Related Content

KEY
Annotating with Annotations
PDF
Annotating with Annotations - ForumPHP 2012
PDF
Annotating with Annotations - DPC UnCon
PDF
PHP Annotations: They exist! - JetBrains Webinar
PDF
SOFTWARE TOOL FOR TRANSLATING PSEUDOCODE TO A PROGRAMMING LANGUAGE
PDF
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
PDF
Undergrad Interfaces Lecture 2008
PDF
ASE01.ppt
Annotating with Annotations
Annotating with Annotations - ForumPHP 2012
Annotating with Annotations - DPC UnCon
PHP Annotations: They exist! - JetBrains Webinar
SOFTWARE TOOL FOR TRANSLATING PSEUDOCODE TO A PROGRAMMING LANGUAGE
WEB PROGRAMMING UNIT V BY BHAVSINGH MALOTH
Undergrad Interfaces Lecture 2008
ASE01.ppt

What's hot (9)

PDF
Confoo 2011 - Advanced OO Patterns
PDF
OOPSLA02 BehavioralSemantics.ppt
PDF
Web programming UNIT II by Bhavsingh Maloth
PDF
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
DOC
About python
PDF
C++0x :: Introduction to some amazing features
PDF
Uni liverpool
 
PPTX
Listen and look at your PHP code
PDF
Pocket java
Confoo 2011 - Advanced OO Patterns
OOPSLA02 BehavioralSemantics.ppt
Web programming UNIT II by Bhavsingh Maloth
A Logic Meta-Programming Foundation for Example-Driven Pattern Detection in O...
About python
C++0x :: Introduction to some amazing features
Uni liverpool
 
Listen and look at your PHP code
Pocket java
Ad

Viewers also liked (6)

KEY
How to Survive in a Startup Accelerator as a Technical Co-Founder
PDF
Parent Resource Guide
PPTX
Beiko gen gis2-share
PPTX
Innovative Technologies and Student Success
PDF
Herokuで動かす スクリーンショットサーバ
PDF
Blessings of knowledge
How to Survive in a Startup Accelerator as a Technical Co-Founder
Parent Resource Guide
Beiko gen gis2-share
Innovative Technologies and Student Success
Herokuで動かす スクリーンショットサーバ
Blessings of knowledge
Ad

Similar to Annotating with Annotations - PHPBenelux June/2012 (20)

PDF
Annotations in PHP: They Exist
PDF
Annotations in PHP - ConFoo 2013
PDF
Annotations in PHP, They Exist.
PPTX
Spl in the wild - zendcon2012
PDF
StORM preview
PDF
Metaprograms and metadata (as part of the the PTT lecture)
PDF
Harnessing Stack Overflow for the IDE - RSSE 2012
PDF
Hackcamp
PDF
Ow2 Utilities - The Swiss Army Knife Of Ow2 Projects
PDF
Drupaljam xl 2019 presentation multilingualism makes better programmers
PDF
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
PDF
Living With Legacy Code
PDF
Spl in the wild
PDF
Sub-Method Reflection
PPTX
Hiphop php
PDF
Data-Intensive Text Processing with MapReduce
PDF
Data-Intensive Text Processing with MapReduce
PPTX
Dexjava Technical Seminar Dec 2011
PPT
Annotations
PPTX
Annotations in PHP: They Exist
Annotations in PHP - ConFoo 2013
Annotations in PHP, They Exist.
Spl in the wild - zendcon2012
StORM preview
Metaprograms and metadata (as part of the the PTT lecture)
Harnessing Stack Overflow for the IDE - RSSE 2012
Hackcamp
Ow2 Utilities - The Swiss Army Knife Of Ow2 Projects
Drupaljam xl 2019 presentation multilingualism makes better programmers
XConf 2022 - Code As Data: How data insights on legacy codebases can fill the...
Living With Legacy Code
Spl in the wild
Sub-Method Reflection
Hiphop php
Data-Intensive Text Processing with MapReduce
Data-Intensive Text Processing with MapReduce
Dexjava Technical Seminar Dec 2011
Annotations

More from Rafael Dohms (20)

PDF
The Individual Contributor Path - DPC2024
PDF
Application Metrics - IPC2023
PDF
How'd we get here? A guide to Architectural Decision Records
PDF
Architectural Decision Records - PHPConfBR
PDF
Application Metrics (with Prometheus examples)
PDF
Application metrics - Confoo 2019
PDF
Writing code you won’t hate tomorrow - PHPCE18
PDF
Application Metrics (with Prometheus examples) #PHPDD18
PDF
Application metrics with Prometheus - DPC18
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHPKonf
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow. - PHP Yo...
PDF
Composer The Right Way - 010PHP
PDF
Writing Code That Lasts - #Magento2Seminar, Utrecht
PDF
Composer the Right Way - PHPSRB16
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
PDF
Composer the Right Way - MM16NL
PDF
Composer The Right Way - PHPUGMRN
PDF
Composer the Right Way - PHPBNL16
PDF
“Writing code that lasts” … or writing code you won’t hate tomorrow.
PDF
A Journey into your Lizard Brain - PHP Conference Brasil 2015
The Individual Contributor Path - DPC2024
Application Metrics - IPC2023
How'd we get here? A guide to Architectural Decision Records
Architectural Decision Records - PHPConfBR
Application Metrics (with Prometheus examples)
Application metrics - Confoo 2019
Writing code you won’t hate tomorrow - PHPCE18
Application Metrics (with Prometheus examples) #PHPDD18
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. - PHP Yo...
Composer The Right Way - 010PHP
Writing Code That Lasts - #Magento2Seminar, Utrecht
Composer the Right Way - PHPSRB16
“Writing code that lasts” … or writing code you won’t hate tomorrow. - #PHPSRB16
Composer the Right Way - MM16NL
Composer The Right Way - PHPUGMRN
Composer the Right Way - PHPBNL16
“Writing code that lasts” … or writing code you won’t hate tomorrow.
A Journey into your Lizard Brain - PHP Conference Brasil 2015

Recently uploaded (20)

DOCX
The AUB Centre for AI in Media Proposal.docx
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
Spectroscopy.pptx food analysis technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Electronic commerce courselecture one. Pdf
PPT
Teaching material agriculture food technology
The AUB Centre for AI in Media Proposal.docx
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
NewMind AI Weekly Chronicles - August'25-Week II
Reach Out and Touch Someone: Haptics and Empathic Computing
Per capita expenditure prediction using model stacking based on satellite ima...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Programs and apps: productivity, graphics, security and other tools
Advanced methodologies resolving dimensionality complications for autism neur...
“AI and Expert System Decision Support & Business Intelligence Systems”
Spectroscopy.pptx food analysis technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
MYSQL Presentation for SQL database connectivity
Mobile App Security Testing_ A Comprehensive Guide.pdf
Unlocking AI with Model Context Protocol (MCP)
Electronic commerce courselecture one. Pdf
Teaching material agriculture food technology

Annotating with Annotations - PHPBenelux June/2012