At 06:45 PM 10/4/2001 +0100, tom smith wrote:
>hi,
>
>boy!,  wading through the middlekit docs is hard work (, but then I am
>considerably stupider than you).  I'm coming to Webware having explored
>Zope, and although I like Zope, sometimes I feel that I'm "too far way" from
>python. Webware looks really promising, but the documentation could do with
>beefing up a bit with many more examples, snippets, solutions etc...
>
>Anyway...

I appreciate your points below, but we do call it a Quick Start instead of 
a tutorial because it doesn't hold one's hand as thoroughly as a tutorial. 
See more below:


>Suggestions.
>1.  make sure that mysql has localhost access privs (grant etc)

You mean create, select, insert and delete permissions? I assumed in the 
QuickStart that the reader was comfortable with their database including 
users, permissions, etc.


>2. "Create folder "Movies" where?  I create it in MiddleKit/ don't I, then I
>add "Videos.mkmodel" to that folder. Am I right? It's not clear WHERE I can
>create Model folders...Is it anywhere?

I guess I'll go back and emphasize that you can create it anywhere (it's 
just a file after all) but that creating it inside MiddleKit is a bad idea. 
Your project _uses_ MiddleKit, it doesn't extend it and get merged with it. 
MiddleKit is just another Python package and I don't recommend that you 
mingle your project files with Webware files.


>3. The script main.py failed because it needs a...
>     movie.setYear(1984) because year can't be null.

Hmmm, what version of Webware do you have? I'll look into this.

BTW Any MiddleKit enthusiasts would be better off using CVS which has 
better docs, features and fixes. Also, we're starting the 0.6 release this 
weekend with alpha1.


>4. The generate script seems to work best when called from the model folder,
>Like this... python ../Design/Generate.py  -- etc

In my work, I can't use that path, because my various web sites are not in 
the MiddleKit directory. I just give the full path to the Generate.py. Here 
is the literal command that I use:

python \All\echuck\Projects\Webware\MiddleKit\Design\Generate.py --db MySQL 
--model FooBar

While I'm in a directory called something like 
\All\echuck\Projects\FooBar\Core which contains FooBar.mkmodel.


>5. It's not completely clear to me that you create a folder then put inside
>that folder the .mkmodel folder...or how the name of the folder, or the
>classes you create in your model relate  to each other.  It could maybe made
>clearer by not choosing "Movies" , which contain a "Movie" and a "Video",
>very confusing. Perhaps a "Zoo" example, with "Animal" and "People" would be
>better... would I then be able to ...

I'll see if I can clarify that in the manual. The only relation between 
folder names and other things is that in FooBar.mkmodel/, FooBar is assumed 
to be the name of your database. Everything else is personal choice.

I think a Movies example is more cogent than a Zoo example, plus I don't 
care for rewriting half the Quick Start or more, so I'll stick with Movies.


>#
>from Zoo import Animal
>class Tiger(Animal):
>     etc
>?

Almost.

from Zoo.Animal import Animal


And that's a Python thing. Zoo is a package, Animal is a module and there 
is an Animal class inside.


>6. When Using the MKBrowser, automatically fill in "default" values in the
>form, like...
>
>database:MySQL
>host:localhost
>
>and ...
>model:MiddleKit/Movies/Videos.mkmodel
>
>I spent ages putting Videos in the model field, then tried
>~/webserver/Webware... etc It wasn't until I used a relative path that it
>worked.

~/webware/Webware is not a relative path (like "foo/bar" or "../foo/bar" 
are). It's an absolute path where ~ is a short cut for something like 
"/home/tom/". If it were relative, then it would resolve to a different 
absolute path as you changed directories (most of the time).

In any case, I haven't worked on MKBrowser in ages. Just haven't had the 
time. If someone wants to take a stab at improving it, that would be great.


>7. Highlight the "key command-line points" in bold, so that when I'm
>re-reading a tutorial I can see at a glance what I have to do... mkdir
>Movies, chmod etc, python generate.py etc...

Um, they are bolded when I look at them. I bolded anything you type at the 
command line.

Perhaps a list of steps with no explanation at the end would work better as 
a summary/quick reference?


-Chuck


_______________________________________________
Webware-discuss mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/webware-discuss

Reply via email to