开发者

Would porting parts of a PHP application to Python help it scale?

I appreciate there are perhaps better ways of making a PHP application scale than the above, however I'm wondering more on pri开发者_开发问答nciple. From what I've heard, Python is faster than PHP and I'm trying to decide which language to learn next, as a PHP developer.


Python's a very good language to learn for a number of reasons, including its clear syntax, its excellent standard library, its multi-paradigm support, and the helpful community that surrounds it.

However, scalability has more to do with your system's overall architecture than with the programming language you choose. Often, the database is the main bottleneck, and the performance of the programming language that's talking to the database will not have much impact on overall site performance.


I don't think rewriting in Python will help you that much, it is very hard to say anyway without knowing your exact scalability problem. When it comes to real scaling issues, every problem is unique and there is no one true solution.

That being said, Python is an interesting language, and if you've time on your hands and want to learn something, it sounds like a good idea to look at it closely. I would also look at JavaScript more closely though, be it using NodeJS (which is also pretty damn fast for some things) or just in a browser, it's a language that is not going away anytime soon. If you're a web developer, you can't know enough JS imo.


For web applications I would personally learn Python after PHP, but if your a Windows fan consider ASP.NET.


I cant comment on the difference in scalability of a website but i have had very positive experiences using frameworks such as django for small time websites. I really love the separation of code and templating (i know you can do this somehow with php too).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜