

Python, JRuby on the Android Platform in 10 Steps - jefe78
http://www.thebitsource.com/programming-software-development/android/python-jruby-on-the-android-platform-in-10-steps/

======
alanh
Wow, title does not match the article at all. Doesn’t look you like can
actually develop in Python yet, or at least without considerably more work.

The title, to me, implies Google backing & compilation for Dalvik.

~~~
nailer
Indeed. Flagging the post as it's misleading.

------
technomancy
I'm skeptical towards the ASE approach; Tim Bray's post on the subject has a
good overview of the challenges inherent in getting nicer languages working
for Android apps: [http://www.tbray.org/ongoing/When/201x/2010/07/28/Ruby-
and-P...](http://www.tbray.org/ongoing/When/201x/2010/07/28/Ruby-and-Python-
on-Android)

My money is on Mirah, a new fast, lightweight JVM language that feels like
Ruby but compiles to identical-to-Java bytecode:
<https://github.com/mirah/pindah> I don't think shoehorning existing runtimes
is a suitable long-term approach.

~~~
cageface
Agreed. Something like Mirah, designed to run the the Java ecosystem from the
ground up, makes more sense and brings along far less baggage. You lose the
Python libraries if you go this route but I suspect you're mostly just going
to be gluing together bits of the Android APIs anyway so it's less of a loss.

~~~
ddkrone
I am currently pulling my hair out just trying to get various activities to
send stuff between each other. Doing this stuff in Javascript is so much
easier with JSON and it's too bad there is no JSON equivalent for Java and the
static typing doesn't help matters either so I can't wait until there is
another option other than Java for writing applications.

~~~
cageface
It's funny. Half the time people claim Android's static typing is an advantage
vs iOS and half the time people instead really hate it.

I have to say that now that I'm slowly getting over the verbosity of
Objective-C I'm finding ansi C + a dynamic messaging layer to be a pretty nice
combination on iOS. It looks like I'd have to work _both_ below Java with the
NDK (painful) _and_ above it with some kind of scripting layer to get similar
speed + flexibility on Android.

~~~
ddkrone
I started programming in dynamic languages like Javascript and Ruby so I'm
really hating it. I have no idea how people manage to get anything done in
Java. I was hoping generics would help me out but when I started using them
all of a sudden interfaces started to pollute everything. I really wish
palm/hp had more competent management because their webOS operating system is
light years ahead of android/iOS.

~~~
cturner
I've lived both worlds. Java is strong where you have a large codebase with a
team working on it. Even more if you have multiple versions of your platform
running in different places and need to manage the code forward. Static typing
is really useful for this stuff. I think single-person teams, or very-well-
gelled small teams (who can all buy into a single syntactic style) are far
more effective with dynamic languages.

~~~
cageface
Good point. Context is everything for language choice.

------
koush
Fairly old news. I ported Mono to Android a few years ago and got Python and
Ruby running that way.

<http://www.koushikdutta.com/2009/02/monodalvik-interop.html>

~~~
koush
Oopsie, wrong link: [http://www.koushikdutta.com/2009/01/microsoft-dlr-and-
mono-b...](http://www.koushikdutta.com/2009/01/microsoft-dlr-and-mono-bring-
python-and.html)

~~~
th0ma5
really great effort, i will try it out, but why is it so large?

~~~
Groxx
Because it's .NET, therefore has to include the .NET library (to be of any use
at all aside from a virtual machine). Or in this case, the Mono version of the
.NET library. It's a big library.

------
ianhawes
I can't believe no one has mentioned Appcelerator Titanium yet
(<http://appcelerator.com>). Titanium allows you to create Android
applications in JavaScript. Even though its not python, for all the Java
haters (and there are plenty) its drastically easier than creating an app in
Java. Plus, its significantly faster than using a WebView (a la PhoneGap).

With Titanium you get access to all the native controls, maps, audio/video,
camera, Facebook, and a _ton_ of other stuff. You can check out their Github
profile for more info: <http://github.com/appcelerator/titanium_mobile>.
Beyond the basic UI stuff, Don Thorp and his excellent Android develops have
recently added the ability to use Android.R resources, intents, activities,
services, notifications, and other advanced API's that you'd be hard pressed
to find in an app developed via PhoneGap. Not only is it free, but you can use
the same codebase (with some changes) to create an iOS (iPad or iPhone) app.

Unlike Mono Droid/Mono Touch, Titanium is 100% free.

------
shirtless_coder
Yeah but how feasible is it to actually distribute an app on the market with
this bundled in? Can that even be done?

~~~
jefe78
Its feasible and can certainly be done! [http://code.google.com/p/android-
scripting/wiki/SharingScrip...](http://code.google.com/p/android-
scripting/wiki/SharingScripts#Scripts_as_APK)

Enjoy! I know we'll be using this soon.

~~~
noodle
if you do, could you write up a post about it somewhere and share? i'm not
doing android dev, but making python viable really makes me want to try, and
i'd be curious to hear more.

------
evilmushroom
Still do not get all the Java hate--- it's plenty valid enough for Android
dev-- and easy to use. Some people just like hating it because they think it's
cool to do so. :)

~~~
udp
I find both Java and the Android APIs ugly, overengineered and more
importantly - _boring_! I'd rather write a webapp in HTML/CSS/Javascript than
a native Android application any day.

What I'd like to see is applications for things like Android becoming packaged
up "web pages", with platform-specific extensions to access the native APIs.
Considering webkit/V8 are already bundled, it'd make a lot of sense...

~~~
bad_user
I tried doing a simple application with Javascript + native hooks for the
iPhone, using UIWebView + hooks to native functionality. I did it like that
because the UI needed fast updates if available.

It was a horrible experience. Mobile Webkit is buggy and inconsistent and
comes with restrictions; and trying to emulate the native look&feel ... it's
like trying to provide a native look an feel for a Java AWT interface, running
on top of IExplorer 6.

I don't see it happening, and I don't wish to see it happening. Just build the
damn thing with whatever native platform the phone comes with, and leave the
platform-specific extensions out of WebKit.

Thanks,

~~~
udp
Isn't it up to the platform to give web applications the "native" look and
feel, though? If an application is just standard HTML controls, it can't be
difficult for (eg) iOS to make them look like iOS controls, surely?

If mobile webkit is as "buggy and inconsistent" as you describe, than I'd
rather see that fixed than have developers write for a completely different
language/API for each platform they want to target.

HTML/CSS/JS are open standards and supported relatively consistently across
desktop operating systems and mobile devices. I just think it makes a lot more
sense for each platform to expand that when they need to, rather than reinvent
the wheel with, for example, their own button API every time.

~~~
bad_user
Yes, because that worked so well for Swing.

------
hdragomir
Now this will bring me back to native apps for Android!

Sadly, thought, this still won't make apps easier to sell on the Android
Market, but that's for another discussion.

------
pan69
Hello Java. Thank you Jython and JRuby.

