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 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP
  • ¥15 Python turtle 画图
  • ¥15 stm32开发clion时遇到的编译问题