Hi Binh. I've been trying out web2py for the past 2 months. I have no experience with Ruby on Rails. And I can say that I agree with those points, since I have felt confuse about points you mentions, specially with 2 and 4 I have not a clean idea about where must I write some pieces of code, it would be great if you or anyone could give me some good practices
thanks alot On 20 jun, 08:07, Binh <[email protected]> wrote: > Hi, > > I've been trying out web2py for the past 2 weeks. > I developed mostly on Ruby on Rails in the past, some CakePHP, some > Lift/Scala, and Django. > Frankly, web2py has been a pleasant experience. Web2py has an awesome > community. > The push towards Google App Engine is just wonderful. > However, there are still weaknesses to address. > > 1. There is no standard testing solution. Doctests are not sufficient > enough for good code coverage. If we are trying to educate on modern > software practice, the community should emphasize testing. Testing > allows new developers to understand the framework better and build > more solid software. If you can test, you understand what the code is > doing. The Ruby on Rails community has done an excellent job in this > regard providing a standard test framework covering unit and > functional tests which web2py should strive for. Maybe unittest or > pyunit should be integrated with the core. jonromero seems to have a > good starting pointhttp://web2pyslices.com/main/slices/take_slice/67 > and maybe we can push his solution further to be able to run all tests > in every application instead of a single application. > > 2. The models folder is confusing. Many times, db.py is abused. It > seems that db.py should not be in the "models" folder. It just seems > necessary to make a standard "config" folder with subfiles "db.py" to > be only database configurations and not table definitions of the > models, create a "config.py" to be Global variable and module > configuration for the specific application. A routine I have been > trying is to put a models.py in the models folder kind of like Django > which feels unsatisfying. It's very hacky and just makes the models > folder seem useless. Naturally having a models folder, I want to > emulate the ORM way of things aka "table_name" with "table_name.py" > with the table definition and a virtualfield class implementation > which just isn't allowed because the files are loaded alphabetically. > > 3. Conventions should be emphasized more. A lot of times when new to > a framework, a newbie produces a great amount of hacky code due to > lack of conventions. For instance, the static folder is very > unorganized. A better convention for a newly created app should add a > stylesheets, images, and javascripts subfolder which a lot of other > frameworks follow. We can address this by supporting web2pycasts.com > which I believe is translated in Brazilian at the moment. > web2pycasts.com should expand to more audiences. > > 4. Controllers don't seem to have a clean way to implement before and > after filters. Maybe web2py needs to incorporate the idea of > inheritance controllers like Rails. > > 5. Admin should be fixed to work on Google App Engine. It's too > beautiful of an application to be inaccessible on Google App Engine. > > Feel free to correct me if I'm wrong. Hopefully, some of these > suggestions can push web2py to be a better framework.

