[aida] A few newbie questions regarding Aida/Web

Janko Mivšek janko.mivsek at eranova.si
Thu Jan 29 18:19:43 CET 2009


Hi TreyC, welcome to the list!

TreyC pravi:
> I just downloaded Damien Cassou's web image for Squeak 3.10.2 to try out
> AidaWeb.  I followed the tutorial at:
> 
> http://www.aidaweb.si/tutorial.html
> 
> and viewed Nicolas Petton's screencast for building a blog in aidaweb.
> 
> ftp://bioskop.fr/screencast/screencast_aida_blog.avi 
> 
> Both the tutorial and the screencast were very helpful in helping me
> understand how to build web apps in Aida, so I want to thank Janko and
> Nicolas for their efforts.  I hope they can find the time and energy to
> write up even more in-depth topics on AidaWeb.

Thanks! Well, more docs are our wish too and I'll add somethng soon by
releasing the code of newly designed website as an example. With short
description as well, I hope.

> I have a couple of newbie Aida questions though:
> 
> (1) I tried out the WebGrid example (section 7 of the tutorial), and found
> the resulting table a little funny looking.  I've attached a screen capture
> below. 
> 
> http://www.nabble.com/file/p21720660/Picture%2B4.png 
> 
> I've viewed this table under both Safari and IE 6.  In each case, I found
> that after the header
> 
> 	Name 	Surname	Phone	Email
> 
> there is a line with 2 blank textboxes:  one under Name and one under
> Surname.

These are filter fields, for fast search. Just tipe few letters on each
and grid will after a second filter out rows starting with those letters.

> Is this something that's to be expected?  The WebGrid otherwise works as it
> should, providing sorting for each column.

If you don't like filters, just remove the line:

	columnFilters: #(nil true true nil nil);

> Is there a way to make this row disappear?  It makes a nice AJAX table look 
> a little awkward.
> 
> (2) Similarly, in the section on Tables (section 4.3) of the tutorial, the
> viewMain method:
> 
> viewMain
>         | e |
>         e := WebElement new.
>         e addTextH1: 'Address book'.
>         e table border: 1.
>         self observee addresses do: [:each |
>             e cell addText: each name. e newCell addText: each surname.
>             e newCell addText: each phone. 
>             e newCell align: #right; addText: each email.
>             e newRow].
>         self pageFrameWith: e title: 'Address book'
> 
> constructs a table which has a single (empty) cell in the final row (see
> screen capture). 
> 
> http://www.nabble.com/file/p21720660/Picture%2B6.png 
> 
> Is this expected behavior? Does the
> 
> 		e newRow
> 
> method advance the "table cursor" so that a new cell is always present at
> the end of the iteration?  is there a way to build the table without having
> any dangling cells in a vacuous final row?

Yes, add a test that this is the last row. Something like:

   each ~= self addresses last ifTrue: [e newRow].
> 
> (3)  Are there some other demo applicaitons that I can study to learn more
> about Aida? I found in the Aida package, a Category called Examples, with
> classes WebDemo and WebDemoApp.  I can't seem to get these to run though.
> 
> I tried:
> 
> 
>     (AIDASite named: 'aidademo') urlResolver defaultURL:
>            '/webdemo.html' forObject: WebDemo new
> 
> 
> but it doesn't appear to show up.

Demo is registered as '/' on default Aida install and contains those
Ajax etc demos. If you try one-click Scribo beta, there are a bit more
stuff, also the new WebSecurityManagerApp.

> (4) Finally, can someone point me to an example of Aida which uses a
> different (simple) CSS stylesheet?  I am not very good with CSS to begin
> with, so I would like to see how Aida can incorporate a different
> stylesheet. Where on the file system would the CSS stylesheet usually be
> stored?

There is SqueakSite package in mc.bisokop.fr where you can find a code
running a Squeak http://www.squeak.org site. In short, you subclass
WebStyle with your own style class and put there your own CSS, by
overriding existinc css methods or making completely your own. Also all
images you put there directly int methods. like headerGif, tehn use
those iamges in CSS like /img/headerGif.gif or like a addGif: #headerGif.

> It's been great fun playing with Aida.  I'd now like to try to build
> something with it.

Yes try it. Real projects show all strenghts of Aida. Just that you need
to grasp the main philosophy behind it. Good luck!

Janko

-- 
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si


More information about the Aida mailing list