SlideShare una empresa de Scribd logo
1 de 140
Descargar para leer sin conexión
Rafael
 Dohms
Annotations
 in
 PHP
@rdohms
on
 twitter
They
 Exist!
photocredit:EliWhite
Evangelist, Speaker and
Contributor. 	

!
Enabler at AmsterdamPHP.
Rafael Dohms
@rdohms
drop
 by
 if
 you
 are
 in
 Amsterdam!
What? Why? Where?
How?
a
 little
 history
show
 me
 the
 code!
existing
 uses
Implementing
 custom
 annotations
based
 on
 DMSFilter
what?
What
 are
 annotations?
http://ecdesignrebels.blogspot.com
-- In English --
An annotation is a note that is made while
reading any form of text.
-- In English --
An annotation is a note that is made while
reading any form of text.
something
 that
 describes
 an
 aspect
 of
 the
 subject
“Annotations do not directly affect program
semantics”
-- 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 --
just
 like
 your
 notes
“An annotation is metadata attached to your
code, that can be read at runtime.”
effects
 are
 only
 observed
 at
Annotations in the wild
C#
Annotations in the wild
annotations
C#attributes
Annotations in the wild
annotations
C#attributes
@Entity!
@Table(name = people)!
class Person implements Serializable {!
@Id !
@GeneratedValue(strategy = GenerationType.AUTO) !
private Integer id;
Annotations in the wild
annotations
C#attributes
@Entity!
@Table(name = people)!
class Person implements Serializable {!
@Id !
@GeneratedValue(strategy = GenerationType.AUTO) !
private Integer id;
public class Customer!
{!
[Required]!
[StringLength(50)]!
public string Prename { get; set; }!
!
[Column(TypeName = image)]!
public byte[] Image { get; set; }
Annotations in the wild
annotations
C#attributes
after
 v1.5
@Entity!
@Table(name = people)!
class Person implements Serializable {!
@Id !
@GeneratedValue(strategy = GenerationType.AUTO) !
private Integer id;
public class Customer!
{!
[Required]!
[StringLength(50)]!
public string Prename { get; set; }!
!
[Column(TypeName = image)]!
public byte[] Image { get; set; }
Annotations in the wild
annotations
C#attributes
after
 v1.5
since
 first
 release
@Entity!
@Table(name = people)!
class Person implements Serializable {!
@Id !
@GeneratedValue(strategy = GenerationType.AUTO) !
private Integer id;
public class Customer!
{!
[Required]!
[StringLength(50)]!
public string Prename { get; set; }!
!
[Column(TypeName = image)]!
public byte[] Image { get; set; }
No
 core
 
 
annotation
 support
Questions?
Questions?
I’m
 kidding!
phpDoc
~2000
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005
First
 
Annotation
 
 Engines
 in
 PHP
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005
First
 
Annotation
 
 Engines
 in
 PHP
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005 2008
First
 
Annotation
 
 Engines
 in
 PHP
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005 2008
Doctrine
 2
 

Annotation
 Engine
First
 
Annotation
 
 Engines
 in
 PHP
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005 2008
Doctrine
 2
 

Annotation
 Engine
2010
RFC:
 Annotations
 
in
 core
 w/
 custom
 
syntax
First
 
Annotation
 
 Engines
 in
 PHP
phpDoc
PHP
 5.1

Reflection
 supports
 

getDocComments()
~2000 2005 2008
Doctrine
 2
 

Annotation
 Engine
2010
RFC:
 Annotations
 
in
 core
 w/

Más contenido relacionado

La actualidad más candente

Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
J. C.
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)
Muhammad Haseeb Shahid
 

La actualidad más candente (20)

MongoDB.local Berlin: How to add your favorite language to MongoDB Compass
MongoDB.local Berlin: How to add your favorite language to MongoDB CompassMongoDB.local Berlin: How to add your favorite language to MongoDB Compass
MongoDB.local Berlin: How to add your favorite language to MongoDB Compass
 
Python Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & stylePython Foundation – A programmer's introduction to Python concepts & style
Python Foundation – A programmer's introduction to Python concepts & style
 
Chapter1pp
Chapter1ppChapter1pp
Chapter1pp
 
Four Languages From Forty Years Ago
Four Languages From Forty Years AgoFour Languages From Forty Years Ago
Four Languages From Forty Years Ago
 
Design Pattern Automation
Design Pattern AutomationDesign Pattern Automation
Design Pattern Automation
 
Dart ppt
Dart pptDart ppt
Dart ppt
 
Margareth lota
Margareth lotaMargareth lota
Margareth lota
 
Survey on Script-based languages to write a Chatbot
Survey on Script-based languages to write a ChatbotSurvey on Script-based languages to write a Chatbot
Survey on Script-based languages to write a Chatbot
 
CS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: IntroductionCS4200 2019 Lecture 1: Introduction
CS4200 2019 Lecture 1: Introduction
 
Overview of php
Overview of phpOverview of php
Overview of php
 
Clean code
Clean codeClean code
Clean code
 
Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2Build powerfull and smart web applications with Symfony2
Build powerfull and smart web applications with Symfony2
 
Why I Love Python
Why I Love PythonWhy I Love Python
Why I Love Python
 
C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#C# 101: Intro to Programming with C#
C# 101: Intro to Programming with C#
 
GDG Helwan Introduction to python
GDG Helwan Introduction to pythonGDG Helwan Introduction to python
GDG Helwan Introduction to python
 
Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)Page List & Sample Material (Repaired)
Page List & Sample Material (Repaired)
 
From Programming to Modeling And Back Again
From Programming to Modeling And Back AgainFrom Programming to Modeling And Back Again
From Programming to Modeling And Back Again
 
Character sets and iconv
Character sets and iconvCharacter sets and iconv
Character sets and iconv
 
Lexing and parsing
Lexing and parsingLexing and parsing
Lexing and parsing
 
Why do we want c# 7
Why do we want c# 7Why do we want c# 7
Why do we want c# 7
 

Similar a PHP Annotations: They exist! - JetBrains Webinar

Development workflow
Development workflowDevelopment workflow
Development workflow
Sigsiu.NET
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
Gabriele Santini
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
Satish Verma
 
Python_for_Visual_Effects_and_Animation_Pipelines
Python_for_Visual_Effects_and_Animation_PipelinesPython_for_Visual_Effects_and_Animation_Pipelines
Python_for_Visual_Effects_and_Animation_Pipelines
Russell Darling
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
Peter Hilton
 

Similar a PHP Annotations: They exist! - JetBrains Webinar (20)

Annotations in PHP: They Exist
Annotations in PHP: They ExistAnnotations in PHP: They Exist
Annotations in PHP: They Exist
 
Annotations in PHP - ConFoo 2013
Annotations in PHP - ConFoo 2013Annotations in PHP - ConFoo 2013
Annotations in PHP - ConFoo 2013
 
T4 presentation
T4 presentationT4 presentation
T4 presentation
 
Code Generation using T4
Code Generation using T4Code Generation using T4
Code Generation using T4
 
Practical PowerShell Programming for Professional People
Practical PowerShell Programming for Professional PeoplePractical PowerShell Programming for Professional People
Practical PowerShell Programming for Professional People
 
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
Survival Strategies for API Documentation: Presentation to Southwestern Ontar...
 
Development workflow
Development workflowDevelopment workflow
Development workflow
 
Listen and look at your PHP code
Listen and look at your PHP codeListen and look at your PHP code
Listen and look at your PHP code
 
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
 
Visual Studio .NET2010
Visual Studio .NET2010Visual Studio .NET2010
Visual Studio .NET2010
 
Python_for_Visual_Effects_and_Animation_Pipelines
Python_for_Visual_Effects_and_Animation_PipelinesPython_for_Visual_Effects_and_Animation_Pipelines
Python_for_Visual_Effects_and_Animation_Pipelines
 
Play framework: lessons learned
Play framework: lessons learnedPlay framework: lessons learned
Play framework: lessons learned
 
Open event (show&tell april 2016)
Open event (show&tell april 2016)Open event (show&tell april 2016)
Open event (show&tell april 2016)
 
API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)API workshop: Introduction to APIs (TC Camp)
API workshop: Introduction to APIs (TC Camp)
 
Dojo & HTML5
Dojo & HTML5Dojo & HTML5
Dojo & HTML5
 
Joomla tempates talk
Joomla tempates talkJoomla tempates talk
Joomla tempates talk
 
Xtext Webinar
Xtext WebinarXtext Webinar
Xtext Webinar
 
Php training100%placement-in-mumbai
Php training100%placement-in-mumbaiPhp training100%placement-in-mumbai
Php training100%placement-in-mumbai
 
Modelling and Programming: Isn’t it all the same?
Modelling and Programming: Isn’t it all the same?Modelling and Programming: Isn’t it all the same?
Modelling and Programming: Isn’t it all the same?
 
Symfony + GraphQL
Symfony + GraphQLSymfony + GraphQL
Symfony + GraphQL
 

Más de Rafael Dohms

Más 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

Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
FIDO Alliance
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
panagenda
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
FIDO Alliance
 

Último (20)

Design and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data ScienceDesign and Development of a Provenance Capture Platform for Data Science
Design and Development of a Provenance Capture Platform for Data Science
 
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptxHarnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
Harnessing Passkeys in the Battle Against AI-Powered Cyber Threats.pptx
 
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on ThanabotsContinuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
Continuing Bonds Through AI: A Hermeneutic Reflection on Thanabots
 
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
Easier, Faster, and More Powerful – Alles Neu macht der Mai -Wir durchleuchte...
 
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
Human Expert Website Manual WCAG 2.0 2.1 2.2 Audit - Digital Accessibility Au...
 
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
Secure Zero Touch enabled Edge compute with Dell NativeEdge via FDO _ Brad at...
 
ADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptxADP Passwordless Journey Case Study.pptx
ADP Passwordless Journey Case Study.pptx
 
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdfHow Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
How Red Hat Uses FDO in Device Lifecycle _ Costin and Vitaliy at Red Hat.pdf
 
AI mind or machine power point presentation
AI mind or machine power point presentationAI mind or machine power point presentation
AI mind or machine power point presentation
 
Design Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptxDesign Guidelines for Passkeys 2024.pptx
Design Guidelines for Passkeys 2024.pptx
 
ERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage IntacctERP Contender Series: Acumatica vs. Sage Intacct
ERP Contender Series: Acumatica vs. Sage Intacct
 
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
ASRock Industrial FDO Solutions in Action for Industrial Edge AI _ Kenny at A...
 
Overview of Hyperledger Foundation
Overview of Hyperledger FoundationOverview of Hyperledger Foundation
Overview of Hyperledger Foundation
 
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider  Progress from Awareness to Implementation.pptxTales from a Passkey Provider  Progress from Awareness to Implementation.pptx
Tales from a Passkey Provider Progress from Awareness to Implementation.pptx
 
WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024WebRTC and SIP not just audio and video @ OpenSIPS 2024
WebRTC and SIP not just audio and video @ OpenSIPS 2024
 
Generative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdfGenerative AI Use Cases and Applications.pdf
Generative AI Use Cases and Applications.pdf
 
State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!State of the Smart Building Startup Landscape 2024!
State of the Smart Building Startup Landscape 2024!
 
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdfWhere to Learn More About FDO _ Richard at FIDO Alliance.pdf
Where to Learn More About FDO _ Richard at FIDO Alliance.pdf
 
Working together SRE & Platform Engineering
Working together SRE & Platform EngineeringWorking together SRE & Platform Engineering
Working together SRE & Platform Engineering
 
Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024Extensible Python: Robustness through Addition - PyCon 2024
Extensible Python: Robustness through Addition - PyCon 2024
 

PHP Annotations: They exist! - JetBrains Webinar