tag:blogger.com,1999:blog-11788780.post4424228760644226338..comments2023-12-29T13:22:33.104-08:00Comments on JJinuxLand: Python: Werkzeugjjinuxhttp://www.blogger.com/profile/03270879497119114175noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-11788780.post-88603283435585790932008-04-05T13:20:00.000-07:002008-04-05T13:20:00.000-07:00> regarding coding styles, i believe you have to g...> regarding coding styles, i believe you have to go far beyond pep8 styles.<BR/><BR/>Agreed. PEP 8 is just a good start that takes care of the stupid things. "The Practice of Programming" by Kernigan and Pike cover a lot of the other things.<BR/><BR/>> i am afraid that a tool that has its central communication going on within an IRC channel is not easy to catch up with for a lot of guys.<BR/><BR/>I agree completely. I can't keep up with IRC.jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-52027359106488093382008-04-05T06:27:00.000-07:002008-04-05T06:27:00.000-07:00regarding coding styles, i believe you have to go ...regarding coding styles, i believe you have to go far beyond pep8 styles. i violate a lot of those coding standards all of the time and i believe my code is (potentially) readable (in places). much more important than the question whether to write `f(a=42)` or `f( a = 42 )` (i always do the latter) is to use sane variable names, sane procedures, and sane interfaces. you can't put that inside a style guide, i guess. <BR/><BR/>regarding the relative paucity of documentation and community, that was meant as an encouragement to point out and start such things. i am afraid that a tool that has its central communication going on within an IRC channel is not easy to catch up with for a lot of guys. IRC is just too transient, too hard to recapitulate, and too invisible for search engines.flowhttps://www.blogger.com/profile/18342392935682557868noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-11606350537944153022008-04-04T15:50:00.000-07:002008-04-04T15:50:00.000-07:00> Just a few words as I'm in a hurry. Werkzeug doe...> Just a few words as I'm in a hurry. Werkzeug doesn't even require you to use view functions. I think there is an example in the sourcetree that uses controller classes like pylons.<BR/><BR/>Yeah, I guessed that. That's why I said, "Of course, you're free to not use the built in URL dispatcher, in which case you could do whatever you want ;)"<BR/><BR/>> We're trying to stick as closely to PEP8 as it makes sense for us :) There are a few things where we disagree with PEP8, namely indentation of continued statements but I think that's such a minor violation I can defend ^^<BR/><BR/>The problem with shying away from PEP 8 is that we all hate different things about PEP 8. Sticking with PEP 8 very closely means that we all get pissed off equally slightly ;) Anyway, it's close enough that it doesn't drive me crazy. Thanks for that ;)jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-84328729041484245992008-04-04T15:47:00.000-07:002008-04-04T15:47:00.000-07:00> werkzeug uses greenlets* to do thread-local vari...> werkzeug uses greenlets* to do thread-local variables.<BR/><BR/>Greenlets are cool. However, as the other poster confirms, I'm sure they probably support greenlets but do not require greenlets.<BR/><BR/>> the documentation of werkzeug is well written, but there is not very much of it.<BR/><BR/>You think? I read most of http://werkzeug.pocoo.org/documentation/ yesterday. It's orders of magnitude better than most of the code I have to use. I can't think of anything else I wish they would have documented. Maybe it's because it all seems very familiar to me.<BR/><BR/>> where is the community? <BR/><BR/>That's a good point. Personally, I care a bit more about good code than I do about community. If I just wanted community, I'd go use PHP ;)<BR/><BR/>However, you have a point. Let's remember, that it's still young, and it isn't for the faint of heart.<BR/><BR/>For me, Werkzeug has *way* more community than the alternative, which is coding an anti-framework myself. I'm just glad someone else had the same idea I did, and did a good job executing on it. Looking at the code, I trust the competence of the author.jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-58226713690179945802008-04-04T10:12:00.000-07:002008-04-04T10:12:00.000-07:00Just a few words as I'm in a hurry. Werkzeug does...Just a few words as I'm in a hurry. Werkzeug doesn't even require you to use view functions. I think there is an example in the sourcetree that uses controller classes like pylons.<BR/><BR/>And greenlet is not a requirement :)<BR/><BR/>We're trying to stick as closely to PEP8 as it makes sense for us :) There are a few things where we disagree with PEP8, namely indentation of continued statements but I think that's such a minor violation I can defend ^^<BR/><BR/><BR/>Regards,<BR/>ArminArmin Ronacherhttps://www.blogger.com/profile/12523637137374776150noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-14422708248407444552008-04-04T07:43:00.000-07:002008-04-04T07:43:00.000-07:00You should also check out web.py, the original ant...You should also check out web.py, the original anti-framework at webpy.org.pjzhttps://www.blogger.com/profile/00937068117282447089noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-15887318801326850312008-04-04T01:03:00.000-07:002008-04-04T01:03:00.000-07:00Your posting is timely. I have similar ideas in th...Your posting is timely. I have similar ideas <A HREF="http://mxm-mad-science.blogspot.com/2008/04/what-does-web-framework-really-need.html" REL="nofollow">in this posting</A>Max Mhttps://www.blogger.com/profile/01654969463596586272noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-86446265151547929252008-04-04T00:37:00.000-07:002008-04-04T00:37:00.000-07:00i had much the same impressions about werkzeug. i'...i had much the same impressions about werkzeug. i'd really like to start using it, but i have a few questions:<BR/><BR/>* werkzeug uses greenlets* to do thread-local variables. i understand very little about the requirements when serving under mod_python/mod_wsgi, but it somehow scares me that i have to use a less-than universally accepted C extension that doesn't compile under windows for a central system component. what are the alternatives here?<BR/><BR/>*http://codespeak.net/py/dist/greenlet.html<BR/><BR/>* the documentation of werkzeug is well written, but there is not very much of it. googling for independent writeups does not yield much either.<BR/><BR/>* where is the community? these days i dump libraries when i discover their community talks live in mailman archives (argh) or is served by sourceforge (belch). those are web 0.4 and web 1.0 applications and they suck big time. there is a pocoo group on google** but it only has 33 members as of now (including me) and 14 discussion topics.<BR/><BR/>**http://groups.google.com/group/pocoo-libs?lnk=sg<BR/><BR/>maybe someone wants to comment on these perceived issues. i would very much like to have a minimalist approach to setting up web applications with python, and werkzeug does look nice.flowhttps://www.blogger.com/profile/18342392935682557868noreply@blogger.comtag:blogger.com,1999:blog-11788780.post-84960826679195385972008-04-03T20:44:00.000-07:002008-04-03T20:44:00.000-07:00The docs are great.The source code isn't 100% PEP ...The docs are great.<BR/><BR/>The source code isn't 100% PEP 8, but it looks way nicer than most Python source that I end up working on.jjinuxhttps://www.blogger.com/profile/03270879497119114175noreply@blogger.com