Friday, April 24, 2009

Mapping Gnu Math

A workshop for teachers keeps the focus in Cyberia, a mythical space of vying kingdoms and/or queendoms and lots of stacked fruit in SQL-modeled supermarkets (UPC, RFID...)

:: cyberia ::

A castle considered separately might be our MVC ecosystem, with the moat and the gate reminding us to think about security issues (yes, it's a memory palace). The keep is the model (M) whereas the templating (V) is done in the shops (guilds, smithies) around the inside of the protective wall (the firewall).

Cartoon Storyboard
:: workshop model ::

In the Django framework, an incoming httpRequest is matched at the gate by a regular expression (or falls through the cracks), is escorted (passed) to a view function, perhaps to fetch from the keep (Postgres?).

The results get "dipped and rolled" in a typesetting template and sent back out the gate in an httpResponse suitcase (properly padlocked in some instances).
The HttpRequest object is actually passed into your view function by Django. You use this view to gather and process information about the request in the view function. When you are finished handling the request, the view function is required to return an HttpResponse object.

Sams Teach Yourself Django in 24 Hours by Brad Dayley
Calling Python "the controller" in this particular castle is somewhat of a misnomer as really the developers and administrators control the site. Python is merely an implementation language, like PHP or Java.

However, since we're looking at source code, which is "what runs", there's a sense that we're punching the right ticket here.