RE: [Flashcoders] Implicit Setters: Is validation considered a good orbad OOP practice ?

2006-09-26 Thread Rui Duarte Silva
Hi, In my opinion (which is a very modest one compared to some of the geniuses that roam around in this list) you should validate and automatically convert the value if it's of the expected type but out of range (less than 0 gets converted to 0 and more than 100 gets converted to 100).

RE: [Flashcoders] Implicit Setters: Is validation considered a good orbad OOP practice ?

2006-09-25 Thread Mark Lapasa
The OO motivation behind using setter (and getters) is that it enforces the notion that nobody should be able to manipulate the state of the object except the object itself. If you follow this design principal as well as a handful of others, you will keep your code low-coupled, less likely to be