Hi,
I'm continuing on my aida investigation -- and have just struck the
WebStyle and WebApplication classes.
My question, first up, how would you create two or more WebStyles for
a site? and apply these to particular pages (or rather WebApplication
objects.)
My question led me to investigate WebApplication and WebStyle a bit
more closely. These two classes seem very coupled and because of the
obscuring (imho) #dnu: implementation ... that redirects many, many
messages to the style class it makes it difficult to understand the
framework.
WebApplication>>doesNotUnderstand: aMessage
"forward a message to a style for processing"
^self style
perform: aMessage selector
withArguments: aMessage arguments
My troubles began in the tutorial and the #pageFrameWith:title:
viewMain
| e |
e := WebElement new.
e addTextH1: 'Address book'.
self pageFrameWith: e title: 'Address book'
I guessed that #pageFrameWith:title: must be setting up the page
layout (the header, menus etc) but was surprised to find that
#pageFrameWith:title: was not implemented in the WebApplication
hierarchy. Why not directly send the message to the WebStyle object
(and it is less expensive cpu wise) such as:
self style pageFrameWith: e title: 'Address book'
WebStyle seems to me to incorporate at least the following features:
-- setup a page template for the *Aida tutorial* site (the page
headers, footers, navigation bars etc)
-- establish assets for the site (html header information - css files,
images files, script files)
Subclassing WebStyle to create my own web site page template is very
messy (as per the Joomla example ..)
Sorry for the long message -- in part I need to document these issues
to better understand them myself.
--
Edward Stow
_______________________________________________
Aida mailing list
Aida@...
http://lists.aidaweb.si/mailman/listinfo/aida