ThereCanOnlyBeOne

This is a rough rendering of a page from the old Prevayler wiki. Please see the new wiki for current documentation.

Instead of changing the Person class, for example, you write a new Person2 class. Person2 then has the code to migrate from Person. You can even do lazy migration which is pretty cool. The old Person objects will simply be garbage collected when they are all converted. Another interesting property is that the compiler will catch all the references to the old class for you. No more: "I changed the class and forgot about that obscure referencing class over there." If the new class is backward compatible it can extend the old and all references to the old will still be OK.

In other words, ThereCanOnlyBeOne refers to the fact that there can only be one VERSION of a class with a given name.

"This makes version control and our code much more complex" someone will say. This actually just explicits complexity which already exists but is currently hidden in our version control systems and in our code.

As you can see, it is a pretty unusual approach so I avoid talking much about it not to scare people more that they already are.  @:)

--KlausWuestefeld.