Should I Test Factories?

Discussion of testing theory and practice, including methodologies (such as TDD, BDD, DDD, Agile, XP) and software - anything to do with testing goes here. (Formerly "The Testing Side of Development")

Moderator: General Moderators

User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

Maugrim_The_Reaper wrote:I guess there's some terminology you've missed, arborint, in your OOP reading...;)
The number of things I don't know is enormous and seems to grow daily! ;)
Maugrim_The_Reaper wrote:When you finish kicking youself...
I never stop... ;)
Maugrim_The_Reaper wrote:You do know this of course... Also called the "concept that varies" rule which is likely the more common use term...
Never heard of that either ... which is interesting considering that I have read it:

Allan Shalloway from Design Patterns: "Consider what should be variable in your design. Focus on encapsulating the concept that varies. This mandate was a bit confusing to me at first. To me, encapsulation meant "data-hiding". But to the Gang of Four, it means something else: Encapsulating the concept that varies is encapsulation of type."

It ends up there is a little more to the idea than your quote implies...
ole wrote:
OO Design Principles wrote:Single Responsibility Principle
A class should have only one reason to change
Now I have read that -- it's Tom DeMarco. I would say that that idea is fairly old and I think has been superseded by GRASP -- especially for web development. This is a huge subject and these little one-liners don't do it much justice. There is a general reason for cohesion, but there are also may reasons why you would knowingly lower cohesion. It might be an interesting thread as I have pestered ole enought here...
(#10850)
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

The number of things I don't know is enormous and seems to grow daily!
Hehe, I like that. Very much.
t might be an interesting thread as I have pestered ole enough here...
Just so you know, I enjoyed your "pestering" very much :)
Post Reply