Got it. I was also beginning to think in a similar way, but because of the baggage of the old, was not sure. Will put the Business Validation Code in helper functions and the save code in the views. Thanks for the help.
tanshu On Wednesday, June 6, 2012 3:37:02 PM UTC+5:30, malthe wrote: > > 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 view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/y-RCc45dH-UJ. 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.
