Golang和HTML5/CSS/JavaScript(安卓应用)

huangapple go评论85阅读模式
英文:

Golang and HTML5 / CSS / JavaScript (ANDROID apps)

问题

有没有一种方法可以将golang和HTML5 / JavaScript集成在一起,以创建移动应用程序?
我正在查看以下内容:

https://godoc.org/golang.org/x/mobile/app
https://godoc.org/golang.org/x/mobile/cmd/gomobile

目前似乎只能使用OpenGL来进行UI开发。
我对Android应用程序开发还很陌生,但对于混合应用程序,可以使用Java启动一个Chrome实例,用于渲染HTML页面并运行JavaScript。
是否有类似的方法可以使用Golang实现相同的功能?

英文:

Is there a way to integrate golang and HTML5 / Javascript to create mobile apps?
I was going through

> https://godoc.org/golang.org/x/mobile/app
> https://godoc.org/golang.org/x/mobile/cmd/gomobile

It seems that only OpenGL can be used currently for UI.
I am new to android app development, but for hybrid apps a chrome instance is launched using java, which renders the HTML pages and runs the JavaScript.
Is there a similar way to achieve the same using Golang ?

答案1

得分: 1

你可以使用GopherJS将Golang转换为JS,还可以使用goco

英文:

You can use GopherJS transpiler from Golang to JS and goco.

答案2

得分: 0

gobind可以让你从Java和Objective-C中调用Go函数。
https://godoc.org/golang.org/x/mobile/cmd/gobind

你可以为Cordova编写一个插件,它可以调用Go函数。

Cordova可以帮助你使用HTML5/JavaScript构建混合应用程序。

英文:

gobind it possible to call Go functions from Java and Objective-C.
https://godoc.org/golang.org/x/mobile/cmd/gobind

You can write a plugin for cordova. It can call Go functions.

Cordova can help you to build hybrid app with HTML5/JavaScript.

huangapple
  • 本文由 发表于 2015年8月10日 23:57:57
  • 转载请务必保留本文链接:https://go.coder-hub.com/31924098.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定