No, its not a football post, AFL is the name for my new framework language - it stands for A Fiche Language, Fiche being the name for the framework.x
Currently I have completed the initial parser that converts AFL into a node tree, the data context, a node processor that combines the nodes (think tags and commands) with data from the context, and generates XHTML output.
I currently have three language elements, a loop (over any List, Collection, or array object), if/elseif/else, and dot-notation object references with optional decorators (usable almost anywhere in attributes or content). I wrote my own library for the latter instead of relying on jakarta Beanutils.
A small snippet:
div(container)[
div(header)[
h1[{blog.title}]
h3[{blog.subtitle}]
]
div(wrapper)[
div(content)[
loop(post|blog.articles)[
h4(article)[{post.title} span[{post.created:datetime}]]
div[{post.content}]
if(post.comments:sizenot0)[
ul[
loop(com|post.comments)[
li[{com}]
]
]
]
]
]
]
Data references appear in {} in content and also in commands like loop(). Decorators appear preceded by a colon.
I have a nice syntax hiliter module in Textmate so it's easy to work with. Sadly, Intellij's syntax hiliter isn't quite good enough.
My next step is to recreate this blog software, discover what I haven't implemented yet, and then convert this blog over to the new system.
The whole point to this is that I plan on having 5 blogs (or blog like sites), a search technology demo site, and something special, all supported by this new framework. I am also going to convert my other sites (for other folks) at some point as well.
Real soon now!
