Skip to main content

Michael Long

Member since Apr 7, 2011

Recent Blog Comments By Michael Long

  • A Sub-Class Should Not Access Private Variables In Its Super-Class

    Posted on Jun 6, 2013 at 4:46 PM

    As the saying goes, that's more of a guideline than a rule. One can extend an object to add additional functionality, or in order to alter existing functionality by overriding existing methods. If I override a factory method in order to implement an object pool, I can certainly call the method in ... read more »

  • Domain Models Expose Behavior, Not State

    Posted on Jul 3, 2012 at 2:33 PM

    Ben, I'd amend that to as simple as possible, but no simpler. Take something like an order record. It could point to a customer record for name and address information, or it could store a copy of all of the name and address information, which in turn increases the number of fields dramatically. I... read more »

  • Domain Models Expose Behavior, Not State

    Posted on Jul 3, 2012 at 12:50 PM

    Your example works up until you need to update the task, then all bets are off. It's also a bit simplistic, in that a task may also have a priority, a flag, tags, relate to the individual responsible, to the individual assigning the task, have a type, and on. You can get away with your single inst... read more »

  • ColdFusion 10 - Don't Use Dynamic Query Values In CFLoop

    Posted on Apr 18, 2012 at 11:05 AM

    From a more practical standpoint, doing this makes adding other standards elements difficult or impossible, like showing "XXX records found" above the list, or adding the code needed to support pagination.... read more »

  • Using A Sandbox To Decouple ColdFusion Components In A Modular Application Architecture

    Posted on Apr 17, 2012 at 11:25 AM

    @Ben, a Facade traditionally presents a simpler or easier to use interface. An Adaptor is used when an object (A) expects to use an object with a certain interface (B), and the object you have (C) doesn't conform. The Adaptor wraps a B interface around object C, translating the requests and resu... read more »

  • ColdFusion 10 - Selectively Exposing ColdFusion Component Behaviors - Part II

    Posted on Apr 17, 2012 at 9:33 AM

    @Tom, I know it's a bit out of favor, but that's why you use inheritance. If you have that much logic to manage, you create a master email cfc that knows how to do all of the things you mention, and then all of the individual kids inherit from it, perhaps overriding little things like the subject ... read more »

  • ColdFusion 10 - Selectively Exposing ColdFusion Component Behaviors - Part II

    Posted on Apr 16, 2012 at 6:59 PM

    Ummm... I see the point, but only because there seems to be a flaw in the original design: Why create a single object responsible for sending dozens of different kinds of emails? What happens when I need to now send a shipping confirmation? On the flip side, Apple frequently does something similar... read more »

  • Using A Sandbox To Decouple ColdFusion Components In A Modular Application Architecture

    Posted on Apr 16, 2012 at 12:36 PM

    The example given is really just a Facade / Adaptor / Flyweight design pattern. Basically, object A expects to talk to an object of type B, but you only have an object of type C, so you create a "facade" that looks like a B, but translates parameters and results to and from C. BTW, if yo... read more »

  • My First Year As A Mac User On The Apple MacBook Pro

    Posted on Jun 7, 2011 at 6:08 PM

    Ben: Spaces is my number on productivity tool. If you're coming from Windows, it's obvious that you're used to ALT-Tab and gravitated towards Command-Tab as the equivalent. Don't. Do. That. Success at Spaces requires learning new habits, assigning applications to specific Spaces, and mastering wha... read more »

I believe in love. I believe in compassion. I believe in human rights. I believe that we can afford to give more of these gifts to the world around us because it costs us nothing to be decent and kind and understanding. And, I want you to know that when you land on this site, you are accepted for who you are, no matter how you identify, what truths you live, or whatever kind of goofy shit makes you feel alive! Rock on with your bad self!
Ben Nadel