Implicit accessors
With the evolution of ColdFusion 9 we are able to write the same powerful, functional components, but with less code. In some instances, this may be due to the fact that we no longer need to write our core components in tag format, but also due to the powerful ability to have the accessor/getter and mutator/setter methods generated for you if required.
This is achieved from the accessors
attribute within the main component
tag. Following is a ColdFusion 9 specific version of our complete Person component:
<cfcomponent displayname="Person" output="false" hint="I am the Person Class." accessors="true"> accessors attributeaccessors attributeabout<cfproperty name="firstName" type="string" default="" setter="false" /> <cfproperty name="lastName" type="string" default="" setter="false" /> <cfproperty name="gender" type="string" default="" setter="false" /> <cfproperty name="dateofbirth" type="string" default="" setter="false" /> <cfproperty name...