dream543211 2014-09-22 22:16
浏览 735
已采纳

与HTML和Go进行前端交互

I'm new to Go and I've recently been going through the "Tour of Go" because I think it is/will be a very powerful language to use, much better than PHP and such. It was a big debate between learning Go or Python, but I feel Go is the path of the future.

I'm at the point in my learning that I want to know how to incorporate Go with an actual web page. I have searched everywhere on the web for how to interact with the front end side of things, like HTML, but I cannot find resources anywhere.

I'd like to be able to do your traditional tasks, such as user input from HTML forms, database retrieval, dynamically updating the interface with if say, a username is available or not. Will Go be capable of interacting with the front end of things?

A second question is if Ajax is even needed when using Go.

I know these are really entry-level questions, but I really can't find out how to get Golang to interact with the front end side of things. So if anyone could please provide links to resources you might know of, or example code, that'd be wonderful! Thank you.

  • 写回答

1条回答 默认 最新

  • dr5779 2014-09-22 22:33
    关注

    Yes, you can write a web application with Go. The Go standard library includes most everything you need to build many types of web applications.

    The wiki article on the Go Language website is a good place to learn about how to write a web applicaton with Go.

    It's easy to write Ajax applications with Go. As with other server side languages, the use of Ajax is up to you.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 lammps拉伸应力应变曲线分析
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试,帮帮忙吧
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建