On 8/1/06, chris <[EMAIL PROTECTED]> wrote:

first please go over the docs more detail explanations are there.

First question is what is the purpose of the @expose("somepagename")
over the methods.  Is it the page that will be shown after the final
return of the method or is it to what page the method will be exposed
to (which would make more sense) on the call.

this is not correct, expose is the template file (without the .kid)  that will get the output of the method, the method name is the value inside the url path. the reason they may seem similar is that you will probably want to name the foo.kid the template for displaying localhost/foo and that will be def foo(self):

In the tutorial (20 min wiki) it starts off to seem like the first one
that I mentioned, but some of the later examples seem to point to the
last one.

Second question, in the examples that I have seen it seems like
everything is linked through the controller class, is that correct?  It
just seems that that class would become enormous once you have a couple
pages to work with.

yes and no,  because each class can have an instances of another class and that's how you create paths like
localhot/foo/bar where bar is a method from an object inside the rootcontroller

this will give you a better undestanding of both http://www.turbogears.org/preview/docs/gs/cpexposed.html see that you actually have 3 classes and lots of diferent method to call.

I am sure there is a better way, but in the examples that I have found all the methods are thrown onto one page.

I don't know what you mean by page. but again you can have as many classes as you want and if you find it too big you can split it into a package, if that still doesn't works then fix your design :)

Last question.  Are database queries made with sql strings allowed?

no, the point of an ORM is to  abstract that, although with SQLAlchemy you can do it if you want, SQLObject has this limitation.

When working with MySql are stored procs allowed.  
same as the above.

Once you have a number of tables it would be a real pain to have to construct the
queries with the methods that tg provides.

are you refering to sqlbuilder?  the only complex thing about SQLObject is that, all the rest is so simple that it's scary.

in fact SQLObject takes care of all constrains for you and you just add and remove either objects or it's values, I'm sorry but simplier then that you can not get.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to