[aida] Serving static content using AIDA/Web?

Janko Mivšek janko.mivsek at eranova.si
Thu Dec 24 14:26:42 CET 2009

Hi Conrad,

Let me welcome you first to the list!

On 24. 12. 2009 12:50, Conrad Taylor wrote:
> Hi, how does access external resources like images, javascript, and
> stylesheets using AIDA/Web?  Also, I would like to use Apache to serve
> my static content.  Thus, what are the steps to configuring
> Apache?

Aida includes static web serving by itself. To serve external files, you
just put them on the directory, defined in settings (by default is where
image resides) and that's it.

But most of images, CSS and JS is served from so called method
resources, like method images. Method image is an image put as an array
in a normal Smalltalk method. See DefaultWebStyle for a lot of such
methods. Also seee there (and in WebStyle) for such methods for JS and CSS.

Method resources have a big advantage of being stored in your SCM side
by side with Smalltalk methods. You therefore don't need to maintain
them as separate files, which also simplifies installation considerably.

I currently serve everything with Swazoo with its virtual web server
support and because Swazoo is currently only 4x slower than Apache (on
VW), Apache is actually not needed. But if you still like to run behind
Apache, just use reverse proxy approach instead.

Aida currently doesn't have a simple switch to off-load the static
serving to outside server, but it wouldn't be to hard to add such a
feature. It actually was there already, once upon a time ...

Best regards

Janko Mivšek
Smalltalk Web Application Server

More information about the Aida mailing list