Using Scala.js with Cordova/PhoneGap

794 views
Skip to first unread message

Bill Bourne

unread,
Jul 6, 2014, 8:05:27 AM7/6/14
to scal...@googlegroups.com
I'm just starting to play with Scala.js - I want to use it with Cordova to be able to build "write once run anywhere" client applications.
I'd be really interested in any advice or examples anyone has of setting up a tool chain for Scala.js development with Cordova.

Thanks!

Sébastien Doeraene

unread,
Jul 6, 2014, 8:26:30 AM7/6/14
to Bill Bourne, scal...@googlegroups.com
Hi, and welcome!

It's the first time Cordova is mentioned on this mailing list, so you might very well be the first developer to use Scala.js with this platform. I can't really spend time learning Cordova + create an example setup, but I will of course be happy to help with specific questions or difficulties you might encounter.

Cheers,
Sébastien



--
You received this message because you are subscribed to the Google Groups "Scala.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scala-js+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scala-js/95df070d-0f81-4ecf-8b1d-cbb223bb0422%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

VoleRig

unread,
Jul 8, 2014, 1:40:05 PM7/8/14
to scal...@googlegroups.com
Hello, I've created a project based on cordova API that uses Scala JS + jQuery Mobile + Color JS (using static types only for the DOM and jQuery). You can see it there https://github.com/olivergg/sodexowatcher
My first goal was to have something to build HTML5 mobile application for Android/IOS (and others) ....and write all the javascript part with Scala JS. Unfortunately, jQuery mobile has very poor performance (well, at least on my Galaxy S2) which makes it not very usable on an Android smartphone. That said, my project is not tied at all to any javascript framework, so we might find some other framework to build mobile application with some decent performance (app-framework ?).
The project is still at a very early stage and there is room for improvement (for example, wrapping cordova build command with sbt). I'll be very pleased to have more contributors.
Message has been deleted

sixman9

unread,
Sep 16, 2014, 9:04:34 PM9/16/14
to scal...@googlegroups.com
Hi,
I'm also interested in coding typed JavaScript code for PhoneGap/Cordova etc. I'd like to propose a potential workflow towards that goal. I haven't tested this myself, in anger (apologies). This remains, for the moment, hypothetical:

1. Obtain the TypeScript API definitions for Phonegap.js (etc.) from DefinitelyTyped @ Github 
2. Process the TypeScript file(s) found in #1 into valid Scala[JS] files using the TypeScript-to-ScalaJS importer @ Github.
3. Finally, develop PhoneGap API code against Scala.js, using the '.scala' files generated in #2

VoleRig

unread,
Oct 2, 2014, 1:11:10 PM10/2/14
to scal...@googlegroups.com
I would use the Cordova API instead.  As a starting point, you could simply fork an existing similar project (like https://github.com/scala-js/scala-js-dom)
Reply all
Reply to author
Forward
0 new messages