Entries Tagged as Iterator
Recordset: Create Iterating Domain Objects via Inheritance
Posted by Paul Marcotte | Tags: ColdFusion , Composition , Inheritance , Iterator
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").Create Iterating Domain Objects Using Composition
Posted by Paul Marcotte | Tags: ColdFusion , ColdSpring , Composition , Iterator , LightWire
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.