TheCode

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

This is a new topic for code discussions.

The current production release implementation code is 335 lines long (See ZeroBugs).
Why are the PrevalentSystem interface methods not in the format of getter/setter? -- GuillermoCastro

I don't like the getter/setter format. It is wordy and unnecessary. -- KlausWuestefeld

But it's a 'standard', and lets bean property accessors (JXPath, for example) happy @:( -- CarlosVillela
Then why not write a wrapper that conforms to this 'standard'? It's not a good idea to use convoluted naming standards for Prevayler just because it could help in some special cases.

Could be, but, heck, wrapping it all just for the sake of standard naming practices? Seems like a bit of overkill to me. I would duplicate, rename and deprecate Prevayler's methods instead. -- CarlosVillela

Because that would force us to live with the ugly getter/setter format. :)


Are these the only code issues you can come up with? I hope no one starts criticizing indentation too. @:) --KlausWuestefeld


Before I still asking questions note: This is one of the best ideas I have seen in a long time.

As I was looking at demo1 and in org.prevayler.implementation.AbstractPrevalentSystem the AlarmClock instance gets Serialized with the NumberKeeper.  Is this necessary?  It seems like it isn't but I wasn't sure.

Also, as that same class is Serializable and designed to be inherited from, shouldn't it define the serialUID.  As it is now, in the future when that class's signature changes, it will break everyone's snapshots as the deserialization will fail.


Help, I am getting this error when running the prevayer demo1
D:\Documents and Settings\Tim\Desktop\GU\Database3001\prevayler1.03.003alpha\prevayler1.03.003alpha\source\org\prevayler\demos\demo1\Main.java:7: cannot resolve symbol
symbol  : class SnapshotPrevayler 
location: package implementation
import org.prevayler.implementation.SnapshotPrevayler;
Do you know what wrong? Does the demo1 work first time?
Regards
Tim