Community Member Profile
- Profile: /members/8012-JF.htm
- Comments: 8
- Points: 87
Recent Blog Comments By JF
-
Thinking About Encapsulation And Direct Object References
Posted on Jun 14, 2011 at 10:15 AM
@Jaime, Re the printer example, it's bogus sure but taught that way most of the time. At least it was a few years ago, hopefully that part of the curriculum changed. I know it took me a good while to get out of the "OMG this isn't strict OOP therefore it's bad" mentality.<... read more »
-
Thinking About Encapsulation And Direct Object References
Posted on Jun 14, 2011 at 10:08 AM
@Jaime, I usually don't use setter validation for expensive operation, most of the time I have it for range check. It's a simple step up from the built in type checking of most languages. Our custom framework does allow us to validate values before passing them so maybe it's why I f... read more »
-
Thinking About Encapsulation And Direct Object References
Posted on Jun 13, 2011 at 10:40 PM
@Ben, No, never heard of Tosh.0. I tried checking it out but comedycentral doesn't like Canucks much and won't let me view it :( Looks good though, I'm sure it's available elsewhere I'll have a look when I have a bit of spare time. As far as the service/persistence thing goes... read more »
-
Thinking About Encapsulation And Direct Object References
Posted on Jun 13, 2011 at 10:09 PM
@Ben, The way I usually see it is that a domain entity should never allow itself to be persisted in a invalid state for the business. It boils down to programming defensively making no assumptions. What if the new guy decide to bypass the service layer and use Girl directly, the... read more »
-
Thinking About Encapsulation And Direct Object References
Posted on Jun 13, 2011 at 12:03 PM
Wouldn't that make more sense if var teenager2 = new Girl(0,"Kit", 17); would be the one responsible for throwing the error, in which case your service layer can simply rethrow it and you've now killed two birds with one stone?... read more »
-
ColdFusion 9's Implicit Getters And Setters Are Hard Coded
Posted on Mar 28, 2011 at 1:30 PM
What I am wondering is why are they faster than the regular explicit function or at least they seem to be in the few test we've done.... read more »
-
The Anti-Spam Technique Used On My ColdFusion Job Board
Posted on Mar 25, 2011 at 3:21 PM
@WebManWalking Facebook.com is number two.... read more »
-
The Anti-Spam Technique Used On My ColdFusion Job Board
Posted on Mar 19, 2011 at 1:13 PM
We use what is called "honeypot captcha". Since most spambot don't parse and evaluate CSS (they aren't that smart yet) we leave a hidden input field on the form. On form submission we make sure it's empty. If it's filled you can be pretty sure it's a bot. All you need is a... read more »



