Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm looking to get into application development, such as Facebook or Android apps and games. I am doing this for fun and to learn. Once my skills are to par I would like to have some side income from the apps, but I'm not banking on living off that (just so you know where I'm coming from and know what my end goals are). Currently I know and am familiar with PHP and frameworks such as cakephp and yii. However, I have been wanting to learn another language to broaden my horizons and to become a better developer.

So I have narrowed it down to 2 languages. Python, and Java (I can already hear people cringing at the difference in the languages I have chosen, but I have some reasons).

Python: closer to PHP than Java. Cross-platform. Also great as a general scripting language and has many file system level benefits that PHP does not. Cleaner syntax, readability, blah blah and the list goes on. Python will work great for cross platform apps and can be run on many OS's and is supported by Facebook for app development. But there is no support on Android (for full fledged apps).

Java: a much stronger typed language, very robust community and corporate backing. Knowing Java is also good for personal marketability for enterprises, if you're into that. The main benefit here is that Java can write apps natively for Android and the apps can be ported for web versions to play on Facebook. So while I have seen many developers prefer Java over the two, Java has this significant advantage, where I can market my apps in both markets and in the future build more potential income. But like I said it is for fun. While money isn't the goal, it would still be nice.

PHP: I'm putting this here because I know it already, and I'm sure a case could be made for it. It obviously works great for Facebook but like Python does not do so well on android.

While it's mostly the realm of 'application development' that appeals to me, I do find Android apps fairly interesting and something that has a ton of potential to. But then again Facebook has a ton more users and the apps can also potentially be more immersive (desktop vs. mobile). So this is why I'm kinda stuck on what route to choose. Python for Facebook and web apps, with likely faster development to production times, or Java which can be developed for any of the platforms to make apps.

Side note: I'm not really trying to get into 3D development, mostly 2D. And I also want to make an app with real-time play (websockets, etc). Someone mentioned nodejs to me for that but Python seems to be more globally versatile for my goals.

So, to anyone that does Facebook or Android development in either language: what do you suggest? Any input is valuable and I do appreciate it. And sorry for being long winded.

EDIT: as mentioned in one of the answers, my primary goal is gaming. Although I do have some plans for non-gaming apps such as general web based and desktop based ones. But gaming is my main goal with the possibility of income.

EDIT: Another consideration could be Jython. Writing Python code which is converted into Java bytecode. This would allow the ability to do Android apps using Python. I could be wrong though, I'm still looking into it.

Update 1-26-11: I recently acquired a new job which required I learn .NET using C#. Im sure some of you are cringing already but I really like the whole system and how it all works together between desktop and web development. But, as I am still interested in Python very much, and after some research I have decided I will learn Python as well as the IronPython implementation for .NET. But (again: I know...) since .NET is mostly a Windows thing and not as cross-compatible as I like, I will be learning Mono which is a cross platform implementation of .NET where I can use what I learn at work using C# and what I want to learn, Python/IronPython. So while learning and writing C#/.NET @ work I will be learning Python -> Mono -> Iron Python for what I want to do personally. And the benefit of them all being very closely related will help me out a lot, I think. What do you guys think? I almost feel like that should be another question, but there's not much of a question. Either way, you guys gave very helpful input.

share|improve this question
2  
I would suggest Javascript instead as this will be useful for your Facebook apps and with the Canvas component in Java the opportunities for writing many different kinds of games is greatly expanded. –  therobyouknow Dec 15 '10 at 13:03
    
The canvas componnent in java? I've never heard if using javascript with java unless you are thinking of jsp. Which is one of the options with java yes. Using a j2ee backend for the app.this is what I was going to do for the java version and in android, the app would talk to the j2ee server for the information. –  luckysmack Dec 15 '10 at 15:20
    
The canvas component in Java*script*: en.wikipedia.org/wiki/Canvas_element - this is a pixel accuracy writeable bitmapped display area via 2D routines so will facilitate development of sprite-based/bitmapped games. Javascript isn't among the three languages considered but no harm in making an alternative suggestion outside of these, I would think. –  therobyouknow Dec 15 '10 at 15:44
    
Ah yes, but you said java above which is why I was confused. But yes I'm familiar with it.it can also be used with svg for animation as well. Whether I used php or python I would use javascript on the front end as well. There is even a jquery that is made to work with python I believe. IMHO javascript is a must if using php/python –  luckysmack Dec 16 '10 at 4:22
    
"Which language?" questions are off topic. –  ChrisF Sep 21 '12 at 7:53
show 3 more comments

closed as off topic by gnat, ChrisF Sep 21 '12 at 7:53

Questions on Programmers Stack Exchange are expected to relate to software development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

5 Answers

up vote 11 down vote accepted

I find Python a lot more practical and comfortable. I haven't written more than a hundred lines in Java for many years.

Nevertheless, if you're concerned about marketability, go with Java. obviously it's more 'corporate minded' but my main concern is about the time to master. With Python you can be up and running in a week or two, reasonably productive in a couple of months; Java, OTOH, needs years of practice to get really fluent. So, it's more effective to learn it first and get a good handle on it before checking the 'easy' options on side projects.

(BTW, Django rocks!)

share|improve this answer
    
+1 for Django rocks. :P I don't think there is a good way to do Android in a language other than Java. I researched that for long time hoping I could use Python, but it just didn't seem practical. Python frequently relies on too many libraries to make it small enough for mobile development. –  John Dec 15 '10 at 2:28
    
Yea google has managed to get python scripts to be able to run on android, but its not for full app development. ASE has a few languages that can be run in it, including php I believe. –  luckysmack Dec 15 '10 at 3:36
    
Also,by marketability I mean the ability to find a job if I lose my current one. Here there's a butt load of java jobs, and next to nil for python. But I suppose it also depends on where your looking. As for frameworks, django looks nice coming from cakephp world. But looking at the other options pyramid seemed great too. As well as web2.py. are any frameworks good for a mix of web and desktop development? Django seems mostly web focused.not that it can't do both. –  luckysmack Dec 15 '10 at 3:57
    
Just wanted to update that even though career wise I am much better at php now, I have been doing some python for a while and am finally starting a larger project in python. I have tried various frameworks which are great. At first I was kind of looking away from jango because of a history of using large frameworks. But after a while I tried it, and love it. It just works well. –  luckysmack Mar 7 at 0:25
add comment

For writing games, I'd heartily recommend Python. Many game engines/middlewares come with Python wrappers. Even some commercial games use Python for scripting. (It's also closer to Lua and a few other commonly used scripting langugages.) Python is neat for wrapping C++, hence quite useful for game development.

Also, both Maya and Blender are good 3d-modeling & animation packages which use Python for scripting. Tool-chain and scripting is extremely important for bigger game titles.

There's also PyGame if you want to kick-start some game development.

Btw, I spent 1,5 year at a game company writing the outlines of game engine in Java (with physics/graphics/sound in C++ for speed), and while Java can be coaxed to do the stuff you want, IMO it's slightly too enterprise-y to suite the creative thinking that goes with game programming.

But YMMV, as always. :)

share|improve this answer
add comment

I have got this image from web, hope it will be helpful to everyone, as it has something for everyone. enter image description here

EDIT A Programming Language is just a tool, whatever fits in your requirements use it. All Programming Languages are good. None is less than the other. For example, if you need a screwdriver, you won't use a hammer. The number one priority for you will be screwdriver. Similarly, you can choose. I myself use Python, C#, Java and PHP; and I am happy.

share|improve this answer
1  
A lot of very subjective "facts" in there... I would definitely not consider this authoritative by any means no matter how impressive it may appear. –  Kenneth Sep 20 '12 at 22:24
    
@Kenneth: I have added it because it gives information that is mostly correct and fact, whether it is subjective or not. –  Badar Sep 20 '12 at 22:31
    
facts are by definition not subjective... –  Kenneth Sep 21 '12 at 5:09
    
@Kenneth: I just tried to help by sharing what I knew. I didn't want to start a flame war. I don't understand what you mean by subjective. –  Badar Sep 21 '12 at 12:36
add comment

I wouldn't be able to recommend one over the other unless you know specifically what you are getting into. It would be better in my opinion to take a task or project and work through it in one of these languages to get a better feel for which performs well on which tasks.


A brief overview:

Java

For creating extendable and reusable solutions. When you need fine grain detailed control over what is going on this is what I would use. It is cross platform compatible and knowledge of it is usable everywhere.

PHP

Fast web sites that you can deploy almost anywhere. There are a few excellent PHP frameworks that can help accelerate development time as well. PHP's strength is on the web front. While you can use it to do other things it is best suited for web pages.

Python

Excellent all purpose scripting language. Having a knowledge of Python is valuable when you want to write little (or not so little) management, deploy, configuration, and adjustment scripts. Also cross platform with lots of great documentation.

share|improve this answer
    
The primary field I want to get into is gaming. While sure I have other ideas I desire to tackle that aren't gaming related, that's the ultimate goal. Another idea I have is a development to production app I have planned and have already somewhat designed. No other system I've tried has really fit the niche I have needed. I think the closest was zope/plone (the closest) or capistrano. –  luckysmack Dec 15 '10 at 3:46
    
@lucky: If you want to do game development I would recommend C++ instead of anything else. –  Josh K Dec 15 '10 at 3:53
    
Yea I thought of that too.but I mostly want to focus on the web and won't be making any real intensive apps that need a worthy GPU. Most FB apps don't require much gpu processing and can be done with web technologies. And while yea gaming is one of my goals and I think will be fun, I have other non gaming goals as well.not that c++ couldn't do it. –  luckysmack Dec 15 '10 at 4:06
1  
@lucky: You can get very far in gaming on Python. It's also excellent for wrapping C++ (much better than Java) so it's a good start. Many middleware have python wrappers –  Macke Jan 23 '11 at 20:50
    
"When you need fine grain detailed control over what is going on this is what I would use." How does this apply to Java more than to PHP or Python? And calling Python a scripting language here seems ignorant of the last 10 years of Zope, Django, etc. –  Jesse Millikan Jan 24 '11 at 19:44
show 3 more comments

It depends a lot on what you want to do. Do you want to make a facebook app? I'd guess PHP. An Android app? Definitely Java. A website? Ideally, Python with Django, but PHP is OK for that too.

share|improve this answer
    
Ideally? I'm pretty sure the number of PHP powered sites outnumber Django powered sites by a wide margin. –  Josh K Dec 15 '10 at 2:35
    
@Josh: I'm sure of that too. I say ideally because IMHO, it is far easier to write Python than PHP. –  John Dec 15 '10 at 2:41
1  
@John: I disagree. –  Josh K Dec 15 '10 at 2:59
    
@Josh: Have you ever tried to write a site in Python(have you tried Python at all?)? I have. And IMHO, it's far easier than PHP which I have also done. This is just my opinion, which I am entitled to just as you are yours. Why do you prefer PHP over Python? –  John Dec 15 '10 at 3:06
    
@John: I'm building sites part time in Django right now, it's nice and I like it, but for getting something bare bones off the ground now PHP is still faster. I prefer PHP over Python for web development (see my answer). There are things Python is good at and things PHP is good at, use the right tool for the job. –  Josh K Dec 15 '10 at 3:23
show 1 more comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.