Live data from Hacker News

Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

news.ycombinator.com

11–20 of 89 posts

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#11
Python will allow for easier modularity, wheras PHP will make it easier to pollute the global namespace. Likewise, all standard python components are made available in namespaced modules, are consistently named and well documented. You can certainly write PHP without creating a global mess, but novice developers will be tempted to introduce globals and the standard library is in the global namespace, setting a bad example.

Perhaps more importantly, many skilled developers favor Python and will avoid PHP. When you seek to grow your team, you will likely draw from a better talent pool if your application is written in Python.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#12
From my Quora post on PHP[1]:

"PHP is just like every other language: it allows you to write horrible, insecure, stupid code. It also allows you to write clean code."

Really, the language doesn't matter. Find people who write good code and give them the tools and atmosphere to do so, and your code will be good. Both are mature languages with plenty of time put into plugins, security, and documentation. Both can obviously scale well, and both have the same set of capabilities barring some specific edge cases.

[1] - http://www.quora.com/What-are-PHP-s-main-flaws-(and-good-par...

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#13
post #2

I do not know what you mean by a "robust" web application, but in my experience Python libraries (for example feedparser) are of higher all-around quality. Less pitfalls, means fewer bugs and faster development.

What I mean by 'robust' is scalable and usable.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#14
post #12

From my Quora post on PHP[1]: "PHP is just like every other language: it allows you to write horrible, insecure, stupid code. It also allows you to write clean code." Really, the language doesn't matter. Find people who write good code and give them the tools and atmosphere to do so, and your code will be good. Both are mature languages with plenty of time put into plugins, security, and documentation. Both can obvio…

Really, the language doesn't matter.

I disagree.

Python, by design, makes it hard to write bad code. PHP, by design, encourages bad code.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#15
A friend of mine always says "it just doesn't matter" in his startup, meaning just chose a language instead of constantly debating over which is better, which will scale better, which sounds more awesome...

It's probably more important to just getting something done in the first place. You can probably rewrite when you get some revenue.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#16

If you want a more "guided" approach to Python webdev, try looking into Django. There's a large community that has built up around it contributing tons of plugins. I say this as someone who is working on a Pylons site. You can do anything with Pylons that is possible with Python, you just have to figure it out yourself or twist someone else's library to make it work. Sometimes you don't need that much freedom and the…

I'd also recommend a look at Flask: http://flask.pocoo.org/. It's quite new but more polished and easier to learn than Pylons, and comes with excellent documentation and handy extensions.

As you say, however, Django is a good place to start for a beginner - it has a larger community and ecosystem of apps for doing just about anything web-related (although the apps are of variable quality). It's also quite mature (5 years now) and has more job opportunities.

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#19
post #9

Earlier quoted context omitted.

How do you relate "broken window theory" with the grammar of PHP?

Broken window theory, as it applies to code essentially says that sloppy code begets sloppy code. PHP itself has sloppy design, such as inconsistent argument order and naming conventions for built-in functions. Most of the complaints I can think of about PHP that are objectively demonstrable are outdated. The language now has namespaces, closures and the like. Most of the complaints I have left have to do with the fe…

Don't forget PHP now has goto!

Re: Ask HN: How will it impact my webapp if it is written in Python instead of PHP.

#20

If you want a more "guided" approach to Python webdev, try looking into Django. There's a large community that has built up around it contributing tons of plugins. I say this as someone who is working on a Pylons site. You can do anything with Pylons that is possible with Python, you just have to figure it out yourself or twist someone else's library to make it work. Sometimes you don't need that much freedom and the…

contributing tons of plugins.

applications, not plugins

Post reply on HN