On Fri, Dec 12, 2014 at 12:14 PM, Tudor Girba <tudor@tudorgirba.com> wrote:
Hi,

As input for designing new features that better support scripting in Pharo, we would benefit from a bit more input around the role scripts play in your development life.��

To this end, I would like to invite you to share your scripting experience. Here are some questions to start from, but feel free to diverge:

- What kind of actions do you put in scripts?

Definition of configuration of system (e.g. the tree of elements that are loaded by the generic software for a given customer. The file is written by the field engineer using the DSL classes and method).

Definition of parameters (e.g. Seaside ports, email servers, ...) Using Sebastian Sastre's ConfigurationFiles.

Patches for methods in a patches/ folder

Startup script, cleaning caches, reloading structures, overriding parameters, starting RFB, loading new Mczs, ...

��
- Do you rely on script files stored on the disk at all?

Yes, in my conf/ and patches/ for example.��

��

- Where do you store your scripts (in one folder, in many folders)?


Some folders, including one I didn't mentioned here, which is set of files to help me with some aspects that are coming again and again (e.g. configure GT tools, put back normal tools etc).��

Some things I keep around:

https://github.com/philippeback/scripts/tree/master/pharo/Various

Also as gists

https://gist.github.com/philippeback


��
- Do you version your scripts?

Yes

https://github.com/philippeback/scripts/tree/master/pharo

and client code has a branch for each client deployment site.
��

- Do you store them in separate files with dedicated names, or tend to put multiple snippets in one larger file?

Depends on what I do.
��

- Do you rely on the names of the scripts?

Yes, for configuration files.
��

- Why do you use a script file and not a class?

There are two things. I do have utility classes with a lot of methods acting as a facade to the system, so that one can use it in a workspace easily.

Now, these are used in a script to do things like:


AcmeSystem
stop; ����
resetAllCaches;
reloadConfiguration;
...
start.

These would be in a AcmeSystemStart.st that gets loaded by the headless image on the server with the st command line handler.

Also useful is that I do have a command line handler that is wrapped with a acmetools.sh script that calls into the AcmeSystem class for administrative tasks, like in:

./acmetools.sh --list-users
./acmetools.sh --createUser xyz --...


HTH
Phil



Cheers,
Doru



--

"Every thing has its own flow"


--
---
Philippe Back
Visible Performance Improvements
Mob: +32(0) 478 650 140 | Fax: +32 (0) 70 408 027
Mail:phil@highoctane.be | Web: http://philippeback.eu
Blog: http://philippeback.be | Twitter: @philippeback
Youtube: http://www.youtube.com/user/philippeback/videos

High Octane SPRL
rue cour Boisacq 101 | 1301 Bierges | Belgium

Pharo Consortium Member -��http://consortium.pharo.org/
Featured on the Software Process and Measurement Cast -��http://spamcast.libsyn.com
Sparx Systems Enterprise Architect and Ability Engineering EADocX Value Added Reseller
��