Another blow for encapsulation!
I just came across a great post by Dave Spurr who I think does a great job of summarizing why I hate Gateways and returning Queries instead of using Iterating Business Objects to keep encapsulation.
The core of the post is about half way down when he provides a great summary of the benefits of getters and setters and why you'd want to use them consistently - whether returning one record or many.


I've put snippets of code up in earlier postings, and there really isn't that much code to post, but I'm cleaning up my base iterating object and my other base classes, so I'll upload them over the next week or so in case anyone is interested . . .
Best Wishes,
peter
I'm really loooking forward to seeing your code. I think I understand the concepts you promote reasonably well, however seeing code will confirm my understanding (or see me crash to earth in flames!).
Keep up the good work. Your posts are very interesting and informative.
Cheers
OK, I'll post code over the next week or so, but please bear in mind I've posted the code for the first cut of things like the iterating business objects, so it is out there - it is just built into the posts rather than a seperate download.
Still, I'll post more code shortly. Am cleaning up the code and API anyway, so it's a good time!
Best Wishes,
Oeter
I've just noticed the Snippets area in your blog and that covers most of what I wanted to see, so there's no rush on getting out anymore code :)
Cheers
Ciao!
Javi