<br><br><div class="gmail_quote">On Tue, Oct 6, 2009 at 1:18 PM, Juan <span dir="ltr">&lt;<a href="mailto:smalltalker.marcelo@gmail.com">smalltalker.marcelo@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Mariano folks<br>
<div class="im"><br>
<br>
On Tue, Oct 6, 2009 at 7:00 AM, Mariano Martinez Peck<br>
&lt;<a href="mailto:marianopeck@gmail.com">marianopeck@gmail.com</a>&gt; wrote:<br>
&gt; Hi folks: There is some interest in porting SqueakDBX to different<br>
&gt; Smalltalks. Jan Vrany wants to port it to Smalltalk/X and Marcelo Cortez to<br>
&gt; Dolphin. So, the idea is to discuss here the necessary things I should<br>
&gt; modify so that this task is easier for you.<br>
&gt;<br>
&gt; I have been talking with Jan in ESUG and he found a couple of things I<br>
&gt; should do. In addition, I already did the stable release, so I can break<br>
&gt; whatever I want :)<br>
&gt;<br>
&gt; About the code, I will do these things:<br>
<br>
&gt;<br>
&gt; 1) Create the abstract class SqueakDBXSmalltalkDialect with all of the<br>
&gt; messages like self subclassResponsibility. This class will be in the core.<br>
<br>
</div>like template pattern?.<br></blockquote><div><br>yes<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&gt;<br>
&gt; 2) Create a package in my monticello repo called SqueakDBX-Dialect-Squeak<br>
&gt; and I will create there the class SqueakDBXSqueakDialect (subclass of<br>
&gt; SqueakDBXSmalltalkDialect ) . Now, for Squeak and Pharo users they will need<br>
&gt; not only the core, but also this package. If you want to put here packages<br>
&gt; like SqueakDBX-Dialect-SmalltalkX or SqueakDBX-Dialect-Dolphin, there is no<br>
&gt; problem. But I don&#39;t know if this is useful for you.<br>
&gt;<br>
</div>Dolphin don&#39;t support monticello, changeset is more appropiated. i think.<br></blockquote><div><br>Ok. We can create a changeset instead of monticello<br> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">

<div class="im"><br>
&gt; 3) FFI calls. This is dialect dependent, but the current design is perfect<br>
&gt; for this :)<br>
&gt; I will keep the class abstract class OpenDBX  in the core and that will be<br>
&gt; the API. As you can see there are all the messages with a  self<br>
&gt; subclassResponsibility. I will then move my current subclasses of OpenDBX to<br>
&gt; the package SqueakDBX-Dialect-Squeak.<br>
&gt; Then, what you should to in your dialects is to create a subclass of it and<br>
&gt; use that. See the message OpenDBX class&gt;&gt;ffiImplementationForOS<br>
<br>
</div>ok.<br>
<div class="im"><br>
&gt;<br>
&gt; 4) WeakRegistry and GC: As you may know, we keep the connections in the<br>
&gt; WeakRegistry so that we can release the database connection when the GC<br>
&gt; collects a DBXConnection object.<br>
&gt; But this, again, is dialect dependent. So, the piece of code that was doing<br>
&gt; this, now it will delegate to the current SqueakDBXSmalltalkDialect<br>
&gt; subclass. In my case it will be SqueakDBXSqueakDialect but in your case it<br>
&gt; will be other.<br>
&gt;<br>
</div>Dolphin don&#39;t have weak collections.<br></blockquote><div><br>Ok, but there is a way you can register an object somewhere so that the GC send a particular message to it when it is being garbage collected?<br><br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im"><br>
&gt; 5) Now, all the things that are dialect specific should be in<br>
&gt; SqueakDBXSmalltalkDialect and subclasses.<br>
&gt;<br>
&gt; 6) The core is thought in an ANSI Smalltalk. So, it will be difficult if for<br>
&gt; every message or class you don&#39;t have in your dialect I have to change<br>
&gt; something. That would be part of the port work :)   Anyway, we can discuss<br>
&gt; each of these situations and evaluate what to do.<br>
&gt;<br>
&gt;<br>
&gt; Now, about the procedure, as I talk with Marcelo, I think the best way to do<br>
&gt; this is to do something like TDD:<br>
&gt;<br>
&gt; - First you port the tests<br>
&gt; - You port the rests of the things until the tests are green :)<br>
</div>Yes agree ,then refactoring for Dialect&#39;s support/<br>
<br>
in shot:<br>
make it works.( green test)<br>
refactoring ( plugability of dialects)<br></blockquote><div><br>ok, but the idea is: if you will be the maintainer of the port of SqueakDBX to another dialect, it would be excellent if this port takes the less time as possible. If you have to change a lot, you won&#39;t want to do more ports anymore hahaha. <br>
 </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
make run faster.<br>
<br>
Best<br>
Mdc<br>
<div class="im"><br>
<br>
&gt;<br>
&gt; What do you think about this?<br>
&gt;<br>
&gt; Best,<br>
&gt;<br>
&gt; Mariano<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
</div>&gt; _______________________________________________<br>
&gt; SqueakDBX mailing list<br>
&gt; <a href="mailto:SqueakDBX@lists.squeakfoundation.org">SqueakDBX@lists.squeakfoundation.org</a><br>
&gt; <a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
&gt;<br>
&gt;<br>
_______________________________________________<br>
SqueakDBX mailing list<br>
<a href="mailto:SqueakDBX@lists.squeakfoundation.org">SqueakDBX@lists.squeakfoundation.org</a><br>
<a href="http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx" target="_blank">http://lists.squeakfoundation.org/mailman/listinfo/squeakdbx</a><br>
</blockquote></div><br>