Entries Tagged as 'Iterator'

Recordset: Create Iterating Domain Objects via Inheritance

Composition , Iterator , Inheritance , ColdFusion 1 Comment »
Now bundled with its distant cousin, the composite Iterator, Recordset provides methods and properties for list traversal via inheritance. Recordset is not a query, but rather a query that is converted to an array of structs. Extending Recordset is useful as an alternative to maintaining an array of objects, or if you want to display a list with calculated fields (an employee has a startdate, but display format is "years of service").

Read more...

Create Iterating Domain Objects Using Composition

Composition , Iterator , ColdFusion , LightWire , ColdSpring 14 Comments »
Over the past month, I've worked on some projects that required special data handling and calculated values. I considered using Peter Bell's Iterating Business Object, but instead decided to build an Iterator that can be composed into my domain objects. I'm a big fan of using "composition over inheritance", so I saw this as a prefect opportunity to add iteration to my domain objects with a minimum impact.

Read more...


Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds