问题
My friend and I are planning on building a sort of a forum type of webapp. We've used the major PHP frameworks but we're really thinking about using Python specifically the Pylons framework for our app. Although we're competent PHP programmers, we're somewhat noobs at Python (We could create practical scripts and such). But the thing is we really want to learn Python but by testing Pylons out it seems to be really difficult with all the numerous imports and all.
What would you suggest? What advice could you give to us? How would you suggest that we learn Pylons?
回答1:
Decide what you want to put your focus on, being productive or learning a new language:
- If you want to learn Pylons and Python, use Pylon and Python.
- If you want to deliver a stable forum software, use PHP, because that's what you're competent at.
Note: I should add that this is not meant to imply that you cannot be productive with Python or Pylon in general. All I'm saying is, in your case, you will be more productive with PHP, because you know it.
回答2:
Don't be scared off by imports in python. They're much more common when coding in python than PHP in general, and this is good because your namespace never gets polluted with stuff you aren't expecting, unless you do from foo import *
(so don't do that). I think you'll find that the structure pylons gives you will be invaluable. There are frameworks in PHP as well, but if you want to learn python anyway, I see no reason you shouldn't dive in with Pylons.
回答3:
I don't know about Pylons but I've been in a similar situation and built a site using Django. I learned enough about Python in an environment that I was familiar with (web apps) that I now go to Python as my first choice.
回答4:
Many many times have we had this discussion at my job. We use PHP and everyone here would love to switch to python. Even for our new web projects PHP delivers, and since we use it every day that is what we use. Many things in PHP irk me, and I love python, that said Im a big fan of "use the best tool for the job".
Good code is possible in PHP (and horrible horrible code too), so use what is the best tool for you, and for this job. If however this webapp is a hobby and/or not mission-critical software I would fully recommend python if only to learn a new language.
来源:https://stackoverflow.com/questions/2409812/should-we-use-pylons-or-php-for-our-webapp