4 ms·
RoR is an awesome framework that has (almost) everything you need to build monolithic web apps. Go is a different story. You need to join the pieces together t
by andreynering 10y ago
RoR is an awesome framework that has (almost) everything you need to build monolithic web apps.
Go is a different story. You need to join the pieces together to make something functional. You will probably need:
- A router like [Gin](https://github.com/gin-gonic/gin https://github.com/gin-gonic/gin)
- A [XSRF token generator and validator](https://github.com/golang/net/blob/master/xsrftoken/xsrf.go https://github.com/golang/net/blob/master/xsrftoken/xsrf.go)
- An ORM like [Gorm](https://github.com/jinzhu/gorm https://github.com/jinzhu/gorm) or [XORM](https://github.com/go-xorm/xorm https://github.com/go-xorm/xorm)
- A template lib like the one that comes with the stdlib
- Node for front-end (ugh, this is the harder part)
- The testing library in stdlib plus maybe [testify](https://github.com/stretchr/testify https://github.com/stretchr/testify)
- etc...
Many nice things are missing. Some were [shamelessy copied by other people](https://github.com/go-testfixtures/testfixtures https://github.com/go-testfixtures/testfixtures). Some you may need to implement yourself.
The big advantages is that Go has much better performance, and run on Windows, etc.
- lastofus 10y agoCan you explain more about using Node for the front end? Do you mean you use `npm` for front-end package management, or are you running a Node server process along side your Go process on the backend?
- andreynering 10y agoYes, I am talking about asset management. Rails has Asset Pipeline. In Go, if you want a build step for JS and CSS you have to play with node.
- jimjimjim 10y agoerr... RoR is a full-size framework. Ruby is the language. Go is a language. Go has frameworks. You are comparing apples to oranges. With go you can then select what functionality, libraries, toolkits or frameworks you want to use with your system. ps. why would you mention node? would you use node with a php site?
- andreynering 10y ago> Go has frameworks I don't know nothing monolithic like Rails for Go, do you? What I was trying to say is that you have to use libs, instead of a big monolithic framework like Rails, that do not exists for Go (AFAIK). I don't like Node and NPM, but it would be the alternative to Asset Pipeline (e.g. for concatenating and minifying JS and CSS, etc).
- cjslep 10y ago> I don't know nothing monolithic like Rails for Go, do you? Revel is pretty monolithic: https://revel.github.io/ https://revel.github.io/ I've used it to build a web application, and here are some of the problems it addresses (this is just the table of contents from their manual): - Controllers - URL Routing - Request Parameters - Validation - Session & Flash - Results & Response - Templates - Interceptors - Filters - Websockets - Internationalization - Cache - Database - Debugging
- bkeroack 10y agoYou don't actually need most of that.