I was going to add that, but Jim mention it... You can first do what Leonel says, keep it simple and not create complex object at first that may lead to overlapping or side effect when you want to share method among object and instead just write controller function and organize in "module" like fashion (I put module between quotes here as controllers files are not properly module). When you discover that you some controller helper function (function that exist beside controller function) are useful in more then one controller file, you put them in modules/some_file.py and import them where you need them... This is from my point of view the way most web2py users are doing as most of us are in Agile mode and not such kind of waterfalls development where you plan things in details before implement anything...
Good luck Richard On Fri, Nov 18, 2016 at 10:57 AM, Jim S <j...@qlf.com> wrote: > For me, I mostly use the DAL directly in controllers. > > But, I have a few areas where there is really complicated business logic > that is needed by multiple controller functions. Instead of repeating that > complicated logic in the controller, I've created classes (stored in > /modules) that I import and execute in my controller functions. But as I > said, there are very few. Out of hundreds of controller functions, > separate classes are used in only a couple dozen. > > Using the DAL directly in controller methods is a big part of why you can > develop so quickly using web2py. > > What I try to do is keep it simple. Use the DAL directly when appropriate > and only use classes/objects to keep from repeating yourself. > > Just my 2 cents... > > -Jim > > > On Friday, November 18, 2016 at 7:12:52 AM UTC-6, mfarees...@gmail.com > wrote: >> >> I understand your point now. But if controllers are accessing the DAL >> then what goes in the models and modules? The modules will have the BO >> (later), what else? >> > -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2py (Source code) > - https://code.google.com/p/web2py/issues/list (Report Issues) > --- > You received this message because you are subscribed to the Google Groups > "web2py-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to web2py+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.