A few newbie questions regarding AidaWeb

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

A few newbie questions regarding AidaWeb

TreyC
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.

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.



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.

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

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).



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?

(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.


(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?

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

Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

Janko Mivšek
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
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida
Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

TreyC
Thanks, Janko, for answering my questions.

It's remarkable that you are so dedicated to helping out newcomers like this.  Thanks for explaining about columnFilters in WebGrid, and about how table formatting works.

<quote author="Janko Mivsek">
Hi TreyC, welcome to the list!
>>
>> (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.

Can I ask a bit more about this? Suppose I would like to create another AIDASite to run WebDemo, say on

    http://localhost/myprivatewebdemo.html

Following the instructions on http://www.aidaweb.si/administrators-guide.html (section 3.1), I tried to run the following code in a workspace:

   AIDASite newNamed: 'testdemo'.
   (AIDASite named: 'testdemo') host: 'www.mysite.com' ip: '127.0.0.1' port:8888.  
   (AIDASite named: 'testdemo') start

but I got an error message stating:  Site with such host:ip:port combination not allowed!

Since I can't get a new instance of WebDemo running on my local machine, I can't get to the next step of assigning it the URL.

   http://www.mysite.com/myprivatewebdemo.html

How do I go about running WebDemo on this URL?

>> (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.

I tried to download the SqueakSite package at http://mc.bisokop.fr to study it, but the URL does not resolve.  Is the URL correct?

Thanks,

Treyc

Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

TreyC
>>> (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.
>
> I tried to download the SqueakSite package at http://mc.bisokop.fr to study it, but the URL does not
> resolve.  Is the URL correct?

I just found out that the URL should be http://mc.bioskop.fr.  I'll check out the Squeak website package.

Many thanks,

Trey
Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

Nicolas Petton
In reply to this post by TreyC
Hi Treyc,

Le jeudi 29 janvier 2009 à 18:36 -0800, TreyC a écrit :
> but I got an error message stating:  Site with such host:ip:port
> combination
> not allowed!

It seems that you already have a site running on this port or this
domain. Try with a subdomain or with another port.
>
> Since I can't get a new instance of WebDemo running on my local
> machine, I
> can't get to the next step of assigning it the URL.
>
>    http://www.mysite.com/myprivatewebdemo.html
>
> How do I go about running WebDemo on this URL?

(AIDASite named: 'testdemo') urlResolver defaultURL:
'/myprivatewebdemo.html' forObject: (WebDemo new)

HTH,

Nico
--
Nicolas Petton
http://nico.aidaweb.si
            ___
          ooooooo
         OOOOOOOOO
        |Smalltalk|
         OOOOOOOOO
          ooooooo
           \   /
            [|]
--------------------------------
Ma clé PGP est disponible ici :
http://nico.aidaweb.si/pgp-key.html

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

Nicolas Petton
In reply to this post by TreyC
Le vendredi 30 janvier 2009 à 01:46 -0800, TreyC a écrit :
>
> I just found out that the URL should be http://mc.bioskop.fr.  I'll
> check
> out the Squeak website package.

This website runs on top of AIDA/Scribo CMS. be sure to load it first!
http://scribo.aidaweb.si/wiki/installation-guide.html

Cheers!

Nico
--
Nicolas Petton
http://nico.aidaweb.si
            ___
          ooooooo
         OOOOOOOOO
        |Smalltalk|
         OOOOOOOOO
          ooooooo
           \   /
            [|]
--------------------------------
Ma clé PGP est disponible ici :
http://nico.aidaweb.si/pgp-key.html

_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida

signature.asc (204 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: A few newbie questions regarding Aida/Web

Janko Mivšek
In reply to this post by TreyC
Hi Trey,

TreyC pravi:

> Following the instructions on
> http://www.aidaweb.si/administrators-guide.html (section 3.1), I tried to
> run the following code in a workspace:
>
>    AIDASite newNamed: 'testdemo'.
>    (AIDASite named: 'testdemo') host: 'www.mysite.com' ip: '127.0.0.1'
> port:8888.  
>    (AIDASite named: 'testdemo') start
>
> but I got an error message stating:  Site with such host:ip:port combination
> not allowed!

Let you solve that multi-site problem first. Follow instructions:

http://www.nabble.com/URL-resolver-and-registering-root-objects-td21477602.html

and let us report, which sites with which host:ip:combinations you
currently have.

Janko

--
Janko Mivšek
AIDA/Web
Smalltalk Web Application Server
http://www.aidaweb.si
_______________________________________________
Aida mailing list
[hidden email]
http://lists.aidaweb.si/mailman/listinfo/aida