Benefit to using CFC Gateways with Flex, #127

If you follow the OO methodology of making a employee.cfc, employeeDAO.cfc, employeeGateway.cfc, and employee.as to interface with your employee database table, you're doing the right thing in Flex! But this leaves you with a ton of gateway CFCs, which will be a ton of RemoteObject tags in your mxml. So make a GenericGateway.cfc and only have Flex talk to that. Within this, make a function called employee_getAll, with the same return type as the getAll() function in your employeeGateway.cfc. As you need them, add more functions that call the corresponding functions in employeeGateway. Now you have a single RemoteObject tag, calling functions like employee_getAll, department_save, etc, very clear what it's affecting.

Comments
BlogCFC was created by Raymond Camden. This blog is running version 5.9.002. Contact Blog Owner