What did you use to generate the CF from UML?  That is intriguing!

 

Seth

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Aaron 
Rouse
Sent: Wednesday, October 08, 2008 8:23 AM
To: [email protected]
Subject: [houcfug] Re: Getters and Setters

 

CF9  will be great for the people who are lucky enough to work with it.  Most 
of the places I have
worked for do not tend to upgrade their CF unless absolutely forced too.  For 
example in the
upcoming weeks I will be doing what is considered a temp. fix to move our 
public facing server from
CF5 to CF8. The reason for the upgrade is the lack of support for CF5 but it is 
a temp. fix because
ultimately it will be re-written in .NET.  That along with is dev server that I 
already did will be
the only CF8 servers in this company that I have any involvement with, the rest 
range from CF5 to
CF7 with the bulk being I think on CF6 but maybe even CF5.

 

The projects that I have been involved with that did use getters/setters and so 
on would build all
of those basic objects via scripts off of UML diagrams.  Saved a ton of time in 
regards to making
things and then was just a matter of going in and tailoring some of the files 
as needed then running
unit tests against things to ensure they were generated correctly.  We did 
always do a getter/setter
for all properties even though in many cases not all of those were ever used.  
We did that more
because it was auto-generated anyway, would have taken more time to not do it 
that way.

On Wed, Oct 8, 2008 at 8:12 AM, Seth Bienek <[EMAIL PROTECTED]> wrote:

 

Hey James,

 

That's a great article; classic Adam Haskell, he pulls no punches and tells us 
exactly what he
thinks.

 

He raises the issue of writing getters and setters just for the sake of 
architecture, and talks
about what a waste of time and code it is to write these extra methods for the 
sake of sticking to a
design pattern.  He has a good point, but the general counterargument is that 
the point of having a
design pattern is that it follows a pattern.   So if you want to write 
bean-like CFC's, you need to
write getters and setters for even the properties that don't NEED encapsulation.

 

Fortunately, CF9 will provide us (along with a ton of other new features) the 
ability to have
implicit getters and setters (or mutators and accessors if you want to get 
geeky with the
terminology).  What this means is that you can write getters and setters for 
the properties that
need them (a setter that has business logic in it, for example), but you can 
still use setProperty()
to set properties that you haven't explicitly written setter methods for.

 

So the argument against writing empty getters and setters becomes moot.

 

The article is worth a read for anyone who is, or wants to be, working with OO 
ColdFusion, as is
Adam's blog for anyone serious about CF in general.

 

Take Care,

 

Seth

 

From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of James 
Husum
Sent: Wednesday, October 08, 2008 5:59 AM
To: [email protected]
Subject: [houcfug] Getters and Setters

 

Greetings,

Having read this article by Adam Haskell
(http://cfrant.blogspot.com/2008/10/why-bother-getters-setters.html) and the 
topic being kicked off
by our own Seth Bienek I was wondering what people's thoughts were on this. 

I've seen many apps that have been coded with the bean/DAO/Gateway/Service 
object style of doing
things. The beans are nothing but a large collection of getters / setters in 
most cases. The DAO
populates the beans which then get passed around to displays or other 
functions. Is this just adding
lots of overhead to the app? I know this style of coding is not the only way to 
architect a system,
but it certainly seems to be popular and widely pushed among the CF blogs and 
magazines. But is it a
'best practice' or just lots of extra work for little return?

I know, each app should be approached and designed according to its own needs. 
Does having a set way
of doing things (like making beans, DAOs, Gateways, and Service layers) make it 
easier or harder
overall to get an app up and running quickly and keep it maintained over time?

-- 
James Husum
The Quixote Project - one guy's quest to make the world a better place -
http://www.thequixoteproject.org/
Brainsludge - all the shtuff running around my brain - 
http://www.brainsludge.com/
Know any writers? I need their input! - http://www.smotu.org/
Currently reading: The Sapphire Rose by David Eddings

 

 

 




-- 
Aaron Rouse
http://www.happyhacker.com/




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Houston ColdFusion 
Users' Group" discussion list.
To unsubscribe, send email to [EMAIL PROTECTED]
For more options, visit http://groups.google.com/group/houcfug?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to