help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] What strategy to use when developing applications w


From: Paolo Bonzini
Subject: Re: [Help-smalltalk] What strategy to use when developing applications with GST?
Date: Wed, 18 Aug 2010 16:31:30 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Lightning/1.0b2pre Mnenhy/0.8.3 Thunderbird/3.0.5

On 08/18/2010 04:15 PM, ZuLuuuuuu wrote:
gst-remote --server -I ../iliad.im
gst-remote -e "(Iliad.SwazooIliad startOn:8888) printNl"

So far so good.

4) gst-remote -e "(FileStream fileIn: 'MyFileIn.st') printNl

Or gst-remote -f MyFileIn.st

The problem with this approach is that I need to put

Namespace current: Iliad []

around all my classes to keep it organized.

Just put this in MyFileIn.st instead. However, I suggest you use another namespace for your application, and import Iliad in it using the #import: pragma:

Namespace current: YourNamespace [
    <import: Iliad>

    ...
]

The second solution is to use package system of GNU Smalltalk. First three
steps are the same with above. Then I proceeded like this:

4) I created a package.xml with an appropriate content.

5) Executed gst-package on this package.xml to create a .star file as root
user (or could use --target-directory flag to create it on my ~/.st
directory).

Do use --target-directory.  Use iliad.im's directory instead of ~/.st.

BTW you'll still need a way to import the Iliad namespace if you use the technique I suggested above, for example a small file containing only

Eval [
    Namespace current import: Iliad
]

6) Then loaded the package in with:

gst-remote -e "(PackageLoader fileInPackage: 'Iliad-More-MyApp') printNl"

Question 2: Is this the way how I should develop my application?

It could be.

Question 3: When I modify something, I recreate the package and try to load
the new package in, I guess it does not load it because it is already
loaded. So my changes do not take effect. How can I force PackageLoader to
load the new package in?

Smalltalk removeFeature: #'Iliad-More-MyApp'.
PackageLoader fileInPackage: 'Iliad-More-MyApp'.

You can put this in a single gst-remote invocation and put that in a script.

Question 5: When using the gst-browser, should I use the file out feature to
keep my application on a VCS like Git or Bazaar? Or am I supposed to use a
solution inside the browser to keep track of my code. I guess this is how it
is done in Squeak, Dolphin etc?

Use a VCS.

Question 6: Again, when deploying my application would using the file out
feature (and then preparing the .star package) be an elegant solution or
when you develope an application on the browser it is supposed to be
distributed via the image file?

Distribute using .star packages.

Question 7: Does anybody use gst-browser to develop real applications yet?
It seems to be giving errors for some basic things like creating a class :(

I think Nicolas and Sebastien do sometimes use it, since they reported bugs, but I'm not sure.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]