5 ms·
For mobile a lot of folks are now using Clojurescript. There have been several highly rated discussions on here about the breakthroughs in the Clojurescript com
by hellofunk 11y ago
For mobile a lot of folks are now using Clojurescript. There have been several highly rated discussions on here about the breakthroughs in the Clojurescript community for getting it to operate very quickly on mobile devices.
- pjmlp 11y agoThanks, but that approach is not something I would enjoy. I try to stay away from the JavaScript universe unless I have a customer requesting a webdev project. For me mobile dev means only native code and not web widgets.
- mateuszf 11y agoClojureScript + React Native would produce a native app.
- pjmlp 11y agoNo because they run on a JavaScript container of some sort.
- hellofunk 11y agoThat's not entirely true. React Native does indeed run on the native device, not in a JS "container". The JS part is a bit of glue code. In the case of iOS for example, React Native uses the same exact UI toolkit that runs natively on the iPhone as if you have written it in Swift or Objective-C. Apple's JavaScriptCore exposes the native elements with a JS api, but they are not running inside JS. Only a minor part of the glue is interpreted as JS, and it's not usually the CPU-intensive stuff.
- pjmlp 11y agoOnly if you are speaking about iOS. I only care about Android and Windows Phone/Store.
- logicdispatch 11y agoIt's not any different than Clojure and ClojureCLR running in a "container of some sort". Clojure and ClojureCLR are libraries that add embedded support to the JVM and CLR to execute Clojure code and interop with the "native" environments there. JavaScriptCore is an embedded JavaScript runtime that provides essentially the same thing for JavaScript <-> Cocoa. You have full access to native Cocoa APIs. (Similar to Rhino or Nashorn if you are more familiar with the JVM.) You use native widgets (e.g. UITableView), not web/dom widgets. This is a different thing than Cordova, et al, that essentially run a webview with some native functionality surfaced to the dom. This is what React Native uses, and I thought I had seen some people experimenting with using ClojureScript and JavaScriptCore.
- pjmlp 11y agoClojure -> Java Bytecodes -> Dex Bytecodes -> Native code (Dalvik-JIT / ART-AOT) => No FFI, direct access to native APIs ClojureCLR -> MSIL -> AOT compilation via MDIL and .NET Native => No FFI, direct access to native APIs ClojureScript -> WebView (whatever it uses to execute JavaScript) + writing JavaScript bindings by hand for webview access I don't care about JavaScriptCore as only have access to Android and Windows Phone devices. Plus it is already enough having to deal with JavaScript toolchains when customers request webdev projects.
- mateuszf 11y agoReactNative with ClojureScript would not use a webview, but native components (at least on iOS)
- hellofunk 11y agoI can understand, but JS is not what it used to be. Things like React, OSX JavaScriptCore, Qt's native JS engine (which also allows you to build native apps for any desktop or mobile platform using Clojurescript), the use of Clojurescript server-side with Node, the state of affairs in JS are changing very rapidly, and Clojurescript is right there for leveraging all of it.
- pjmlp 11y agoI do know JavaScript quite well, most of our customers require web applications. Using JavaScript related tooling outside work does not relate with fun, at least not for me.