
My wife was kind enough to take the pictures and touch them up! I must admit I love it. Rock on!

public class MyType {
public boolean equals(Object other) {
if (other == null) return false;
if (other == this) return true;
if (!(other instanceof MyType)) return false;
return equals((MyType)other);
}
public boolean equals(MyType other) {
return someValue == other.someValue;
}
}
public void testEquals() {
MyType myType=createExampleMyType();
MyType otherType=createAnotherExampleMyType();
MyType nullMyType=null;
Object nullObject=null;
assertTrue(myType.equals(myType)); //correct
assertFalse(myType.equals(null)); //correct
assertFalse(myType.equals(otherType)); //correct
assertFalse(myType.equals(nullObject)); //correct
assertFalse(myType.equals(nullMyType)); //This thows anException! WHAT THE @#$%^&!!
}
public class MyType {
public boolean equals(Object other) {
if (other == this) return true;
if (!(other instanceof MyType)) return false;
return equals((MyType)other);
}
public boolean equals(MyType other) {
if (other == null) return false;
return someValue == other.someValue;
}
}
Blaine,
I tried to get this to work with Menus and ContextMenus in the ViewComposer, without success.
Could you give us a for dummies description how to do that?
Thanks,
Günther, guenni
setContextMenuFor: aModel
| menu |
menu := aModel isNil
ifTrue: [nil]
ifFalse:
[| contextMenu |
contextMenu := Menu description: 'IRiver'.
aModel actionItemDescriptions do:
[:each | | command description |
command := each key.
description := each value.
contextMenu
addCommand: command
description: description].
contextMenu].
self tree view contextMenu: menu
Mp3Respository>>actionItemDescriptions
| result |
result := super actionItemDescriptions.
result
add: (CommandMessageSend receiver: self selector: #syncBackup) -> 'Sync Backup'.
^result
Mp3Root>>actionItemDescriptions
| result |
result := super actionItemDescriptions.
result
add: (MessageSend receiver: self selector: #save) -> 'Save'.
^result
It is unfortunate that many people in the software industry do not understand that applications come and go, while data remains for much longer.
If, as you are suggesting, every application defined its own terms and essentially created its own data model, how can the enterprise ever know anything? Say, for example, every department and system defined "customer" in its own way, then how can you answer the simple question, "How many customers do we have?"
The fact that data modellers create unchangeable, unmaintainable data models is a reflection on their lack of competence. Most data modellers know zilch about data modelling. Just like the vast majority of Java developers know nothing about OO concepts.
The right approach is to build the data model from an enterprise point of view, then use database views to show the application specific representation. That insulates the application developers from the actual implementation of the data model; and takes care of all the problems you mention.
The main purpose of a RDBMS is to enforce data integrity. Applications used to enforce integrity, but that failed more than three decades ago. That is why the shift to RDBMS occurred. The network model and the hierachic model, along with using files for storing data, rather than a higher level abstraction, created many problems.
You seem to be suggesting that we should go back to the 1970s and try things that were known to have failed at that time. Why do you feel it should succeed this tme?
The original weblog article is flawed in so many respects that one is filled with despair.
If the suggestion is that each application develop its own data model, then what happens to data integrity? How are the common integrity and business rules expected to be applied across all applications? Duplication? What if one application modifies the code in a manner inconsistent with the business rules?
I suggest that you learn a little bit about RDBMS before talking about them.
When: October 11, 2005, 7pm - 9pm
Where: Offices of Northern Natural Gas
1111 S 103rd Street
Omaha Nebraska 68154
Explicity define the context within which a model applies. Explicity set boundaries in terms of team organization, usage within specific parts of the application, and physical manifestations such as code bases and database schemas. Keep the model strictly consistent within these bounds, but don't be distracted or confused by issues outside.