This page is no longer maintained — Please continue to the home page at www.scala-lang.org

"Scala on Your Phone"

9 replies
Randall R Schulz
Joined: 2008-12-16,
User offline. Last seen 1 year 29 weeks ago.

Hi,

I just heard about this on the IBM developerWorks podcast:

-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Scala on your phone

"Create mobile applications using Android, Scala, and Eclipse
Michael Galpin, Software architect, eBay
Michael Galpin is an architect at eBay and is a frequent contributor to
developerWorks. ...

"Summary: The Android operating system provides a powerful, open
platform for mobile development. It leverages the power of the Java™
programming language and the Eclipse tools platform. Now you can add
the Scala programming language to that mix. In this article, see how
you can use Scala as the primary development language on Android,
allowing you to write mobile applications using a more-expressive, but
also more type-safe, programming language."
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-

Randall Schulz

David Pollak
Joined: 2008-12-16,
User offline. Last seen 42 years 45 weeks ago.
Re: "Scala on Your Phone"
Greg Wilkins (of Jetty fame) has Jetty running a Lift app on his Android phone.

On Wed, Jul 1, 2009 at 3:45 PM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,

I just heard about this on the IBM developerWorks podcast:

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>

-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Scala on your phone

"Create mobile applications using Android, Scala, and Eclipse
Michael Galpin, Software architect, eBay
Michael Galpin is an architect at eBay and is a frequent contributor to
developerWorks. ...

"Summary:  The Android operating system provides a powerful, open
platform for mobile development. It leverages the power of the Java™
programming language and the Eclipse tools platform. Now you can add
the Scala programming language to that mix. In this article, see how
you can use Scala as the primary development language on Android,
allowing you to write mobile applications using a more-expressive, but
also more type-safe, programming language."
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>


Randall Schulz



--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Git some: http://github.com/dpp
michaelg
Joined: 2009-06-11,
User offline. Last seen 1 year 23 weeks ago.
Re: "Scala on Your Phone"
Hope you like the article Randall. My work on that lead me to create the Scala-Android project: http://code.google.com/p/scala-android/. The goal is to leverage the expressiveness of Scala to make it much easier to write Android applications while still using the excellent Android tools. So far that has meant adding a lot of sugar to the Android APIs. I am hoping to get a tool like Proguard integrated and maybe also take a crack at supplementing with Android's vast array of XML files with Scala code to get a lot more compiler checks. 
-- Michael

On Wed, Jul 1, 2009 at 3:45 PM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,

I just heard about this on the IBM developerWorks podcast:

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>

-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Scala on your phone

"Create mobile applications using Android, Scala, and Eclipse
Michael Galpin, Software architect, eBay
Michael Galpin is an architect at eBay and is a frequent contributor to
developerWorks. ...

"Summary:  The Android operating system provides a powerful, open
platform for mobile development. It leverages the power of the Java™
programming language and the Eclipse tools platform. Now you can add
the Scala programming language to that mix. In this article, see how
you can use Scala as the primary development language on Android,
allowing you to write mobile applications using a more-expressive, but
also more type-safe, programming language."
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>


Randall Schulz

Meredith Gregory
Joined: 2008-12-17,
User offline. Last seen 42 years 45 weeks ago.
Re: "Scala on Your Phone"
Michael,

i hypothesized that dev productivity might be the wedge against the iPhone. Now that you've had a taste of what you can do with Scala/Android, what's your take on that? (Also, do you have experience with ObjectiveC + XCode?)

Best wishes,

--greg

On Wed, Jul 1, 2009 at 4:36 PM, Michael Galpin <mike.sr@gmail.com> wrote:
Hope you like the article Randall. My work on that lead me to create the Scala-Android project: http://code.google.com/p/scala-android/. The goal is to leverage the expressiveness of Scala to make it much easier to write Android applications while still using the excellent Android tools. So far that has meant adding a lot of sugar to the Android APIs. I am hoping to get a tool like Proguard integrated and maybe also take a crack at supplementing with Android's vast array of XML files with Scala code to get a lot more compiler checks. 
-- Michael

On Wed, Jul 1, 2009 at 3:45 PM, Randall R Schulz <rschulz@sonic.net> wrote:
Hi,

I just heard about this on the IBM developerWorks podcast:

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>

-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
Scala on your phone

"Create mobile applications using Android, Scala, and Eclipse
Michael Galpin, Software architect, eBay
Michael Galpin is an architect at eBay and is a frequent contributor to
developerWorks. ...

"Summary:  The Android operating system provides a powerful, open
platform for mobile development. It leverages the power of the Java™
programming language and the Eclipse tools platform. Now you can add
the Scala programming language to that mix. In this article, see how
you can use Scala as the primary development language on Android,
allowing you to write mobile applications using a more-expressive, but
also more type-safe, programming language."
-==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-

<http://www.ibm.com/developerworks/opensource/library/os-eclipse-scala/index.html?ca=dth-grn>


Randall Schulz




--
L.G. Meredith
Managing Partner
Biosimilarity LLC
1219 NW 83rd St
Seattle, WA 98117

+1 206.650.3740

http://biosimilarity.blogspot.com
michaelg
Joined: 2009-06-11,
User offline. Last seen 1 year 23 weeks ago.
Re: "Scala on Your Phone"
Here was my motivation for Scala/Android: http://fupeg.blogspot.com/2009/06/scala-and-android.html

I am very familiar with iPhone development. Part of my day job is eBay Mobile on the iPhone. We have also built an Android version, but it is not released (long story, don't ask.) In short, ObjC is ok. Its Smalltalk-ish features are useful, like having cheap reflection. Its verbosity level is mindblowing at times. Good example is how events are handled.

ObjC => Set delegate. In delegate, make sure you implement obscurely named methods. If not, app compiles, app runs, but event is ignored. (It is more accurate to blame this on Cocoa, not ObjC)

Android => Implement an interface with only method. Call a setter on the UI object to set the handler.

What I'd really like to do with Scala+Android is just set a property on a object to a lexically scoped closure:

myButton.onClick = { ... }

I'm not there yet, but that's one of the ideas.

Johannes Rudolph
Joined: 2008-12-17,
User offline. Last seen 29 weeks 19 hours ago.
Re: "Scala on Your Phone"

My major problem with Scala on Android is the slow compilation time
and the huge packages it produces if you depend on the
scala-library.jar. Sure, you can bring down the package size after
developing with ProGuard but for developing it is painful. I tried to
strip down the library.jar but it is really difficult to do so,
because class-files depend heavily on another. (BTW: Does anyone know
if there is a tool which can calculate the dominators in the class
dependency graph?)

The other objection comes from the fact that completion is not working
all the time and there is nothing like 'implement unimplemented
methods'.

Last point: The workspace in eclipse is fragile. I'm not sure if ADT
and Scala work together at all right now. The last time I checked it
was always half an hour trying to recompile and refresh, changing the
classpath and so on, before compilation worked. It was never sure if a
change made it into the package and to the phone or not.

So for the moment, I'm back to Java for Android development because
it's so much smoother.

Walter Chang
Joined: 2008-08-21,
User offline. Last seen 3 years 26 weeks ago.
Re: "Scala on Your Phone"
for my android project, i use sbt and proguard and the development cycle goes pretty smoothly.  i can deploy to the emulator of to the device from sbt directly and the apk size after proguard is around 10KB for a minimum app.  the time it takes to build a complete apk on my mbp is fairly short as well (so short that i dont really pay attention to it).  my only gripe about android app development is actually not scala related: a lot of android api is plain crap, clearly written by someone who does not know a thing about java.  but hey, as far as i am concerned, android is the only game in town and i dont want to miss it.

On Fri, Jul 3, 2009 at 12:57 PM, Johannes Rudolph <johannes.rudolph@googlemail.com> wrote:
My major problem with Scala on Android is the slow compilation time
and the huge packages it produces if you depend on the
scala-library.jar. Sure, you can bring down the package size after
developing with ProGuard but for developing it is painful. I tried to
strip down the library.jar but it is really difficult to do so,
because class-files depend heavily on another. (BTW: Does anyone know
if there is a tool which can calculate the dominators in the class
dependency graph?)

The other objection comes from the fact that completion is not working
all the time and there is nothing like 'implement unimplemented
methods'.

Last point: The workspace in eclipse is fragile. I'm not sure if ADT
and Scala work together at all right now. The last time I checked it
was always half an hour trying to recompile and refresh, changing the
classpath and so on, before compilation worked. It was never sure if a
change made it into the package and to the phone or not.

So for the moment, I'm back to Java for Android development because
it's so much smoother.

--
Johannes

-----------------------------------------------
Johannes Rudolph
http://virtual-void.net



--
.......__o
.......\<,
....( )/ ( )...
Mark Harrah
Joined: 2008-12-18,
User offline. Last seen 35 weeks 3 days ago.
Re: "Scala on Your Phone"

I'd be interested in getting a good writeup on the sbt wiki about how you use
sbt for android development or at least a link to a writeup you've done
elsewhere.

Thanks,
Mark

On Friday 03 July 2009 01:47, Walter Chang wrote:
> for my android project, i use sbt and proguard and the development cycle
> goes pretty smoothly. i can deploy to the emulator of to the device from
> sbt directly and the apk size after proguard is around 10KB for a minimum
> app. the time it takes to build a complete apk on my mbp is fairly short as
> well (so short that i dont really pay attention to it). my only gripe about
> android app development is actually not scala related: a lot of android api
> is plain crap, clearly written by someone who does not know a thing about
> java. but hey, as far as i am concerned, android is the only game in town
> and i dont want to miss it.
>
> On Fri, Jul 3, 2009 at 12:57 PM, Johannes Rudolph <
> johannes.rudolph@googlemail.com> wrote:
>
> > My major problem with Scala on Android is the slow compilation time
> > and the huge packages it produces if you depend on the
> > scala-library.jar. Sure, you can bring down the package size after
> > developing with ProGuard but for developing it is painful. I tried to
> > strip down the library.jar but it is really difficult to do so,
> > because class-files depend heavily on another. (BTW: Does anyone know
> > if there is a tool which can calculate the dominators in the class
> > dependency graph?)
> >
> > The other objection comes from the fact that completion is not working
> > all the time and there is nothing like 'implement unimplemented
> > methods'.
> >
> > Last point: The workspace in eclipse is fragile. I'm not sure if ADT
> > and Scala work together at all right now. The last time I checked it
> > was always half an hour trying to recompile and refresh, changing the
> > classpath and so on, before compilation worked. It was never sure if a
> > change made it into the package and to the phone or not.
> >
> > So for the moment, I'm back to Java for Android development because
> > it's so much smoother.
> >
> > --
> > Johannes
> >
> > -----------------------------------------------
> > Johannes Rudolph
> > http://virtual-void.net
> >
>
>
>

mapobridge 2
Joined: 2009-07-04,
User offline. Last seen 42 years 45 weeks ago.
Re: "Scala on Your Phone"

Hi,

I downloaded Converter project from the link and tried to imported it to
eclipse. But eclipse keeps hanging while 'Building Workspace' and it
crashes. My eclipse version is 3.4.2 with the latest scala plugin. Does
anyone have similar problem?

Randall Schulz wrote:
>
> Hi,
>
> I just heard about this on the IBM developerWorks podcast:
>
>
>
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
> Scala on your phone
>
> "Create mobile applications using Android, Scala, and Eclipse
> Michael Galpin, Software architect, eBay
> Michael Galpin is an architect at eBay and is a frequent contributor to
> developerWorks. ...
>
> "Summary: The Android operating system provides a powerful, open
> platform for mobile development. It leverages the power of the Java™
> programming language and the Eclipse tools platform. Now you can add
> the Scala programming language to that mix. In this article, see how
> you can use Scala as the primary development language on Android,
> allowing you to write mobile applications using a more-expressive, but
> also more type-safe, programming language."
> -==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-
>
>
>
>
> Randall Schulz
>
>

Walter Chang
Joined: 2008-08-21,
User offline. Last seen 3 years 26 weeks ago.
Re: "Scala on Your Phone"
here you go: http://github.com/weihsiu/saisiyat

On Sat, Jul 4, 2009 at 3:01 AM, Mark Harrah <harrah@bu.edu> wrote:
I'd be interested in getting a good writeup on the sbt wiki about how you use
sbt for android development or at least a link to a writeup you've done
elsewhere.

Thanks,
Mark

On Friday 03 July 2009 01:47, Walter Chang wrote:
> for my android project, i use sbt and proguard and the development cycle
> goes pretty smoothly.  i can deploy to the emulator of to the device from
> sbt directly and the apk size after proguard is around 10KB for a minimum
> app.  the time it takes to build a complete apk on my mbp is fairly short as
> well (so short that i dont really pay attention to it).  my only gripe about
> android app development is actually not scala related: a lot of android api
> is plain crap, clearly written by someone who does not know a thing about
> java.  but hey, as far as i am concerned, android is the only game in town
> and i dont want to miss it.
>
> On Fri, Jul 3, 2009 at 12:57 PM, Johannes Rudolph <
> johannes.rudolph@googlemail.com> wrote:
>
> > My major problem with Scala on Android is the slow compilation time
> > and the huge packages it produces if you depend on the
> > scala-library.jar. Sure, you can bring down the package size after
> > developing with ProGuard but for developing it is painful. I tried to
> > strip down the library.jar but it is really difficult to do so,
> > because class-files depend heavily on another. (BTW: Does anyone know
> > if there is a tool which can calculate the dominators in the class
> > dependency graph?)
> >
> > The other objection comes from the fact that completion is not working
> > all the time and there is nothing like 'implement unimplemented
> > methods'.
> >
> > Last point: The workspace in eclipse is fragile. I'm not sure if ADT
> > and Scala work together at all right now. The last time I checked it
> > was always half an hour trying to recompile and refresh, changing the
> > classpath and so on, before compilation worked. It was never sure if a
> > change made it into the package and to the phone or not.
> >
> > So for the moment, I'm back to Java for Android development because
> > it's so much smoother.
> >
> > --
> > Johannes
> >
> > -----------------------------------------------
> > Johannes Rudolph
> > http://virtual-void.net
> >
>
>
>



--
.......__o
.......\<,
....( )/ ( )...

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland