Help for a beginner :) Rest service with mySQL database (golang vs. c#)

agolangf · · 561 次点击    
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
<p>Hey! I work on a project as backend developer for two mobile applications (Android and IOs) and wrote my server in c# with MVC. Now I found this great project so now my question, is it hard to wirte a rest service for a mysql server? (At the project I got about 10 tables and about 60 rows) And are there any advantages for the mobile applications if I choose golang? And what are the main advantages of golang against MVC c#?</p> <p>Than you!</p> <hr/>**评论:**<br/><br/>heraclmene: <pre><p>Please have a look on Google and decide for yourself. One person&#39;s opinion might not be the reason why you should make the switch. </p></pre>Mr_Swifts: <pre><p>Hiya</p> <p>It is pretty easy to write rest services in go, but while the learning curve for go is smaller than other languages it is still there.</p> <p>The main advantages of go server would be performance, and you get concurrency for no extra work</p></pre>PsyWolf: <pre><p>For a simple rest service over a few tables, either one will do just fine. Go and C# have similar performance characteristics (faster than python, slower than C), so I wouldn&#39;t base your decision making on that. If you want to do things concurrently, go may be easier. If your project does something specific that will benefit heavily from generics, C# will be easier.</p> <p>I summed up my personal opinion on Go vs .NET a while back, so I&#39;ll just refer you to that for the broader comparison <a href="https://www.reddit.com/r/golang/comments/5cenu6/z/d9wpvpq" rel="nofollow">https://www.reddit.com/r/golang/comments/5cenu6/z/d9wpvpq</a> </p></pre>brightam1: <pre><p>There are no advantages for clients going with either C# or Go. That&#39;s kind of the point of writing a REST Service/API is that it separates client and server tasks. </p> <p>tldr C# for development speed, Go for application speed</p> <p>C# with WebAPI and Entity Framework (connector here: <a href="http://dev.mysql.com/downloads/connector/net/" rel="nofollow">http://dev.mysql.com/downloads/connector/net/</a>) should get you up and running with basic CRUD operations very quickly. C# is also a very mature and convenient language that should be able to handle every problem you throw at it.</p> <p>While I very much enjoy programming in Go, it takes more work than C# to get every thing up and running. If you are already familiar with C# and are looking to get something done I&#39;d suggest you continue with C#. Don&#39;t give up on Go though. If you want to learn more about all of the things that .NET WebAPI and MVC is handling for you then Go is a great language to learn about web servers and with some work you can put together a well-tuned and fast REST service.</p></pre>ultra_brite: <pre><p>asp.net MVC is a fully featured web framework. Go is a language with a standard library. There is no equivalent to MVC in Go, none.</p> <p>Now imaging having to re-implement MVC with the asp.net std lib only. That&#39;s the difference between C# + MVC and Go . I don&#39;t think a Go web service would be faster, the bottleneck is going to be your RDBMS.</p></pre>

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

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