On 6 June 2012 11:59, tanshu <[email protected]> wrote: > I read that documentation and am using the same, but my question was about > where these statements should be put? In the view, a separate class (eg. > DAL pattern), or in the Model?
I think you'll want to everything in your view code, unless it's very generic (i.e. "helper" code). > Coming from a n-tier application developer, I am unable to figure out how to > improve maintainability of the application and reduce duplication. I was > hoping that someone could point me to a guide of the way to do these things > in pyramid or just share with me how they do things. :) You'll probably find that reusability in Python web programming is a difficult balance. The Python language is very easy, and you can write code in a few lines that does a lot. This sometimes means that it's not worth it to try and generalize everything. I think the goal is to avoid bugs. If you've got code that's "risky" or "difficult", then at the very least try not to write it twice. \malthe -- You received this message because you are subscribed to the Google Groups "pylons-discuss" 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/pylons-discuss?hl=en.
