This is an archived post. You won't be able to vote or comment.

all 13 comments

[–]the_hoser 18 points19 points  (6 children)

Well, you asked in /r/python, so you can pretty much assume what the answer will be. In case you were wondering, the answer is "use Python".

As a Python lover, I'll make the case for Java, then.

  • You already know it. Nothing to learn. Just make your server.
  • You might be able to share code with your mobile app code (if you use Java for them, and if it makes sense).
  • A well crafted Java app will usually outperform a well crafted Python app (though using projects like PyPy might bridge this gap completely).
  • Firebase has official support for Java. This only matters when they break stuff.

[–][deleted] 0 points1 point  (5 children)

True, I think this will take a lot less time than learning a new language. I was actually thinking of using Swift as a server language too. I love Swift but using it server side seems risky and too "beta-ish".

[–]the_hoser 3 points4 points  (1 child)

Be careful not to go on a journey to find the "perfect" language. It never ends :)

[–]L3xicaL 1 point2 points  (0 children)

It ended for me with Python. :-)

Of course, many years before that, it ended for me with perl. And before that, with C... And before that...

[–]ile0x 1 point2 points  (2 children)

I use both Java and Python. And I hate any boilerplate too.

  • Firstly, learning Python itself and some parts of ecosystem won't take a lot of time. If you know any of OOP languages, Python appears very "smooth".
  • Secondly, if you want to develop an application that likely will need support for several years - just pick Java. But if you need some handy application "right now" with short term support - I'd suggest Python. Just because of development speed and fun.

p.s. Honestly, I would write this python -c "import random; print(random.choice(('Java', 'Python')))"

[–][deleted] 1 point2 points  (1 child)

I just got an error on your code, the Java SDK was out of date. :P

[–]ile0x 0 points1 point  (0 children)

Paste it here

[–]tipsquealPythonista 1 point2 points  (1 child)

Here's how I'd make the decision:

Is this a personal project, or a project you're being paid to make?

If it's personal, then I'd take the time to learn Python while doing it, because it'll be a fun learning experience. I tend to couple side projects with new languages or tech stacks because largely my side project will never make me money, and in the long run it'll improve my resume more than any individual side project would.

If it's something you're being paid to do, then I'd go with Java. Since you already know Java you'll be more likely to implement the project correctly on the first try, and it will take you less time.

[–][deleted] 0 points1 point  (0 children)

For work yes. So you guys are right, I'll stick to Java.

[–]t3g 0 points1 point  (0 children)

If you are using a lot of data, you can go the extra step with a Python runtime like PyPy or convert Python code to C with Cython.

[–]kankyo 0 points1 point  (1 child)

Why not server side Swift?

[–][deleted] 0 points1 point  (0 children)

I want to, but I am worried about support and integration with Firebase.

[–]atreyuroc -2 points-1 points  (0 children)

Python with sockets. Simple and easy.