开发者

Google App Engine -- Java or Python? [closed]

开发者 https://www.devze.com 2022-12-17 09:38 出处:网络
Closed. This question is opinion-based. 开发者_StackOverflow中文版It is not currently accepting answers.
Closed. This question is opinion-based. 开发者_StackOverflow中文版It is not currently accepting answers.

Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.

Closed 9 years ago.

Improve this question

I noticed that this was asked in the following post. Has anyone used both and can conclusively tell me which is better? It seems like python might be a little easier to implement and faster?


By this time, both implementations are reasonably mature and solid, and their functionality is pretty similar (I don't think it's quite 100% equal yet, but, moving in that direction). So, if you already know only one of the two languages, I'd say "just go for it". If you already know both, you don't need my advice;-).

If you know neither, but are rarin' to try some of the non-Java languages that are (more or less;-) supported on the JVM side of GAE (I believe this includes Scala, server-side Javascript, JRuby, etc), then it's worth trying. If you know neither, and don't want to risk a "not-first-class-supported language", I'd definitely agree with your observation that Python's faster to learn (but of course I'm biased in favor of Python;-).


I have used both, and my conclusion is that biggest difference is in libraries. In theory both have good libraries to do almost everything but in practice many libraries don't work with app engine:

  • All Java libraries are pure Java and should work, but as app engine does not allow threads and not even all *java.** dependencies it is... lets say problematic.
  • Python on the other hand have way less libraries out there, and many are just wrappers for native C libraries, which don't work either. :(

As both versions have such bad support for libraries, I call it tie. For very simple "just to show some content" -web app you don't need any external libraries of course.

I use now Python because it rules. ;)


"Better" is always subjective. For GAE, the choice of which is better for you depends on what you're most familiar with. If you've got experience with Java, use that, and if you've got experience with Python, use that. I don't think there's any objective criteria that would point to one being "better" than the other.


Its not just the language that you need to consider here. Libraries, frameworks, and tools are also relevant factors.

If you have no background in either language or web development, I would suspect Python would be easier to get off the ground with. It has been around longer, there is likely more support and knowledge available. Doing something simple is generally simple to do and the Python framework is in my opinion more lightweight.

Despite this, I would rather use Java. However, my reasons are controversial and I don't want to troll :D.


Python was the language Google AppEngine was originally designed for, and it has been supported for longer than Java (which only got included comparatively recently). Additionally, Guido van Rossum, the creator of Python, works on the Python side of AppEngine. The same can not be said about Java's creator.

It seems that there is more documentation and articles about Python on AppEngine than Java, probably because Python has been used in AppEngine for longer.

My advise: Use Python. But that doesn't mean Java is a bad choice, because it is not, I just think Python is a better choice in this instance.


Python ( subjectively speaking )


.py chosen here for all gae projects for reasons more readable, less lines code, higher level same time java has more ways to solve a given problem. Approx estimate same function with python is 1/10 the code compared to java.


i use python, becouse always can get the best of django in appengine


I use Groovy (Grails) with GAE. It has Java's library universe and you should have roughly the same LOC compared to Python. Yeah, its not 100% Java (if you want to), but very close. The BIG difference is roughly the JavaVM speed, that's one of the reasons Groovy (Grails) has gained so much popularity - especially people like my who dislike Python .)


It maybe possible to use Jython in appengine so you could use both. One thing I would say about the python productivity vs Java productivity argument is Java has excellent IDE's to speed up development where as Python is really lacking in this area because of its dynamic nature. So even though I prefer to use Python as a language, I don't believe it gives quite the productivity boost compared to Java when using a new framework. Also I have as yet not been able to get the python version of google app engine to work in Netbeans which is a royal pain.

0

精彩评论

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

关注公众号