New Karrigel page in Wikipedia
Eric S. Johansson
esj at harvee.org
Wed Apr 12 15:21:33 EDT 2006
Luis M. González wrote:
> For those interested in the simplest, easiest and most pythonic web
> framework out there, there's a new page in Wikipedia:
this all depends on your criteria for simplest and easiest. For me HTML
is pure hell. I avoid it whenever possible because it literally makes
my hands hurt (worse). It's a pain to modify unless you have a WYSIWYG
editor and even then it's still difficult. Stuffing it into Python
strings is a double pain because you have to figure out how may times
you have to quote your percent signs depending on how may times you
render a string.
A year or so ago, I discovered aether (google aether manual) and my
heart was filled with joy because here was a markup language I could
dictate using speech recognition and save myself a great deal of pain
when producing web applications. Or so I thought.
[bold language is reasonably [bigger simple]] and unlike most
higher-level markup languages, it's built out of English words,'[', and
']' which is why it is handicapped friendly. The other advantage of this
framework is that it is easy to build your own [words and build
application specific vocabularies.
But aether by itself brought sorrow with it as well. The original
creator was no longer interested in extensions and the ability to create
CGI programs was flawed. So in conjunction with an unnamed accomplice,
we set about expanding aether and renamed the project Akasha.
I simplified the CGI environment significantly. the simplifications
make creating CGI significantly easier than with the traditional python
module. Each displayed page or page hierarchy is associated with an
object. Each object uses the __init__ method for the usual (i.e.
instance, and variable initialization). The page_init method is called
before a page is rendered and displayed. This gives you the ability to
dynamically create markup elements before rendering the page the first
time. additional methods can be added and provided one follows the
right naming convention, associates each method with a HTML form button.
once the button has been pushed, all of the CGI variables are stuffed
into a dictionary. Returning data from CGI is simple as well. there is
a dedicated dictionary which contains information that can be revealed
in a rendered page.
The nice thing about this structure for me is that the markup
environment doesn't embed any Python but there is a clear channel for
communicating both data and markup notation to the display side of the
house. I'm not happy that I have markup in my Python but at least I can
restrict how far it spreads.
Akasha is not perfect, it's not full-featured, it doesn't have any
databases associated with it (thank god), but for me it's a dream to use
in contrast to the half a dozen web frameworks I tried.
if you want to play with it, let me know and I will update CVS at
https://savannah.nongnu.org/projects/akasha with the current work in
progress
--- eric
ps. If you check wikipedia it has some rather amusing uplifting
definitions for Akasha and Akasha records. Although on bad days I think
of Akasha as a code sucking vampire draining the life out of my hands.
More information about the Python-list
mailing list