leader: Mark Ramm
ref: http://us.pycon.org/TX2007/TutorialsPM#PM2
AJAX ~ JSON is the communication protocol between the client and server
- @expose(allow_json=True) … JSONifies the return results(dictionary or string)
Widgets ~
- Widget Browser
- how widgets are written/disecting ala the AutoComplete widget
- current form widgets vs. toscawidgets — when that time comes, it shouldn’t even cause a bump unless you are using nested forms, — that api will change (for the better)
- setting form widgets to default values
Break
Hints:
In Controllers: Just inherit from controllers in your nested controllers, don’t use controllers.RootController everywhere otherwise you’ll end up with name space collisions and CP won’t behave as expected.
SQLAlchemy
Hints:
ActiveMapper is pretty much deprecated. Elixir is the upcoming replacement.
Genshi
Why Genshi —
- Error Handling — kid explodes and gives the line # of the compiled kid template (.pyc) that blew, Genshi gives you the line, column in the original source code/template.
- Lets you use XML includes and do XML includes in “if” tags
More SQLAlchemy
http://www.sqlalchemy.org/docs/tutorial.myt
More Genshi Mark will post the Ulitimate-Wiki code later today/night
Authentication
TurboGears includes the Identity module. It uses a simple db back end but that can be changed out to an LDAP if desired. There exists an SO provider and an SA provider. There is a page on the old trac, it might be in RoughDocs by now. There is an AD backend too. The LDAP and AD providers only do Authentication, Authorization is handled by the a db local to the app.
Sites Using TurboGears
Sessions
There is a CherryPy (CP) session filter that you just turn on. In the .ini files — dev or app, etc
3 backends: file, memory, postgresql
In the future it will be the CP session Tool instead of Filter
CherryPy.????? is a great place to put thread local stuff
Performance and Filters: Cache Filters – is CP deprecating it? Will CP make it a Tool, or if it is more WSGI friendly, will it turn to beaker?
mark.ramm@gmail.com
MochiKit
Is the most under appreciated js package. Mark prefers it to prototype.js. Bob Ippolito json — mochikit. Is tested on ie, ff and the mac browser — is tested hard. Javascript that Doesn’t make you want to shoot yourself in the head. It has a version of the script.acoul.us but uses mochikit instead of prototype. Bob is said to be a testing task master.
hint:
Don’t get caught in the DOM scripting cess pool. 2 secs to download and 20 secs to render. That is bad. DOM scripting is not evil but too much of it is.
Sorry, the comment form is closed at this time.