There's Dynamic as done in Java, and then there's the real thing, as I do it in my blog server all the time (just this morning, in fact). Code that didn't exist when I first wrote the server? No problem. Replacing methods as the server runs? No problem. Creating new code and just loading it? How do you think the recent addition of iTunes tag support (necessary before I could get the podcasts listed in iTunes and other podcast directories) loaded? I wrote the code, tested it, and had the server load the results. Suddenly the RSS generator was dropping new meta information out.
Here's an old post on how I do the same thing in a client. On the server, the steps are as follows:
- Create new code in my test environment
- Once it works, export the diffs between the old version and the new one (i.e. a Smalltalk file-in for patches to existing code, or a new parcel for completely new stuff)
- On the server, create a small script to load the changes
- Hit the script, have the changes load. On the fly, as the server runs
That's it. No need to write code in some custom fashion to deal with things that didn't exist before - the Smalltalk system just accepts that they're there, and deals with it. This is yet another example of the mental cruft you have to deal with in a language like Java. In Smalltalk, that cruft just doesn't exist.
I'll be over here, being productive. You Java guys can read the multi-page post on how to do the same thing in your world :)
Technorati Tags:
smalltalk, development, cincom smalltalk, dynamic languages