aspose file tools*
The moose likes Agile and Other Processes and the fly likes Class normalization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Agile and Other Processes
Bookmark "Class normalization" Watch "Class normalization" New topic
Author

Class normalization

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8919

Hello Scott
What is class Normalization?


Groovy
Surasak Leenapongpanit
Ranch Hand

Joined: May 10, 2002
Posts: 341
see class normalization

Class normalization is a process by which you reorganize the structure of your object schema in such a way as to increase the cohesion of classes while minimizing the coupling between them.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
So would it be fair to say the most often the goal of refactoring is class normalization?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Aurimas Valionis
Greenhorn

Joined: Feb 17, 2005
Posts: 1
A fundamental difference between class normalization and refactoring is that class normalization is typically performed to your models whereas refactorings are applied to your source code.
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ilja Preuss:
So would it be fair to say the most often the goal of refactoring is class normalization?

Most often, probably yes. However, I could imagine someone applying a refactoring to "denormalize" a set of classes in order to make the code more readable, for example.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Aurimas Valionis:
A fundamental difference between class normalization and refactoring is that class normalization is typically performed to your models whereas refactorings are applied to your source code.


I agree that models typically can't be refactored in the strict sense, simply because they don't have behaviour.

But besides that, I don't see where the distinction you are drawing is coming from. When by refactoring I increase cohesion and decrease coupling, why wouldn't I call it class normalization?
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Lasse Koskela:

Most often, probably yes. However, I could imagine someone applying a refactoring to "denormalize" a set of classes in order to make the code more readable, for example.


I could imagine *someone doing that*, too. I'd suspect an alternative design lurking somewhere, though, one in which readability and normalization can coexist in peace.

An example might be interesting...
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
Originally posted by Ilja Preuss:
An example might be interesting...

Yep. I'll try to remember this thread if I ever see one
Scott Ambler
author
Ranch Hand

Joined: Dec 12, 2003
Posts: 608
The goals of both class normalization and refactoring are to produce better designs. Normalization rules can be applied during modeling, as can refactoring for that matter. You can also refactor your code to make it "more normal", for that matter.

In short, they're complementary concepts, not competing concepts.

One of my philosophies is that it rarely makes sense to ask the question "X vs. Y" but instead to ask the question "how well do X and Y complement each other?"

- Scott


<a href="http://www-306.ibm.com/software/rational/bios/ambler.html" target="_blank" rel="nofollow">Scott W. Ambler</a><br />Practice Leader Agile Development, IBM Rational<br /> <br />Now available: <a href="http://www.ambysoft.com/books/refactoringDatabases.html" target="_blank" rel="nofollow">Refactoring Databases: Evolutionary Database Design</a>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Class normalization