Ian Bicking wrote: > Michele Cella wrote: > > If we go down this path IMHO it would also be nice to provide some > > basic conventions (over configuration, rails marketing hype :D), note > > that we should not enforce them, and use a tool like paster to add a > > new controller along with tests (like pylons) for example or a new > > template that extends master.kid and so on. > > I don't like hierarchy, and I never use more than one file for my > SQLObject classes (which is a subset of all the models in a system, but > that's just tedious semantics ;). But this is probably the best > argument for separate files -- or, more generally, tool support. I > assume the model designer will work much more easily with a models > package as well. >
Yes, the big advantage of having a single model.py and controllers.py is that you can dive in immediately, providing tools means that you must teach how to use them and why to use them, this increases the "learning fast" delay but probably gives more benefits on the long run (during the project life time and the development of other projects)? dunno... It's a matter of finding the right balance, I should admit that when I tried Pylons/RoR while searching for the supposed way to add a new controller I've found myself slowed down in respect to TG, for example Django guys some times ago discussed the possibility of reducing the base structure of a new project to something like TG. > In a similarly veign, Pylons (and PasteWebKit) both create templates > with controllers, including creating the boilerplate template. As an > added convention, if there is a file named > "blank.whatever-your-template-extension-is" it'll copy that for the > template, so you can futz and create conventions on a project level. I > haven't myself been creating tests -- I guess I just don't write my > tests with the same granularity as a table or screen -- but I can > certainly see the benefit. > > I've experimented with automatically modifying files instead of writing > new files (Paste has some support for this), but I find this hard to > maintain. Python just isn't the kind of language where you can safely > modify source in an automated way. > Some times ago I've looked at paster for this reason (modifying files) and noticed that you provide support for that but it's indeed and and hard thing to do and maintain. :-) Thanks. Ciao Michele --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

