PHP Annotations: They exist! - JetBrains Webinar

Download PHP Annotations: They exist! - JetBrains Webinar

Post on 08-Sep-2014

36.119 views

Category:

Technology

0 download

Embed Size (px)

DESCRIPTION

Annotations are more than PHPDoc comments, theyre a fully-featured way of including additional information alongside your code. We might have rejected an RFC to add support into the PHP core, but the community has embraced this tool anyway! This session shows you who is doing what with annotations, and will give you some ideas on how to use the existing tools in your own projects to keep life simple. Developers, architects and anyone responsible for the technical direction of an application should attend this session.

TRANSCRIPT

<ul><li> Rafael </li> <li> Dohms Annotations </li> <li> in </li> <li> PHP @rdohms on </li> <li> twitter They </li> <li> Exist! </li> <li> photocredit:EliWhite Evangelist, Speaker and Contributor. ! Enabler at AmsterdamPHP. Rafael Dohms @rdohms drop </li> <li> by </li> <li> if </li> <li> you </li> <li> are </li> <li> in </li> <li> Amsterdam! </li> <li> What? Why? Where? How? a </li> <li> little </li> <li> history show </li> <li> me </li> <li> the </li> <li> code! existing </li> <li> uses Implementing </li> <li> custom </li> <li> annotations based </li> <li> on </li> <li> DMSFilter </li> <li> what? What </li> <li> are </li> <li> annotations? http://ecdesignrebels.blogspot.com </li> <li> -- In English -- "An annotation is a note that is made while reading any form of text." </li> <li> -- In English -- "An annotation is a note that is made while reading any form of text." something </li> <li> that </li> <li> describes </li> <li> an </li> <li> aspect </li> <li> of </li> <li> the </li> <li> subject </li> <li> Annotations do not directly affect program semantics -- In Code Speak -- An annotation is metadata attached to your code, that can be read at runtime. </li> <li> 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 </li> <li> are </li> <li> only </li> <li> observed </li> <li> at </li> <li> Annotations do not directly affect program semantics -- In Code Speak -- just </li> <li> like </li> <li> your </li> <li> notes An annotation is metadata attached to your code, that can be read at runtime. effects </li> <li> are </li> <li> only </li> <li> observed </li> <li> at </li> <li> Annotations in the wild C# </li> <li> Annotations in the wild annotations C#attributes </li> <li> Annotations in the wild annotations C#attributes @Entity! @Table(name = "people")! class Person implements Serializable {! @Id ! @GeneratedValue(strategy = GenerationType.AUTO) ! private Integer id; </li> <li> 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; } </li> <li> Annotations in the wild annotations C#attributes after </li> <li> 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; } </li> <li> Annotations in the wild annotations C#attributes after </li> <li> v1.5 since </li> <li> first </li> <li> 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; } </li> <li> No </li> <li> core </li> <li> annotation </li> <li> support </li> <li> Questions? </li> <li> Questions? Im </li> <li> kidding! </li> <li> phpDoc ~2000 </li> <li> phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 Doctrine </li> <li> 2 </li> <li> Annotation </li> <li> Engine </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 Doctrine </li> <li> 2 </li> <li> Annotation </li> <li> Engine 2010 RFC: </li> <li> Annotations </li> <li> in </li> <li> core </li> <li> w/ </li> <li> custom </li> <li> syntax </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 Doctrine </li> <li> 2 </li> <li> Annotation </li> <li> Engine 2010 RFC: </li> <li> Annotations </li> <li> in </li> <li> core </li> <li> w/ </li> <li> custom </li> <li> syntaxREJECTED </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 Doctrine </li> <li> 2 </li> <li> Annotation </li> <li> Engine 2010 RFC: </li> <li> Annotations </li> <li> in </li> <li> core </li> <li> w/ </li> <li> custom </li> <li> syntax 2011 RFC: </li> <li> DocBlock </li> <li> Annotations </li> <li> in </li> <li> discussion REJECTED </li> <li> First </li> <li> Annotation </li> <li> Engines </li> <li> in </li> <li> PHP phpDoc PHP </li> <li> 5.1 Reflection </li> <li> supports </li> <li> getDocComments() ~2000 2005 2008 Doctrine </li> <li> 2 </li> <li> Annotation </li> <li> Engine 2010 RFC: </li> <li> Annotations </li> <li> in </li> <li> core </li> <li> w/ </li> <li> custom </li> <li> syntax 2011 RFC: </li> <li> DocBlock </li> <li> Annotations </li> <li> in </li> <li> discussion REJECTED 2013 discussion...</li></ul>