Writing iOS & Android Apps in Go

lhlt138 · · 1648 次点击 · 开始浏览    置顶
这是一个创建于 的主题,其中的信息可能已经有所发展或是发生改变。

Go version 1.5 is on the way later this summer. One of the more interesting features is the ability to cross-build apps for Android and iOS. Is this just an experiment for Google or do they have bigger plans? Go has been making waves in backend development for a few years now. With syntax inspired by Python and a latent desire to correct the mistakes of C++ and Java, Go is certainly unique. For those who haven't tried it, it has some excellent concurrency and packaging features that make it enjoyable to use. While it hasn't yet reached performance parity with C++ or the 3rd-party package support levels of Python, it has been growing rapidly. On the eve of Go's upcoming release, Google quietly published a calculator app called Ivy to the App Store and Google Play. We took a look under the hood to see how they built an Android & iOS app using Go. There's a useful series of articles by Keith Lea on the basics. For Ivy, it has a minimal app delegate (iOS) and main activity (Android), which wrap the main Go runtime and calculator code. There are no SDKs, nor much use of any platform-specific features like UIKit. The display is just a drawing area, like an HTML5 canvas. David Crawshaw, one of the developers, just gave some more background on HN. As a nod to the iTunes Store restrictions, Google disabled the get "FILE" command in the Ivy interpreter. The app also uses minimal Go mobile features (just the bind interface). It appears they just wanted to test the app store release processes or commemorate this milestone. The major remaining question is, "what is Google going to do about cross-platform support?" There are a number of cross-platform toolkits that we track at SourceDNA, and runtime is just the starting place. Developers need well-designed libraries that give them access to GUI and platform capabilities. In a recent discussion, Google engineer Brad Fitzpatrick said that they are not working on this problem. Unless a third-party fills this vacuum, Golang on mobile will remain a curiosity. If so, it will be interesting to wait and see if Google steps in and launches their own cross-platform toolkit based on Go. Meanwhile, we look forward to the release of Go 1.5!

有疑问加站长微信联系(非本文作者)

入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889

1648 次点击  ∙  1 赞  
加入收藏 微博
暂无回复
添加一条新回复 (您需要 登录 后才能回复 没有账号 ?)
  • 请尽量让自己的回复能够对别人有帮助
  • 支持 Markdown 格式, **粗体**、~~删除线~~、`单行代码`
  • 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
  • 图片支持拖拽、截图粘贴等方式上传