SPrevayler

Marco Paga mail at marco-paga.de
Sun Mar 2 18:05:52 UTC 2003


Hi guys.

Adrian Lienhard wrote:

>Hi Marco, Avi, Stephen... and all
>
>>From the view of usage of Prevayler (as it is implemented at the moment) I
>see the two following shortcomings that need to be addressed:
>
>1. Proxy-Solution
>  
>
>>every message that goes to the proxy is handeld by the prevalence layer.
>>    
>>
>I think this is problematic because you log each message that is sent to the
>domain object, if it is relevant or not, making the log file much bigger
>than necessary. (With the current implementation you have to insert some
>return statements to be able to use the proxy to return objects other than
>self).
>So there should possibly be some kind of distinction if a method is
>effecting the state of the object or not!?
>
>2. As it is now, you have to implement all your relevant methods in one main
>domain object (a PrevalentSystem). I think this will lead to a bad design of
>the domain model. It would be nice if it was possible to record all relevant
>messages to all domain objects.
>
A simple solution to this problem would be to have the logic distributed 
as usual through the whole domain objects and just some caller methods ( 
very general and light wieght ) in the PrevalenceSystem implemented. We 
would not have to hack the whole VM for this approch, but of coure this 
is just possible with a good design.
But perhaps we can use the prevayler more in the background. As I saw 
while thinking about the proxy you can hide the persistence logic away 
(as much as possible) and do more things without the developer even 
noticing it.
I don't know if there is a way that domain objects call the prevayler 
and tell him about a message they recieved that is about to change their 
state. Perhaps it could be done with AspectS and implemented as an 
aspect (There is a way in java to do this). Or is there a way in "clean" 
squeaky smalltalk? If we could do it that way we could hide the 
PrevalentSystem nearly fully away... That would be a persistence 
mechnism that I would like to use. If we achieved this that would be 
great. After that there are so many things that need to be done.

Regards
Marco



More information about the Squeak-dev mailing list