Golang Framework for Angular2+

blov · · 1122 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hi, I&#39;m looking for an golang framework to use for an Angular4 application I have to build. There are a couple out there (gin,beego,negroni,macaron,...) and I would like to hear about the experience of others.</p> <hr/>**评论:**<br/><br/>robotparts: <pre><p>Seems like this is going to be downvoted. Here are some reasons why:</p> <ul> <li><p>Angular has nothing to do with the question. It will consume an API written in whatever language/framework you want.</p></li> <li><p>There are many threads about web/api frameworks for Go already. Asking again is probably not going to provide any new insights.</p></li> </ul></pre>shovelpost: <pre><blockquote> <p>Hi, I&#39;m looking for an golang framework to use</p> </blockquote> <p>Just because you need the Angular framework to write your frontend, that does not mean that you need a framework to write your Go backend.</p> <p>Use the standard library. Write a few handlers that receive and return JSON. Keep it simple.</p></pre>LadyDascalie: <pre><p>I don&#39;t know much about the Angular side of things, but I know of this article: <a href="https://nathanleclaire.com/blog/2013/11/30/fear-and-loathing-with-golang-and-angular-js/" rel="nofollow">https://nathanleclaire.com/blog/2013/11/30/fear-and-loathing-with-golang-and-angular-js/</a></p> <p>The author has put out some pretty good content overall, so I&#39;d assume it&#39;s worth the read.</p></pre>superlinkx: <pre><p>The whole time I was reading that I was going &#34;That&#39;s not form data, why would you treat it as form data&#34;</p> <p>Glad the author finally admitted it was their own mistake and detailed how it actually works, but that was kind of a weird way to write about the issue and has a pretty misleading title. </p></pre>SeerUD: <pre><p>You probably don&#39;t need a framework, I&#39;d recommend looking at starting something with Go beforehand and seeing where you get to with a test project. There are lots of nice libraries to solve common problems like routing, etc.</p></pre>mrdiggu: <pre><p>Any http router would do. I use Chi on all of my personal and work related projects. Even the standard library can do what you need.</p> <p>I don&#39;t know about Angular but I have a neat hobby project using Go as the backend and Ember as the frontend. Seems to work out fine as long as you don&#39;t expect things to just wire themselves up. It&#39;s gonna take at least a little effort.</p></pre>nilslice: <pre><p>Apologies if I&#39;m missing the mark on your need.. but I use (and wrote) <a href="https://ponzu-cms.org" rel="nofollow">Ponzu</a> to do just this. Typically I work with React/Typescript on the front end which talks directly to the Ponzu server via HTTP using its built in JSON API. Ponzu has a useful CLI which you can use to generate most of the Go code you&#39;d need to get the HTTP server, a CMS, the API and various useful middleware (GZIP, Auth, CORS, Caching, etc). I use Ponzu as a kind of blended Rails/Wordpress system that has no concept of the &#34;front end&#34; - just a JSON API. </p> <p>There is also a &#34;Go struct-to-JS&#34; type generator tool written by another Go community memeber called <a href="https://github.com/natdm/typewriter" rel="nofollow">Typewriter</a> which might be useful and has a variety of JS flavors to pick from. </p> <p>I haven&#39;t used Angular with Ponzu yet, so if you end up trying it, please let me know how it goes!</p></pre>

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

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