【问题标题】:What is the preferred way to use clojure for making a mobile app (Android and IOs versions)使用 clojure 制作移动应用程序的首选方式是什么(Android 和 IOs 版本)
【发布时间】:2014-01-23 15:53:00
【问题描述】:

我已经看到有一些工具可以从 clojure 构建移动应用程序,但我想了解有关库、环境、缺点、分析和实际工作示例的更多详细信息

谢谢

【问题讨论】:

    标签: clojure clojurescript


    【解决方案1】:

    将 ClojureScript 与 React Native 结合使用现在正在成为这个问题的一个很好的答案:

    • React Native 的性能很棒。
    • Om 和 Reagent 等现有 React 库可与 React Native 配合使用。
    • 您可以受益于“一次学习,随处编写”的知识重用。
    • 您可以从使用背后有重要社区的堆栈和语言中受益。

    最令人信服的原因是:React Native 允许您使用 ClojureScript 作为函数式语言的优势编写移动应用程序,避免命令式风格、变异和状态。

    【讨论】:

      【解决方案2】:

      到目前为止,这是我的调查结果:

      为了创建原生移动应用,我发现了 2 个可用的 lein 插件:

      • 原生安卓:lein-droid。让您使用常用的 lein 命令 [lein droid doall, lein droid install, lein droid compile] 编译、部署、安装和实时 repl。
      • 原生 iOS:lein-fruit。一个 Leiningen 插件,用于在 Clojure 和 Java 中使用 RoboVM 字节码到本机转换器构建本机 iOS 应用程序。

      还有另一种有趣的方式来构建 iOS 应用程序,其方式与使用 clojurescript 获取 javascript 的方式相同。在这种情况下,使用 clojure-scheme 从 clojure 到方案到 C

      在 irc #clojure 频道,David Nolen 和其他人建议以下路径:

      [6:27pm] dnolen: tangrammer: w/ iOS you'll have better luck with the JavaScriptCore bridge and ClojureScript  
      [6:27pm] dnolen: tangrammer: I've tried it works great and I know other people are experimenting with it as well  
      [6:28pm] dnolen: tangrammer: it does limit you to iOS 7, but you could take the Ejecta approach for earlier OSs
      [6:38pm] dnolen: tangrammer: core.async on iOS works great
      [6:38pm] dnolen: tangrammer: you can also do multithreaded CLJS on iOS
      

      【讨论】:

        【解决方案3】:

        The Why and How of Clojure on Android 是一个很好的起点,并且比我在这里做得更好。从我所见,lein-droid leiningen 插件是最简单的入门方法,尽管过程有时并不完全顺利。

        【讨论】:

          猜你喜欢
          • 2014-05-10
          • 2011-08-09
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2015-08-03
          • 1970-01-01
          相关资源
          最近更新 更多