<br>Thanks by the response Chris.<br>
<br>
Thinking a bit about your responses, I started migrating the business
objects to Magma, and I already completed some collections!.<br>
<br>
But I must to learn a lot yet, and surely will be here asking again soon :)<br>
<br>
Cheers and thanks by the help.<br>
<br>
Germán.<br>
<br><br><div><span class="gmail_quote">2008/4/16, Chris Muller <<a href="mailto:asqueaker@gmail.com">asqueaker@gmail.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Germán,<br> <br><br> > business objects and, as I don't know another way, I tried (as stated on<br> > Getting Started):<br> ><br> > MagmaRepositoryController<br> > create: 'c:\myMagmaFolder'<br>
> root: Dictionary new<br> <br> <br>The getting started only uses a Dictionary because it doesn't want to<br> be partial to any sort of domain. It is actually something I<br> recommend against doing nowadays.<br>
<br><br> > were instead "Dictionary new" I did "MySystem current" (the singleton<br> > instance that permit to reach all the objects of the system).<br> <br> <br>Now, you do NOT want to have your root persistent object continue to<br>
be a referenced in the image by some class variable. This will cause<br> the entire database to remain in memory and slow your commits to a<br> crawl, among other potential identity issues if you have multiple<br> users.<br>
<br> Instead, just treat the repository root as the new "location" of your<br> singleton instance, accessed by "mySession root".<br> <br><br> > And here start the doubts:<br> ><br> > 1. Soon I get the serialization problem with the 10MB limit. How I should<br>
> manage this situation to create the repository by parts, to avoid the size<br> > problem, doing commits more frequently if all I can do is point my whole<br> > system to #root: ?<br> <br> <br>If you have a large model already in the image that you need to<br>
initially persist, you can simply eliminate the 10-meg safety limit<br> check and commit the thing in one big transaction. Be patient, it may<br> take a while, but its a one-time thing. Once committed, you can<br> reinstate the safety check and access the model normally.<br>
<br><br> > 2. If the system were little (not problem with the serialization limit),<br> > only doing the above sentence I get the repository and the objects<br> > persistent?<br> <br> <br>I may not be reading what you're asking here correctly, but I think<br>
the answer is yes. You can do "one big commit" just for the initial<br> "load" and then after that your application program should commit<br> single "units of work", changes to the model that must be committed as<br>
a whole (like a monetary transfer from one account to another), but<br> only that unit of work, as is reasonably feasible.<br> <br><br> > 3. Is acceptable to use a class that inherits from Object instead Dictionary<br>
> (as in the example) to point the root object? Considerations of each<br> > alternative?<br> <br> <br>Yes, not only is it acceptable, it is recommended to use a meaningful<br> domain object as your root instead of a not-so-meaningful Dictionary.<br>
<br><br> > 4. Is acceptable/possible to have more than 1 repository to 1 system ?<br> <br> <br>Yes, not only is it acceptable, it is recommended to partition your<br> domain by meaningful boundaries. For example, in my system I separate<br>
the Accounting domain from the Contacts; each in their own repository,<br> even though Accounts reference Contacts residing in the other<br> repository. This is accomplished via MagmaForwardingProxy.<br> <br> This partitioning provides many benefits.<br>
<br><br> > Well, it's all for now, sorry if are so simple questions, but as I've said,<br> > I'm stating with Magma.<br> <br> <br>Cheers,<br> <br> Chris<br> </blockquote></div><br><br clear="all"><br><br>