A few word about Magma+Seaside experience

Hilaire Fernandes hilaire2006 at laposte.net
Sat Apr 7 13:14:51 UTC 2007


Ok, I think I have sorted out my index and persistence problem.

In fact the problem does not come from the indexes, thoses ones work 
pretty well. Instead I have been experiencing design problem when using 
the combination of Magma+Seaside, and in particular the 
continuation/back-button or whatever it is named.

I found it was pretty neat to used seaside+magma that way:

IFIDbSession
    commit: [IFIDbSession noteOldKeyFor: learner.
       self call: ((IFILearnerView new)
          school: school;
          learner: learner)]

I found it will optimize the transaction as all the changed attributes 
of the learner object through the view component will be updated in the 
DB in one shot.
This work pretty well but when the user decides to press the back 
button, so in this case the commit never has a chance to terminated (I 
guess so). So latter tentative to commit will never happen. This is at 
least what I saw.

To fix that I have moved the commit down in accessors of the learner 
class, for example:

IFILearner>>firstName: string1
	IFIDbSession commit:
		[IFIDbSession noteOldKeyFor: self.
		firstName := string1]

Now I found the process of updating/adding such instances/attributes 
seems to be slower, as several attributes are updated that way. I will 
need to measure exactly...

Will the MagmaSessionRequest be an option to group in batch the commit?
How is it handled when several MagmaSession instances co-exist in the 
same image?

So when using Seaside/Magma beware to not mix commit: and call:

Hilaire



More information about the Magma mailing list