Hi!
First of all, I'm really impressed by the "turbogears experience".
Before looking at TG I didn't know the individual components apart from
playing around with SQLObject a bit. I think my favorite favourites
are "tg-admin shell" and getting AJAX (or AJAJ) almost for free.
I just went through the wiki tutorial and here are some impressions:
My setup: Ubuntu 5.10 and PostgreSQL, I installed turbogears using
Easy Install.
Page 1:
In one of the first paragraphs the differences between the
screencast and the written tutorials are pointed out. I had watched
the screencast some weeks ago and one thing I remembered was the
"turbogears-admin.py" command which apparently has changed to
"tg-admin.py". Maybe the text should include a warning that some
things have changed since recording the screen cast.
Page 1, Now Serving: Number 1:
The first contact with the application server was a CherryPy error
message: "Port not free". The reason was displayed some lines above:
"server.socketPort: 8080", this is where my wwwoffled (a caching proxy)
is listening. Port 8080 is a very popular port for http stuff, I think
it would be less error-prone to choose a default port which is more
likely to be unused. Sure, it's easy to switch ports in dev.cfg, but I
had to look around for a while before I found the server.socketPort
option (I thought this had to be a command line option, don't know
why). Maybe the tutorial should provide a hint.
Page 1:
At the bottom of page 1 I hit "Continue on to page 2". Page 2 of
how many? Would be nice to get an idea of the number of pages which
separates the student from being an turbo gears HERO. ;-)
Page 2, Pointing to a database:
Maybe it's beyond the scope of this tutorial but it can be helpful
to point out that (at least with psycopg) the database connection is
established via TCP sockets which might not be enabled by default (they
were on my Ubuntu notebook (I think) but not on my Gentoo workstation).
Page 2, Let's display a wiki page!:
At the beginning of this chapter we edit kid templates for the
first time. I wondered when I had to restart the application server
manually. There is an "autoreloader" but it seems that it's not
triggered by making changes to "master.kid" (but it works with the
templates extending "master.kid"). It would be nice to clearify this.
Page 2, Let's display a wiki page!:
Item 5 in the numbered list describing the index method says::
"Deals with unicode properly (always a good habit, on line 5)"
I think line 5 is missing.
Page 4, What about WikiWords?:
The regular expression also matches words in capital letters.
That's okay if it's intended, but the most wiki engines match
CamelCaseOnly.
Page 6, You want AJAX? We got AJAX!:
I try to avoid JS wherever possible, so I don't have that much
experience with JS code, but that's my story: some time ago I had
trouble with JS functions when they are called before declared in the
code. The problem was limited to an IE6 version when not using a
webserver to deliver the files (really strange). There were no
problems with other browsers or IE6 + apache but I try to keep an eye
on the order of function definitions and calls in JS code since then.
In the tutorial the functions are called before defined. Lacking a
windows machine, I don't have the possibility to test the TG tutorial
with IE6 (it's working I suppose, you would have got a lot of bug
reports otherwise).
Page 6, The final files:
The AJAX code in my example didn't work in the first place (typo,
my fault), so I downloaded the wiki20.tgz tarball to take a look at the
correct files. It seems that the code in the tarball isn't in sync
with the current version of TG and the tutorial. The first thing I
encountered was the HTTP query string "tg_format='json'" in the file
master.kid which is written "turbogearsfmt=json" in the "final files"
version. When I tried to launch the application server I got an error
message saying:
"NameError: name 'turbogearsflash' is not defined"
which apparently is "old fashioned" too.
Oops, just found the "Comment on this page" links, I hope you don't
mind if I post my notes on the list.
I really enjoyed the tutorial and TG as a whole, I'll definitely give
it a try in a real world web project when the APIs are a little more
stable.
Thank you!
--
Regards, Andi