There have been calls for a Magma tutorial to go into the Seaside tutorial in the persistency chapter. This chapter already includes Glorp and GOODS.
Just in case someone is already, or thinking of doing this, I have already written such a mini tutorial.
In order to make Magma even easier to use, I have begun rewriting "Magma seaside" to take advantage of my new Seaside Session Helpers interface, which I released yesterday.
The idea being that you can now use Magma, without a specialized Seaside Session class. This should make it easier for users to adopt Magma for their existing applications.
I am a little unsure as to how you are supposed to obtain an exact match of a unique item from the database. This is how I would do it (althought I know MagmaCollections dont actually implement #firstOrNil)
^ (self users where: [ :each | each email = anEmail ]) firstOrNil
Is there a better way to obtain a unique value?
cheers
Keith
p.s. the wiki page that I refer to on MagmaCollections is a bit out of date. ----
so far...
*Saving all data in an object-oriented database: Magma*
Another option to make your data persistent is to use an object-oriented database like Magma.
*Installing the Magma Database*
Magma is written entirely in Squeak, so there is no need to install a separate server application. Both Magma and Seaside can run in the same image. To install (into a 3.10 based image) just execute the following. (This may take a while)
Installer universes install: 'Magma seasideHelper'. * Configuring your application to use Magma*
In the configuration for the 'todo' application you will need to add WAMagmaConfiguration to the configuration "ancestry". Select it from the drop down menu and click "Add". As soon as you do this, a new group of configuration options will appear. You will need to select the "WAMagma", helper class from the drop down menu.
The WAMagma class provides the basic interface between Magma Sessions and Seaside Sessions. Subclasses provide specialised session management such as shared or pooled sessions.
*Using Magma*
Magma is very easy to use with seaside. To obtain and use a database session helper, simply send #magma to the current session. For example the code "self session magma" will work within all seaside components.
To use Magma in this application in a similar manner to the way we have connected to databases in other examples we need to create an interfacing class, to which we can add our specialized querying methods.
Dictionary subclass: #StMagmaDatabase instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'STTutTodoApp'
StSession-#initialize super initialize. self db: (self magma rootAs: StMagmaDatabase)
The tutorial application accesses the database via the #db accessor. Here we define this using the #rootAs: helper method, which does everything we need, both to initialize the database, and to provide us the interface that we want to it.
To initialize our users collection we define the initialization on our root object, and we need a method to return the users from the database, to add a new user, and to find a user.
StMagmaDatabase-#initialize | users | users := OrderedCollection new. self at: #users put: users.
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ self users detect: [:each | each email = anEmail] ifNone:[]
Notice how for basic usage we have not needed any database specific code! If our userbase is going to grow to a significant size it makes sense to re implement the above using some database features, so we introduce a MagmaCollection which you can read about in detail here: http://wiki.squeak.org/squeak/2639
initialize | users | users := MagmaCollection new. users addIndex: (MaSearchStringIndex attribute: #userName) beAscii. users addIndex: (MaSearchStringIndex attribute: #email) beAscii. self at: #users put: users
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ (self users where: [ :each | each email = anEmail ]) firstOrNil
... need to explain how committing works... etc
In the unsupported classes list in the qiki documentation
it lists as unsupported
Any subclasses of Set or Dictionary.
Surely this is not still true
Keith
Keith Hodges wrote:
In the unsupported classes list in the qiki documentation
it lists as unsupported
Any subclasses of Set or Dictionary.
Surely this is not still true
Keith _
As soon as we get our foot in the door of that new Seaside tutorial I can foresee a revival of interest in Magma from newcomers. I think a review and update of the wiki documentation would be timely.
My new modules scheme would help us walk all over things like RoR and AciveRecord. We can provide modules for logging in, blog data, shops, you name it.
best regards
Keith
Yes, it is still true. The reason is Magma stores the logical instead of the physical structure of these objects to avoid this problem:
http://lists.squeakfoundation.org/pipermail/squeak-dev/2004-July/079600.html
It hasn't been a problem for me because I always wrap a Dictionary or Set instead of subclassing them. It can be done but a little work is needed first.
More basically, what is not supported is generic support for objects with with both named and indexed instance variables. I haven't needed it myself, but would very much like for it to be supported for the sake of transparency the rest of the way through.
The work is needed in "Ma object serialization", which has its own test case which runs all in memory. MaObjectSerializer>>#testMaterialize: allows a very quick way to test serialization / materialization of a single object.
- Chris
On 10/29/07, Keith Hodges keith_hodges@yahoo.co.uk wrote:
In the unsupported classes list in the qiki documentation
it lists as unsupported
Any subclasses of Set or Dictionary.
Surely this is not still true
Keith _______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Chris,
I seem to remember somewhere some documentation mentioning that it is possible to simply perform a commit after not having performed a begin and that this could be a useful commit strategy.
could you give me some more details
thanks in advance
Keith
The default setting for refreshPersistenObjectsEvenWhenChangedOnlyByMe, false, means a begin will only refresh objects changed by others, not your own. You have not lost your work, so it can still be committed.
I have never considered it as a commit strategy myself, but it could be useful to remain outside a transaction, working a long time on the model until ready to commit. For example:
"User does a whole bunch of work on the model" ...
"User is ready to commit, merge everyone elses changes into his own" mySession begin.
"user reviews integrated model, makes any additional updates" ...
"Done reviewing, everything looks good." mySession commit.
- Chris
On 10/29/07, Keith Hodges keith_hodges@yahoo.co.uk wrote:
Chris,
I seem to remember somewhere some documentation mentioning that it is possible to simply perform a commit after not having performed a begin and that this could be a useful commit strategy.
could you give me some more details
thanks in advance
Keith
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
-----Mensaje original----- De: magma-bounces@lists.squeakfoundation.org [mailto:magma-bounces@lists.squeakfoundation.org] En nombre de Chris Muller Enviado el: Lunes, 29 de Octubre de 2007 22:04 Para: Keith Hodges CC: magma@lists.squeakfoundation.org Asunto: Re: Lazy commit strategy.
...
"User does a whole bunch of work on the model" ...
"User is ready to commit, merge everyone elses changes into his own" mySession begin.
"user reviews integrated model, makes any additional updates" ...
"Done reviewing, everything looks good." mySession commit.
- Chris
Hi Chris,
I think I don't get something on this scenario.
Magma will show fresh versions of the objects after the begin? By fresh I mean commited changes of other users made just before the begin of the merger user that was doing it's "bunch of work". If so there could be changes made by others than the merger. How the merger will be guaranteed to see a fresh state of the model?
cheers,
Sebastian PS: I'm asuming that you have on those sessions refreshObjectsEvenIfOnlyChangedByMe in false
Error: Magma helper not selected in application configuration. When I add the WAMagmaConfiguration I see the Magma configuration group but I didn't found any drop down menu where I can select WAMagma.
How can I configure my application for the Magma helper?
Robert
Am 28.10.2007 um 06:57 schrieb Keith Hodges:
There have been calls for a Magma tutorial to go into the Seaside tutorial in the persistency chapter. This chapter already includes Glorp and GOODS.
Just in case someone is already, or thinking of doing this, I have already written such a mini tutorial.
In order to make Magma even easier to use, I have begun rewriting "Magma seaside" to take advantage of my new Seaside Session Helpers interface, which I released yesterday.
The idea being that you can now use Magma, without a specialized Seaside Session class. This should make it easier for users to adopt Magma for their existing applications.
I am a little unsure as to how you are supposed to obtain an exact match of a unique item from the database. This is how I would do it (althought I know MagmaCollections dont actually implement #firstOrNil)
^ (self users where: [ :each | each email = anEmail ]) firstOrNil
Is there a better way to obtain a unique value?
cheers
Keith
p.s. the wiki page that I refer to on MagmaCollections is a bit out of date.
so far...
Saving all data in an object-oriented database: Magma
Another option to make your data persistent is to use an object- oriented database like Magma.
Installing the Magma Database
Magma is written entirely in Squeak, so there is no need to install a separate server application. Both Magma and Seaside can run in the same image. To install (into a 3.10 based image) just execute the following. (This may take a while)
Installer universes install: 'Magma seasideHelper'.
Configuring your application to use Magma
In the configuration for the 'todo' application you will need to add WAMagmaConfiguration to the configuration "ancestry". Select it from the drop down menu and click "Add". As soon as you do this, a new group of configuration options will appear. You will need to select the "WAMagma", helper class from the drop down menu.
The WAMagma class provides the basic interface between Magma Sessions and Seaside Sessions. Subclasses provide specialised session management such as shared or pooled sessions.
Using Magma
Magma is very easy to use with seaside. To obtain and use a database session helper, simply send #magma to the current session. For example the code "self session magma" will work within all seaside components.
To use Magma in this application in a similar manner to the way we have connected to databases in other examples we need to create an interfacing class, to which we can add our specialized querying methods.
Dictionary subclass: #StMagmaDatabase instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'STTutTodoApp'
StSession-#initialize super initialize. self db: (self magma rootAs: StMagmaDatabase)
The tutorial application accesses the database via the #db accessor. Here we define this using the #rootAs: helper method, which does everything we need, both to initialize the database, and to provide us the interface that we want to it.
To initialize our users collection we define the initialization on our root object, and we need a method to return the users from the database, to add a new user, and to find a user.
StMagmaDatabase-#initialize | users | users := OrderedCollection new. self at: #users put: users.
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ self users detect: [:each | each email = anEmail] ifNone:[]
Notice how for basic usage we have not needed any database specific code! If our userbase is going to grow to a significant size it makes sense to re implement the above using some database features, so we introduce a MagmaCollection which you can read about in detail here: http://wiki.squeak.org/squeak/2639
initialize | users | users := MagmaCollection new. users addIndex: (MaSearchStringIndex attribute: #userName) beAscii. users addIndex: (MaSearchStringIndex attribute: #email) beAscii. self at: #users put: users
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ (self users where: [ :each | each email = anEmail ]) firstOrNil
... need to explain how committing works... etc
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hey Robert,
Is not Magma directly related case. I think that is from the package with addons for Seaside that Keith Hodges made. I'm sure you can ask him on the Seaside list,
cheers,
Sebastian Sastre
_____
De: magma-bounces@lists.squeakfoundation.org [mailto:magma-bounces@lists.squeakfoundation.org] En nombre de Robert Schwarz Enviado el: Lunes, 19 de Noviembre de 2007 19:15 Para: magma@lists.squeakfoundation.org Asunto: Tutorial
Error: Magma helper not selected in application configuration. When I add the WAMagmaConfiguration I see the Magma configuration group but I didn't found any drop down menu where I can select WAMagma.
How can I configure my application for the Magma helper?
Robert
Am 28.10.2007 um 06:57 schrieb Keith Hodges:
There have been calls for a Magma tutorial to go into the Seaside tutorial in the persistency chapter. This chapter already includes Glorp and GOODS.
Just in case someone is already, or thinking of doing this, I have already written such a mini tutorial.
In order to make Magma even easier to use, I have begun rewriting "Magma seaside" to take advantage of my new Seaside Session Helpers interface, which I released yesterday.
The idea being that you can now use Magma, without a specialized Seaside Session class. This should make it easier for users to adopt Magma for their existing applications.
I am a little unsure as to how you are supposed to obtain an exact match of a unique item from the database. This is how I would do it (althought I know MagmaCollections dont actually implement #firstOrNil)
^ (self users where: [ :each | each email = anEmail ]) firstOrNil
Is there a better way to obtain a unique value?
cheers
Keith
p.s. the wiki page that I refer to on MagmaCollections is a bit out of date. ----
so far...
Saving all data in an object-oriented database: Magma
Another option to make your data persistent is to use an object-oriented database like Magma.
Installing the Magma Database
Magma is written entirely in Squeak, so there is no need to install a separate server application. Both Magma and Seaside can run in the same image. To install (into a 3.10 based image) just execute the following. (This may take a while)
Installer universes install: 'Magma seasideHelper'.
Configuring your application to use Magma
In the configuration for the 'todo' application you will need to add WAMagmaConfiguration to the configuration "ancestry". Select it from the drop down menu and click "Add". As soon as you do this, a new group of configuration options will appear. You will need to select the "WAMagma", helper class from the drop down menu.
The WAMagma class provides the basic interface between Magma Sessions and Seaside Sessions. Subclasses provide specialised session management such as shared or pooled sessions.
Using Magma
Magma is very easy to use with seaside. To obtain and use a database session helper, simply send #magma to the current session. For example the code "self session magma" will work within all seaside components.
To use Magma in this application in a similar manner to the way we have connected to databases in other examples we need to create an interfacing class, to which we can add our specialized querying methods.
Dictionary subclass: #StMagmaDatabase instanceVariableNames: '' classVariableNames: '' poolDictionaries: '' category: 'STTutTodoApp'
StSession-#initialize super initialize. self db: (self magma rootAs: StMagmaDatabase)
The tutorial application accesses the database via the #db accessor. Here we define this using the #rootAs: helper method, which does everything we need, both to initialize the database, and to provide us the interface that we want to it.
To initialize our users collection we define the initialization on our root object, and we need a method to return the users from the database, to add a new user, and to find a user.
StMagmaDatabase-#initialize | users | users := OrderedCollection new. self at: #users put: users.
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ self users detect: [:each | each email = anEmail] ifNone:[]
Notice how for basic usage we have not needed any database specific code! If our userbase is going to grow to a significant size it makes sense to re implement the above using some database features, so we introduce a MagmaCollection which you can read about in detail here: http://wiki.squeak.org/squeak/2639
initialize | users | users := MagmaCollection new. users addIndex: (MaSearchStringIndex attribute: #userName) beAscii. users addIndex: (MaSearchStringIndex attribute: #email) beAscii. self at: #users put: users
StMagmaDatabase-#users ^ self at: #users
StMagmaDatabase-#addUser: newUser ^ self users add: newUser
StMagmaDatabase-#findUserByEmail: anEmail ^ (self users where: [ :each | each email = anEmail ]) firstOrNil
... need to explain how committing works... etc
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Keith Hodges wrote:
There have been calls for a Magma tutorial to go into the Seaside tutorial in the persistency chapter. This chapter already includes Glorp and GOODS.
Just in case someone is already, or thinking of doing this, I have already written such a mini tutorial.
I'm a beginner so I would be very interested to see a section, included in this tutorial, about patterns/strategies for dealing with transactions and objects updates, in a Seaside+Magma application. For ex. how to perform an update to a user's address? Open a transaction with *session begin* and hold it until the user submits the changes? or make a copy of the persistent object, hand it to the editing component and merge the changes when the user submits? or use Magritte? etc.
Best regards, Dan Corneanu.
Welcome Dan,
I can't provide you of a tutorial but I can give you a reference of working code:
take a look at: http://www.gjallar.se/ you can download an image from: http://mc.gjallar.se/download/
that system uses seaside and magma. Studing how it works (use halt inspect, live instances, debug to see details, etc) can give you lot of answers. Could by a start for your questions,
cheers,
Sebastian Sastre
-----Mensaje original----- De: magma-bounces@lists.squeakfoundation.org [mailto:magma-bounces@lists.squeakfoundation.org] En nombre de Dan Corneanu Enviado el: Lunes, 26 de Noviembre de 2007 06:01 Para: magma@lists.squeakfoundation.org Asunto: Re: Tutorial
Keith Hodges wrote:
There have been calls for a Magma tutorial to go into the Seaside tutorial in the persistency chapter. This chapter already includes Glorp and GOODS.
Just in case someone is already, or thinking of doing this, I have already written such a mini tutorial.
I'm a beginner so I would be very interested to see a section, included in this tutorial, about patterns/strategies for dealing with transactions and objects updates, in a Seaside+Magma application. For ex. how to perform an update to a user's address? Open a transaction with *session begin* and hold it until the user submits the changes? or make a copy of the persistent object, hand it to the editing component and merge the changes when the user submits? or use Magritte? etc.
Best regards, Dan Corneanu.
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
application. For ex. how to perform an update to a user's address? Open a transaction with *session begin* and hold it until the user submits the changes? or make a copy of the persistent object, hand it to the editing component and merge the changes when the user submits? or use Magritte? etc.
Both approaches are good strategies depending on your needs. For simple OLTP like updating a customer address, the former strategy should be fine.
But for, say, complex CAD work requiring long periods of isolated work by a single person (session), the copying strategy is probably more viable.
Tutorial Progress, and Magma seasideHelper update.
We are almost there.... I have posted docs to.
"The Tutorial" http://wiki.squeak.org/squeak/6021
"Magma seasideHelper" http://wiki.squeak.org/squeak/6020
best regards
Keith
====
P.S. Magritte has a cool class for copying objects for editing. These are MAMemento's.
Installer universes install: 'Magma seasideHelper'.
I get a DNU when I run in a base 3.10 image with nothing similar to a Installer universes method.
When I run it in a squeak-dev image, I get the DNU again, but there is a universe (singular) method. When I change it to that, nothing seems to happen.
I tried a more manual approach but I am blocked by the Seaside28Jetsam package. Where does this live?
Thanks, Wilkes
On Dec 9, 2007 4:00 AM, Keith Hodges keith_hodges@yahoo.co.uk wrote:
Tutorial Progress, and Magma seasideHelper update.
We are almost there.... I have posted docs to.
"The Tutorial" http://wiki.squeak.org/squeak/6021
"Magma seasideHelper" http://wiki.squeak.org/squeak/6020
best regards
Keith
====
P.S. Magritte has a cool class for copying objects for editing. These are MAMemento's.
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'.
"The latest Jetsam Seaside Extensions" Installer universe install: 'Kernel-Ext'. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
Thanks for the update.
After playing around with Installer universe install: 'Something', it seems you need to call
(Installer universe install: 'Something') install
For some reason, it seems the first invocation figures out all the dependencies and the second one actually installs them. Weird.
On Dec 9, 2007 9:30 AM, Keith Hodges keith_hodges@yahoo.co.uk wrote:
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'.
"The latest Jetsam Seaside Extensions" Installer universe install: 'Kernel-Ext'. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
Embarrassingly, especially because I wrote Installer and its documentation, I got the code below wrong, so here is a corrected version
sorry
Keith =================================
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer universe install: 'Kernel-Ext'; install. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hi Keith ! I tried to install your SeasideHelper on a fresh squeakDev 3.10 but got problems with Jetsam. From Universe I got this error : "could not find necessary package: Seaside KernelExt-kph". After some search it seems the package is named "KernelExt-kph". And doing "Installer universe install: 'KernelExt-kph'; install." got me teses errors : "This package depends on the following classes: SequenceableCollectionJoinSplitTest You must resolve these dependencies before you will be able to load these definitions: SequenceableCollectionJoinSplitTest>>testJoinTokensUsingCharacter SequenceableCollectionJoinSplitTest>>testJoinTokensUsingString SequenceableCollectionJoinSplitTest>>testJoinUsingArray SequenceableCollectionJoinSplitTest>>testJoinUsingLastOnArray SequenceableCollectionJoinSplitTest>>testJoinUsingLastOnArrayOfStrings SequenceableCollectionJoinSplitTest>>testSplitArray SequenceableCollectionJoinSplitTest>>testSplitBlock SequenceableCollectionJoinSplitTest>>testSplitString
Select Proceed to continue, or close this window to cancel the operation."
Any idea on this one ?
Florian
Keith Hodges wrote:
Embarrassingly, especially because I wrote Installer and its documentation, I got the code below wrong, so here is a corrected version
sorry
Keith
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer universe install: 'Kernel-Ext'; install. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Here is a version which doesnt depend upon Universes for my packages since the "update universes" server appears to be down"
Keith =================================
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer squeaksource package:'311'; install: 'Kernel-Extensions'. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Thanks for the answer. But I got an error and corrected it with this code :
"The latest Jetsam Seaside Extensions" Installer squeaksource project: '311'; package: 'Kernel-Extensions'; install. Installer squeaksource project: 'Jetsam'; package: 'Seaside28Jetsam'; install.
Florian
Keith Hodges wrote:
Here is a version which doesnt depend upon Universes for my packages since the "update universes" server appears to be down"
Keith
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer squeaksource package:'311'; install: 'Kernel-Extensions'. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
In fact the installation of Jetsam worked fine, but not the installation of seasideHelper :
Installer squeaksource project: '311'; package: 'Kernel-Extensions'; install. Installer squeaksource project: 'Jetsam'; package: 'Seaside28Jetsam'; install. Installer squeaksource project: 'MagmaTester'; package: 'Magma seasideHelper'; install.
The last line returns this error : "This package depends on the following classes: TestCaseUsingMagma You must resolve these dependencies before you will be able to load these definitions: WAReadStrategyClassSpecTest WAReadStrategyClassSpecTest>>readStrategyClass WAReadStrategyClassSpecTest>>setUp WAReadStrategyClassSpecTest>>testSimpleCase"
Florian
Florian Minjat wrote:
Thanks for the answer. But I got an error and corrected it with this code :
"The latest Jetsam Seaside Extensions" Installer squeaksource project: '311'; package: 'Kernel-Extensions'; install. Installer squeaksource project: 'Jetsam'; package: 'Seaside28Jetsam'; install.
Florian
Keith Hodges wrote:
Here is a version which doesnt depend upon Universes for my packages since the "update universes" server appears to be down"
Keith
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer squeaksource package:'311'; install: 'Kernel-Extensions'. Installer squeaksource package: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Its not my day... package in previous email should have read project...
Keith =================================
Hello,
Just to reiterate, that the tutorial and the supporting code are a work in progress and they are currently being debugged! When the code works, hopefully in the next hour or two, it will be available as indicated in the tutorial, by Installer universe install: 'Magma SeasideHelper'.
There are 7 different helper options, I may need some help to test them all, to see if they work as described on the tin.
I have not yet uploaded the package to Universes so...
If you would like to see the code so far, and to get ready for its impending readiness you will need:
"to ensure the latest version of Installer with universes support" Installer squeaksource project: 'Installer'; install: 'Installer-Core'.
"The current stable Seaside Release" Installer universe install: 'Seaside'; install.
"The latest Jetsam Seaside Extensions" Installer squeaksource project:'311'; install: 'Kernel-Extensions'. Installer squeaksource project: 'Jetsam'; install: 'Seaside28Jetsam'.
"The current stable Magma release" Installer universe install: 'Magma 1.0 server'; install.
"and finally the curring edge work in progress" Installer squeaksource project: 'MagmaTester'; install: 'Magma seasideHelper'.
"There is also some code for the tutorial" Installer squeaksource project: 'ToDoTutorial'; install: 'STTutTodoApp'.
enjoy and ... watch this space
Keith
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
_______________________________________________ Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
Hello All,
I think that the Magma seasideHelper and the tutorial are now ready for some testing. The MagmaControlPanel is also looking pretty useful, since you can see alll of the open sessions and explore your database and look at your read strategies in detail.
Do note that since there are 7 different helpers and 6 different Read Strategy options, there are many permutations that have not been tested as yet. Some of the sessions have some innovative behaviour which has not been tested in production at all (see the twist* below). These 7 helpers are my best guesses as to useful session management and commit strategies in the seaside context.
Non-Shared Sessions
WAMagma - Basic one session per seaside session (with a twist - the magma session is obtained AFTER the first page hit - since it takes 10 seconds to obtain a session on my machine). WAMagmaBasicPool - As above - A pool of 5-15 sessions obtained in a background process WAMagmaMock - A Mock Session (MagmaCollections are NOT mocked since Chris tells me they should work even if not persisted) This mock does not require 'Magma sunit' package to be loaded unless your app goes beyond the helper api and uses MagmaSessions directly.
Shared Sessions.
WAMagmaSolo - A Shared Session without auto refresh. WAMagmaShared - A Shared Session with auto refresh. WAMagmaSharedAuto - A Shared Session with auto refresh and auto commit. WAMagmaSoloAuto - A Shared Session with auto commitAndBegin (and hence includes auto refresh).
Of the last 4 options, WAMagmaSoloAuto is my favoured option as is it the most transparent strategy. It is set as the default so that the tutorial requires no configuration at all. It will probably work in a non-Solo deployment, thus rendering WAMagmaSharedAuto redundant. If it works well then the other three options could also be removed.
Now that the tutorial works I am now going to turn my attention to porting the Pier-Persistency manager to use this scheme...
enjoy
Keith
I had some problems with finalization of Sessions using helpers that reference Sessions, i.e. WAMagma et al. So if you have been attempting to use any of the tutorial packages, you will need to update to the latest of everything and execute
SmalltalkImage current cleanUpAll. This should empty any instances stuck in the "WeakRegistry default".
cheers
Keith
Hi Chris,
I am having some difficulties... due to trying to use Sub-Classes of Dictionary in Magma... I know you said not to do it, but I thought that if I didnt add any instVars then all would be fine. Is this the case?
If not how can I get my dictionaries to behave just like normal ones?
The problem that I am seeing is that when the special code for Dictionaries is attempting to convert all of the oid-keys and oid-values to real objects.... they are already real objects!
thanks in advance
Keith
Keith Hodges wrote:
Hi Chris,
I am having some difficulties... due to trying to use Sub-Classes of Dictionary in Magma... I know you said not to do it, but I thought that if I didnt add any instVars then all would be fine. Is this the case?
If not how can I get my dictionaries to behave just like normal ones?
The problem that I am seeing is that when the special code for Dictionaries is attempting to convert all of the oid-keys and oid-values to real objects.... they are already real objects!
thanks in advance
Keith
ok... this appears to be a very occasional problem.
Keith
I am pleased to announce that with "Magma seasideHelper" we have totally the simplest persistence solution for seaside!
Here is the "tutorial" segment demonstrating the use of Magma with the 'todo' application (as requested). http://wiki.squeak.org/squeak/6021
The tutorial demonstrates the following features:
1. Complete Transparency - all transactions and commits to the database are performed behind the scenes. 2. Zero Configuration - ready to run "just add magma" to your seaside application. 3. Auto Initialization - the database and your application data models initialize themselves. 4. Magma Collections - indexed large data sets 5. Migration - support for changes to the implementation of persisted models
The documentation for magma seasideHelper is here
"Magma seasideHelper" (the correct URL this time) http://wiki.squeak.org/squeak/6019
This announcement is on the magma mailing list only, after some feedback I will be ready to announce this to the world...
so thank you in advance to anyone who is trying this out, do let me know how you get on
Keith
Dear Keith,
A lot of people have had Seaside + Magma related questions in the past that I have been unable to adequately answer.
You seem to have filled this gap very well, *thank you* for that!
- Chris
On Dec 11, 2007 9:42 AM, Keith Hodges keith_hodges@yahoo.co.uk wrote:
I am pleased to announce that with "Magma seasideHelper" we have totally the simplest persistence solution for seaside!
Here is the "tutorial" segment demonstrating the use of Magma with the 'todo' application (as requested). http://wiki.squeak.org/squeak/6021
The tutorial demonstrates the following features:
- Complete Transparency - all transactions and commits to the database
are performed behind the scenes. 2. Zero Configuration - ready to run "just add magma" to your seaside application. 3. Auto Initialization - the database and your application data models initialize themselves. 4. Magma Collections - indexed large data sets 5. Migration - support for changes to the implementation of persisted models
The documentation for magma seasideHelper is here
"Magma seasideHelper" (the correct URL this time) http://wiki.squeak.org/squeak/6019
This announcement is on the magma mailing list only, after some feedback I will be ready to announce this to the world...
so thank you in advance to anyone who is trying this out, do let me know how you get on
Keith
Magma mailing list Magma@lists.squeakfoundation.org http://lists.squeakfoundation.org/mailman/listinfo/magma
If not how can I get my dictionaries to behave just like normal ones?
The problem that I am seeing is that when the special code for Dictionaries is attempting to convert all of the oid-keys and oid-values to real objects.... they are already real objects!
If you're not adding any inst-vars I think it should work.
If it's not working I think you've identified how to track it down above.. The messages used to convert the Dictionary from its oid-representation to its object-representation; which happens in #maEstablishPointerReferencesUsing:, are the ones that need to be transparently supported by your subclass:
#maRemoveAll #keysAndValuesDo: #at:put:
Dictionary subclasses inherits all of these, of course, but if a particular subclass is so special that something extra is needed then something extra would be needed.
They should not *already* be real objects at that point, if they are then something else must've gone wrong..
Regards, Chris
I am pleased to announce that by popular demand I have written a Magma tutorial segment to go with:
http://www.swa.hpi.uni-potsdam.de/seaside/tutorial (chapter 8)
This tutorial can be found at:
http://wiki.squeak.org/squeak/6021
The tutorial is written built upon an entirely new Magma <-> Seaside integration implementation. This new implementation is still in beta, but has lots of bells and whistles that were not present in the old.
The most important being:
1. "Ready to Run - Just add Magma"
You do not need any special Session, or Root classes, just add WAMagmaConfiguration to your app and you are enabled for persistence.
2. "Auto Initializing"
You do not need to initialize your database separately.
3. "Transparent Transactions" (options)
Database commits can be totally transparent and this is the default configuration WAMagmaSoloAuto.
4. Session Management Options
There is a choice of single, pooled and shared magma session management options.
5. Comprehensive Logging Options
See every decision that magma makes as it reifies your data. (just load "Logging" package and SimpleLog or Toothpick)
6. Control Panel
Shows all the open database sessions, which seaside apps they are serving and allows you to explore their data.
7. Partitioning and Modularity
One database serves multiple domain models. A "Pier Module" can share the db with a "Users/Login Module".
7. Migration
If you change the implementation of a domain-model-root there are hooks for automatic migration
8. Alternative Client Views (experimental)
A Client can access a domain-model-root, as another subclass, for locally defined behaviour, or specialized database read-strategies
The documentation for this new integration layer "Magma seasideHelper" is here:
http://wiki.squeak.org/squeak/6019
---
For early adopters immediate support is available in #squeak irc channel Just ping "Keithy"
enjoy
Keith
magma@lists.squeakfoundation.org