[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Help-smalltalk] What strategy to use when developing applications with
[Help-smalltalk] What strategy to use when developing applications with GST?
Wed, 18 Aug 2010 07:15:02 -0700 (PDT)
I was trying to port a sample Iliad application of mine from Squeak to GST.
I'm having difficulty what steps I should follow while developing my app
with GST (I know the question is not very explanatory yet).
Here is the first solution I applied, step by step:
1) I wrote my widgets and application into their respective .st files.
2) I want to test my application. So I created a remote GST using an image
with Iliad pre-loaded:
gst-remote --server -I ../iliad.im
3) I started the Swazoo Iliad server:
gst-remote -e "(Iliad.SwazooIliad startOn:8888) printNl"
4) I created a file, which files in my other files:
gst-remote -e "(FileStream fileIn: 'MyFileIn.st') printNl
The problem with this approach is that I need to put
Namespace current: Iliad 
around all my classes to keep it organized. The good side of this approach
is that it is easy :) Just keep doing step 4 when you modify a method. And
if you do a modification like changing a class' or method's name or remove
one completely, restart the remote GST and file in your MyFileIn.st again.
So that you don't have unnecessary methods or classes on your running image.
Question 1: I guess this is not the way I should develop my applications?
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
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?
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? There is a flag for it on gst-load but I couldn't
figure out how can I apply it on my remote GST's image. I can stop the
server, apply gst-load with force option but then my iliad.im will be
permanently changed. I can create an image with different name but doing
this every time I do a change didn't seem practical.
The third solution would be to use gst-browser:
1) Open gst-browser on an image with Iliad preloaded:
gst-browser -I "iliad.im"
2) Start Swazoo Iliad server via
3) Create your application's classes and methods.
4) Just go test your application on browser and see your modifications
without doing any package loading.
The upside is that you can use "ILErrorHandler debugMode" to debug your
Question 4: "ILErrorHandler debugMode" is supposed to be used when you are
developing with the browser right? When you don't use the browser you should
find out bugs from the error message displayed on the browser?
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?
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?
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 :(
Achievement gained: Reading a long newbie question from start till the end.
* Some of the questions are related to GST in general that's why I posted
here instead of the Iliad group.
View this message in context:
Sent from the Gnu mailing list archive at Nabble.com.
- [Help-smalltalk] What strategy to use when developing applications with GST?,