Thanks for this is email. It is good to have some clear points to be able to reply to.
On Aug 29, 6:15 pm, Scott Hunter <shun...@nycap.rr.com> wrote: > A colleague has lodged the following complaints about web2py, and I'd > like to run my responses by this group in order to correct/strengthen > those responses. > > Complaint #1: No real-time debugging (i.e. proper step-debugging in a > real IDE) > Response #1: web2py, being a framework, does not include a full-blown > IDE, but it doesn't preclude your using your favorite IDE. As Yarko pointed out you can use WingWare. You can use any other python debugger you want. > Complaint #2: No proper logging mechanism for modules. (Related: > web2py is pathetic at third-party module integration) > Response #2: Again, nothing in web2py precludes using python's logging > facility. (And I've had no problem getting it to play nice with PIL > and some other modules, so I'm not sure what the complaint is here.) In Python like Java and like an other languages there is a "import" mechanism for third party modules. web2py uses the standard python mechanism and you can use ANY third party module. In particular you can use the logging module. Some people do not like to use the logging module because they run multiple appliances and they want a log per- appliances and not a log per-web2py-instance. This is also possible and there is a thread here in which multiple solutions have been proposed. I am having problems finding the thread today but we'll open another one when I find it. > Complaint #3: Having to do strange things (like double-imports and > reloads) to pick up run-time changes in my module. (This may be where > the complaint about 3rd party modules comes from.) > Response #3: I believe the issue here is that there is a module which > is being developed/debugged, but changes to it aren't getting picked- > up without re-starting the application (or doing "strange things"). > Were the module being developed located inside web2py during > development, then I believe edits would get picked up immediately. As in ANY language is you change he source code of a module imported by a running application, the running application does not see the change. For debugging purposes you may want to force python programs to reload modules when they are used in case they have changed. Python provides a keyword for doing this: reload. You can use it in web2py, you do not have to. > Complaint #4: web2py will not let me handle my own form, considering I > don't want to use web2py's ORM to talk to my data Yes. There is a chapter in the book about this. You can ask web2py to generate an entire form, individual field/widgets ot nothing and you make the form in HTML. > Complaint #5: It's not a real ORM, because there is entirely 'zero' > configuration like a real ORM has. It's a database-to-HTML-form > management system, not an object-relational management system. It not a ORM, it is a DAL. An ORM maps database tables into classes and records into instances of those classes. We do not do this because we believe this mapping is not fully capable of reproducing the richness of SQL expressions. We instead map databases tables in instances of a sql.Table class and records into instances of a sql.DALStorage class. From a syntactic point of view this is very similar to a ORM but 1) it is faster, 2) we can map almost any SQL expressions into a DAL expressions. > Complant #6: web2py will only let you process a web2py form if it was > created in the controller No. web2py can process any form (even one coming from a different application). The variables are in request.vars.post_vars or request.vars.get_vars or both in request.vars. Example: <form action="hello"><input name="you"/><input type="submit"></form> def hello: return dict(message="hello %s" % request.vars.you) > Response #6: while a from OBJECT must be created in the controller, > the actual form need not be. There is no must. There is a good practice. It also depends by the type of form. Normally you declare the business logic of a form in a controller and you serialize it in HTML in a view. > Complaint #7: web2py won't let me loop over keys in their custom dict > () structure (called Storage) in order to circumvent the FORM and > SQLFORM issues in #5 above Yes you can, Storage extends a dict: from gluon.storge import Storage d=Storage({'a':1,'b':2,'c':3}) for key in sorted(d): print key, d[key] Massimo --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py-users" group. To post to this group, send email to web2py@googlegroups.com To unsubscribe from this group, send email to web2py+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/web2py?hl=en -~----------~----~----~----~------~----~------~--~---