Re: returning all table records ColdBox ColdSpring via an object?

2009-08-20 Thread Glyn Jackson
@ Judah McAuley thanks very detailed response. its just a simple record set to display. So what your saying makes sense. ~| Want to reach the ColdFusion community with something they want? Let them know on the House of

Re: returning all table records ColdBox ColdSpring via an object?

2009-08-20 Thread Judah McAuley
On Thu, Aug 20, 2009 at 3:52 AM, Glyn Jacksonglyn.jack...@newebia.co.uk wrote: @ Judah McAuley thanks very detailed response. its just a simple record set to display. So what your saying makes sense. Of course. It has taken me some time to figure it out myself and without the help of

Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Glyn Jackson
Thanks for the reply. reading my question back it did not make much sense, so you did well to work out what I was on about lol! I'd go with a query unless you have a particular reason not to. no reason, that would be the way I would normally do it, however if I wanted to try and keep this

Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Judah McAuley
Using a query doesn't mean you aren't programming in an OO fashion. You can keep your encapsulation while still returning a query or you could turn the query into an array of objects as you desire. In your adminUserService you could have a method called GetAllAdminUsers that calls

Re: returning all table records ColdBox ColdSpring via an object?

2009-08-19 Thread Dominic Watson
Agreed. Indeed, a cfquery object *is* an object. I find the cfquery object is particular perfect for views because it is read-only in terms of interacting with the source of the data. I personally use the IBO approach and release the query object when ready to output the data - but that's just

returning all table records ColdBox ColdSpring via an object?

2009-08-18 Thread Glyn Jackson
Confused about how I would go about returning all records from a table from my DAO? this is how I would return a record with an ID (see below), however when returning all records needed for a cfloop i am not sure. handler variables.adminUsersService.getUserByID(userBean); -- access service

Re: returning all table records ColdBox ColdSpring via an object?

2009-08-18 Thread Kevan Stannard
Hi Glyn, couple of options: 1) If you only need a query, then just return a query. Not ideal, not OO, breaks encapsulation, but does not suffer performance or memory issues. 2) Use an iterating business object which is just like a bean with getters but also has a next() function to move to the