bottle's great. With any of the microframeworks, transitioning to something a little more hefty is pretty easy. I 'migrated' from bottle to tornado in a matter of a few hours, and I'm a python newbie
I'm not sure what the author was thinking when writing this framework but it
appears that he/she forgot everything about writing sane code. Below is a list
of the things that stand out.
1. There's no sane directory structure, instead most of it is just dropped in a
single directory.
2. How am I supposed to install this? There's no package for it so it seems the
only way is to manually copy the repository. You'd think people would
actually use the Python package manager.
3. Shebangs are set to `#!C:\Python26\python.exe -u`. This is wrong on so many
levels.
4. The code is just...no. Take a look at `generate_controller.py`, if there's
anything that's not Pythonic code it's this.
5. A lot of the directory names are hardcoded all over the place, this means
that if you ever want to change some of the names (or re-organize them)
you'll have to go through all the files and modify them accordingly.
These are just a few of the items I find worth mentioning. The code in general
looks very amateuristic and I doubt it solves any problem that isn't already
solved by more well developed frameworks such as Flask, Django and so on.
Also the video was painfully long... I agree a package manager should be used. I stopped looking after those 2 issues and never even got a chance to dive into the, what looks to be bad, code.
I know Python 2 or 3 is an ongoing debate, but there's no reason to be blatantly incompatible on a new project by using deprecated functionality like print statements instead of functions. Especially not on low hanging fruit like that.
Well, while you mention forward compatibility, there is also backwards compatibility. I am really a person that loves to move towards 3.x, but having a ton of users (some not technical enough to compile Python) with old Python installations (2.5.x or older) as default on their machines (CentOS for example is always an issue...) it is a double-edged sword since 2.6.0a2 is required to use Unicode literals and the print function [1]. I remember reading a long time ago that the fact that Python comes as default for many distributions may very well become a curse, I fear, that this may very well be true.
I commend the author for building something. I don't see this project solving a problem I have, but it looks to be an honest, if somewhat rough, effort.
A few suggestions:
- review PEP8 [1].
- no need to assign None to a variable before assigning another value
- Try to keep things DRY [2].
- use more descriptive variable names
- as others have stated, spell check your site copy
Pep8 => yes, need to review / rewrite
Dry => again yes, working currently on it for generate_*
did you look at some genrated code, think this is cleaner, though. The generators are the oldest ..
Really works fine from really many different devices for me... Damn i really dont wanr to ask if you can replicate thsi .. 'cause you can.
But i just cant advice something other than to try a different browser...
Literally typing the following in the address field in Firefox 14.01, Lubuntu 12.04:
pythononwheels.org
403
Forbidden
You don't have permission to access / on this server.
Apache/2.2.16 (Debian) Server at pythononwheels.org Port 80
Typing www.pythononwheels.org gets me to your home page.
"If Ajax works something will happen here if you click the Send Ajax Request button"
If I just click the button, without typing anything (because that's what the sentence above says, and I'm in QA and because I'm a dick), then I get this, so it was probably load yesterday:
Yeah! AJAX with python rocks totally now: 2012-08-14 04:44:41 type something here
And if I keep clicking then the time keeps updating, so yay.
If I type something and hit Enter, nothing happens. Usually/often that should be the same as clicking the button.
If I click in the text field I would expect your instructional text in that field to politely disappear, making way for my text, but your text stays there and my text is inserted wherever I clicked.
If I drag across the text in the orange button and then release (to select the text), it's the same as if I clicked. Not what I expected, but that's a nit.
If I drag from just above the orange button to just below it, and then either Ctrl-C or right-click-copy, then I get a copy of the text in the button. I guess that's OK, but I'm not used to being able to copy the text of a button.
If you go to https://www.google.com/ and try to similarly drag across the buttons below the search field, you don't get anything. Not holding that up as the "correct" way, but it is more like what I'd vaguely expect. I'm probably behind the times either way.
This is as much text as I'm allowed to type into the text field:
1 point by pythononwheels 7 minutes ago | link | edit | delete
Hey oinksoft. Dont just punch on top... To your points: 1. The shebang: yes, ouch, gets removed. 2. Pow_console: it is a remark that i too, code from there. I always comment the source if code is not mine.
3. The mentioned code snippets from the homepage are default twitter-bootstrap sources..
Criticism is ok but this is bashing...
So, no, its no joke ;)
OK, sorry if I offended you, it's just that some "trolls" are quite subtle and there are enough iffy things that I suspected a joke behind this. The project name also bears similarity to some other projects that have been jokes in the past:
That's no discredit to your own development abilities because the code itself, while far from perfect, seems sizable and functional enough to show that you've put some real thought and effort into this -- keep it up! With time and a good cleanup effort, I'm sure you'll have something that nobody would bat an eye at.
More than likely, Hacker News picked up the your project website because of its name, and so now the spotlight is shining very harshly indeed. It was unfair of me to judge your project as I did.
P.S. You copied part of the HN commenting interface in your comment, and you don't need to include that.
"More than likely, Hacker News picked up the your project website because of its name, and so now the spotlight is shining very harshly indeed."
FWIW, I submitted this after I saw the latest release announced at https://lwn.net/Articles/510286/ but couldn't find any previous discussion of the framework here.
I wrote the PoW framework. And want to give some short feedback on the comments here.
Yes, i need to get things cleaned up.
Shebangs are old and not used. So can and will be dropped. Good point i really forgot they were still there.
Yes, I am rewriting generate_* to encapsulate specific actions in functions... Can be much cleaner..
Typos on page where really bad , sorry.
And yes, the videos where really too long. But were online in just for 2 days. I replaced them with versions of 6minutes and (i think) 14 minutes for the weblog.
Some other remarks are just not true:(or outdated)
1. how do i install ? => 1. Watch 6 min screencast (thats exactly why i made them )but its just a simple unzip and pip the needed libs.
2. Directories hardcoded => no, are configurable.
3. Base in just one directory. => no. Structured stubs and generates a very structured mvc dir-tree.
4. Server errors on first 2 days => yes, was due to serving with simple_server (which is really not for prod ) now running apache mod_wsgi. Stable since 2 weeks... ;).
Again: lots to do in code refinement of course. Please keep in mind its pre-beta. The focus of the last weeks was in the generated code, more than the generators. Can you also give some feedback on that ? To my mind much better an OO than the flat generators which where really more form follows function. (which is no excuse for having much potential in there)
Thanks for feedbacks. Working dayly in improving the thing ;).
Interesting, I've been building a similar framework at Prontotype -- though with Bottle, Jinja2, MongoDB and Backbone. One thing I'm missing so far is the ability to "generate", maybe I'll add that in and show the world at some point. Good start & good luck.
Intersting that you chose a different framework for almost any field. So there is room ;)
I am thinking about a google app engine port but sqlalchemy is a showstopper here .. Need the models to talk GQL ... So i stopped that port for now. Much to do in the base..
NDB is a good hint.
But the problem remains that I want PoW to be able to support SQL DBs also. I think SQLAlchemy is a really mature framework for that area. So I need to generate the models in two ways..
I think I need to separate this as an extension since I do not want to have two PoWs, where one is for GAE and one for SQL.
that's the thing with gae, if you want to pretend you aren't going to use it and instead try to abstract away that fact, you are in for a world of pain. you either do gae, or not... no waffling.
One important remark: if you check it out from github, be sure to get the Beta1 branch.
The master branch is really long behind the current development. I also stated that in the screencast.
And as i think about it, some of the comments might refer to the master branch (like the one saying there is no directory structure) which is not the case in Beta1...
Doesn't want to be better but more generative, so quicker first app results. Idea is to add many rails-alike helpers like pagination, observation, etc...
Easing small apps life .;)
I think flask is ment to be really micro.
Misses ( and wants to miss IMO ) the generative approach.
Also misses ( and wants to ) the db layer etc
So these approaches are really different.
Code: i will cleanup and DRY the generatots. But generated code is the one i was working on and that the user will work on and read. This is ways better.
43 comments
[ 3.3 ms ] story [ 98.2 ms ] threadAre there any example projects?
[1]: http://bottlepy.org/docs/dev/
http://flask.pocoo.org/
1. There's no sane directory structure, instead most of it is just dropped in a single directory.
2. How am I supposed to install this? There's no package for it so it seems the only way is to manually copy the repository. You'd think people would actually use the Python package manager.
3. Shebangs are set to `#!C:\Python26\python.exe -u`. This is wrong on so many levels.
4. The code is just...no. Take a look at `generate_controller.py`, if there's anything that's not Pythonic code it's this.
5. A lot of the directory names are hardcoded all over the place, this means that if you ever want to change some of the names (or re-organize them) you'll have to go through all the files and modify them accordingly.
These are just a few of the items I find worth mentioning. The code in general looks very amateuristic and I doubt it solves any problem that isn't already solved by more well developed frameworks such as Flask, Django and so on.
I know Python 2 or 3 is an ongoing debate, but there's no reason to be blatantly incompatible on a new project by using deprecated functionality like print statements instead of functions. Especially not on low hanging fruit like that.
[1]: http://docs.python.org/library/__future__.html
Argh. Possibly bad name choice somehow: http://pow.cx/
A few suggestions:
- review PEP8 [1].
- no need to assign None to a variable before assigning another value
- Try to keep things DRY [2].
- use more descriptive variable names
- as others have stated, spell check your site copy
[1] http://www.python.org/dev/peps/pep-0008/
[2] http://c2.com/cgi/wiki?DontRepeatYourself
* edited for formatting
Thx, khz
<click>
"Internal Server Error"
Something happened. Ship it!
Should work with safari, firefox, ie8+...
Literally typing the following in the address field in Firefox 14.01, Lubuntu 12.04:
403 Forbidden You don't have permission to access / on this server. Apache/2.2.16 (Debian) Server at pythononwheels.org Port 80Typing www.pythononwheels.org gets me to your home page.
"If Ajax works something will happen here if you click the Send Ajax Request button"
If I just click the button, without typing anything (because that's what the sentence above says, and I'm in QA and because I'm a dick), then I get this, so it was probably load yesterday:
And if I keep clicking then the time keeps updating, so yay.If I type something and hit Enter, nothing happens. Usually/often that should be the same as clicking the button.
If I click in the text field I would expect your instructional text in that field to politely disappear, making way for my text, but your text stays there and my text is inserted wherever I clicked.
If I drag across the text in the orange button and then release (to select the text), it's the same as if I clicked. Not what I expected, but that's a nit.
If I drag from just above the orange button to just below it, and then either Ctrl-C or right-click-copy, then I get a copy of the text in the button. I guess that's OK, but I'm not used to being able to copy the text of a button.
If you go to https://www.google.com/ and try to similarly drag across the buttons below the search field, you don't get anything. Not holding that up as the "correct" way, but it is more like what I'd vaguely expect. I'm probably behind the times either way.
This is as much text as I'm allowed to type into the text field:
Which is what you limited it to, so cool.On the homepage:
pow_devel/generate_controller.py:1 Even though the screencast is on a Mac and pythononwheels.org is running Debian Lenny.pow_devel/pow_console.py:1
Hilarious webhost: https://www.server4you.de/templates/images/vserver/pic-710-v...I really want to say that the criticism in these comments is just playing into the author's hands. Please tell me this is a joke?
Hey oinksoft. Dont just punch on top... To your points: 1. The shebang: yes, ouch, gets removed. 2. Pow_console: it is a remark that i too, code from there. I always comment the source if code is not mine. 3. The mentioned code snippets from the homepage are default twitter-bootstrap sources..
Criticism is ok but this is bashing... So, no, its no joke ;)
* Cobol on Cogs: http://www.coboloncogs.org/INDEX.HTM
* Bash on Balls: https://github.com/jayferd/balls (more of a bizarre proof of concept than an out-and-out joke)
That's no discredit to your own development abilities because the code itself, while far from perfect, seems sizable and functional enough to show that you've put some real thought and effort into this -- keep it up! With time and a good cleanup effort, I'm sure you'll have something that nobody would bat an eye at.
More than likely, Hacker News picked up the your project website because of its name, and so now the spotlight is shining very harshly indeed. It was unfair of me to judge your project as I did.
P.S. You copied part of the HN commenting interface in your comment, and you don't need to include that.
FWIW, I submitted this after I saw the latest release announced at https://lwn.net/Articles/510286/ but couldn't find any previous discussion of the framework here.
I wrote the PoW framework. And want to give some short feedback on the comments here.
Yes, i need to get things cleaned up. Shebangs are old and not used. So can and will be dropped. Good point i really forgot they were still there. Yes, I am rewriting generate_* to encapsulate specific actions in functions... Can be much cleaner.. Typos on page where really bad , sorry. And yes, the videos where really too long. But were online in just for 2 days. I replaced them with versions of 6minutes and (i think) 14 minutes for the weblog.
Some other remarks are just not true:(or outdated) 1. how do i install ? => 1. Watch 6 min screencast (thats exactly why i made them )but its just a simple unzip and pip the needed libs. 2. Directories hardcoded => no, are configurable. 3. Base in just one directory. => no. Structured stubs and generates a very structured mvc dir-tree.
4. Server errors on first 2 days => yes, was due to serving with simple_server (which is really not for prod ) now running apache mod_wsgi. Stable since 2 weeks... ;).
Again: lots to do in code refinement of course. Please keep in mind its pre-beta. The focus of the last weeks was in the generated code, more than the generators. Can you also give some feedback on that ? To my mind much better an OO than the flat generators which where really more form follows function. (which is no excuse for having much potential in there)
Thanks for feedbacks. Working dayly in improving the thing ;).
Thx, regards, khz
The master branch is really long behind the current development. I also stated that in the screencast.
And as i think about it, some of the comments might refer to the master branch (like the one saying there is no directory structure) which is not the case in Beta1...
Regards
EDIT: OH GOD THE CODE, YOU MAKE KITTY SCARED
Code: i will cleanup and DRY the generatots. But generated code is the one i was working on and that the user will work on and read. This is ways better.
Not scary at all ;)