AWP customization.

14 views
Skip to first unread message

Watt

unread,
Oct 19, 2008, 10:17:49 PM10/19/08
to antiweb
I was reading the code to see how I can customize the way AWP is
compiled. The problem I have is pretty similar to the issue with
opaque closure you mentioned in your book. It looks not that simple
to just plug out some parts and put in new ones that would put in new
html fragments to be spliced in. Would it be possible to open the
compilation process up by having each step opened up with pandoric-get/
pandoric-set and :hot-patch new code in? I believe that will be very
clean. All those of us who wants to customize anything just got to
learn the interfaces between steps and not every detail to take the
whole code out. I really do like the structure of your code and would
not be comfortable or capable of replacing it, for it is very little
that I know how things fit together in detail. Thanks for your help.


Watt P.

PS It would be great if you can also provide tutorial on how you
would put together a real world application using AWP and AW in
general.

do...@hcsw.org

unread,
Oct 21, 2008, 12:11:35 AM10/21/08
to ant...@googlegroups.com
Hi Watt,

I have just done a major AWP clean-up and BETA8 will remove
remove a lot of junk from awp.lisp which now should be handled
in external JS libraries. Now the options that AWP processes
are the following:

(defvar awp-reserved-options
'(:doctype :title :css
:pre-html
:layout :layout-width
:post-html
:js-extern :js-main))

Pandoric macros are only currently used in one place in
the AW source and this is when compiling the HTTP dispatch
function. In most cases, there are more efficient ways
to implement something than with pandoric macros but for things
like macro processing (which happens a lot when compiling
the HTTP dispatch function) we don't really care. Using a
pandoric macro lets us delay macro expansion until the last
possible moment in time. The HTTP dispatch function isn't
compiled until we've processed the worker conf file.

Compiling AWP files is similar. I would like to be able to
make them as customisable as possible. The most important
part to remember about AWP files is that they are conf
files full of xconfs:

http://hoytech.com/antiweb/manual.awp/design.html#CONFS-AND-XCONFS

I am working on a website right now that is pushing AWP to
its limits but I'm almost certain that confs and xconfs are
the right way to configure AWPs. I think perhaps we will end
up compiling to CSS positioning layouts instead of tables, and
maybe the :layout code will need to be changed, but xconfs are
the best way to configure AWPs.

You mentioned you are interested in further AWP documentation.
I will try to write more about this as well as how to extend
them once the code becomes more stable.

Doug

signature.asc
Reply all
Reply to author
Forward
0 new messages