[aida] Creating a new site and WebStyle's

Janko Mivšek janko.mivsek at eranova.si
Tue Jan 22 17:51:05 CET 2008


Hi Rob,

Rob Rothwell wrote:

> First, let me thank you for your good work on AIDA!

Thank you and welcome on Aida community's mailing list!

> The business problem I am working on is a healthcare data collection 
> application that combines electronically available data with data that 
> must be manually collected and applies various business logic rules.
> 
> I have known for about 3 years that Smalltalk was the way to go to keep 
> up with the constantly changing business logic and "subclass-like" 
> nature of the problems, but I have admittedly struggled learning it.

Smalltalk is definitively a choice for a changing world and I like to 
mention that the longer living Aida web app has just 10 years (Gas 
Billing System for our national Gas company) and this one went through 
fundamental business changes: tax reform, energy market deregulation, 
Euro. Such a system is the best proof IMHO for Smalltalk and its 
strengths coping with changes through the time.

> Nonetheless, I stuck with it, went through the usual "tool" selection 
> process, and settled on Squeak (for now).  Then I spent a lot of time 
> struggling with Seaside thinking that the best examples would be there 
> now and in the future because, as you put it, it is "more popular."
> 
> But what I found is that AIDA was just easier for a novice Smalltalker 
> to pick up.  You must have done something right!  Seaside feels like  it 
> assumes a much greater knowledge of Web programming, which I am 
> lacking.  AIDA just "makes sense."  Thanks again!

Nice to hear that and my goal developing Aida from the start is 
simplicity and Smalltalk only programming, with as few HTML or CSS 
knowledge as possible.

> Now for my questions:
> 
> 1.  I want to learn how to apply style sheets to my application.  I can 
> find people to help me with CSS, but I was wondering if anyone had a 
> simple example showing some simple WebStyle method overrides and their 
> effects to get me started.

Sublcass WebStyle with your own, then AIDASite named: 'mysite') 
styleClass: 'MyStyle'.

Override existing CSS methods with your own or just make only one 
#cssAll and put everything there. Then "neutralize" other css methods 
with empty ones (see JommlaStyle css-screen no).

For design approach look at http://www.csszengarden.com to see, what can 
be done with clear separation of content from design.


> 2.  It feels like I need to add a new site so I can play around with its 
> WebStyle.  I am developing locally right now, so when I try to add a new 
> local site (after registering a new hostname in the Windows hosts file) 
> with
> 
>      AIDASite newNamed: 'mysite',
> 
> I get the error "Site with such host:ip:port combination not allowed!"

Better simply start a new site:

	SwazooAida startOn: 8889

This will create a new site 'aidaOn8889'. Now stop it and change name 
and even host:ip:port to your needs.

I hope this will help.

Good luck
Janko



> Debugging shows me that I am failing one of the rules:
>     "is host:ip:port combination of aSite allowed regarding to existing 
> sites?"
>     "rules:
>         1. host name must be unique, except if it is * (anyHost) 
>         2. only one site per port can run on any host and all IP 
> interfaces (ip = * or 0.0.0.0 <http://0.0.0.0>)
>         3. if there is a site runing on all IPs, then no one can run on 
> specific ip, per port
>         4. 3 vice versa
>         5. there is no site with the same host ip port combination
>     "
> 
> because of
> 
>     (aSite onAllInterfaces not and: [self hasSiteOnAllInterfacesOnPort: 
> aSite port])
>         ifTrue: [^false].
> 
> Inspecting (SwazooServer singleton sites) reveals the default Swazoo 
> "Hello World" application and the aidademo site both having:
> 
> ip = '*'
> host = '*'
> port = 8888.
> 
> Any suggestions?
> 
> Thanks again for the good work,
> 
> Rob Rothwell
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Aida mailing list
> Aida na aidaweb.si
> http://lists.aidaweb.si/mailman/listinfo/aida

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


More information about the Aida mailing list