4 ms·
So, if you already know javascript then I would look at node.js. Full disclaimer: I actually use golang for my personal projects because I'm attracted by its s
by Bjorkbat 10y ago
So, if you already know javascript then I would look at node.js.
Full disclaimer: I actually use golang for my personal projects because I'm attracted by its simplicity and how it really doesn't hide stuff from me using hand-wavy magic. Performance is also a factor, but not one I consider when comparing it to node.
If I'm working on something I want to roll out fairly quickly. A prototype. Then I'll probably use node and leverage npm quite a bit. Typically I'll install Express, Sequelize, and Passport. If a front-end framework is necessary then I'll use Ember.
I've used Django a long time ago, and it was nice, but I'm not sure how much its changed since then. I also worked with Ruby on Rails in the past. I think you can be really productive with it if you put in the time to learn it, but I haven't found any great internet resources to really learn it, plus it's a little too hand-wavy for me.
- sisedi 10y agoThanks for the detailed reply :) I'm a little iffy with Rails myself.
- nickmerwin 10y agoHere's a great Rails learning resource: https://www.railstutorial.org https://www.railstutorial.org
- clifanatic 10y agoIf you do buy it, though, read it quick. I picked up a copy a few years back and finally got around to reading it after about 6 months or so... only to find that it already was so out-of-date that I couldn't follow along with any of the examples.
- endisukaj 10y agoHow easy is it to build a full web app with Golang (I'm talking backend + views here)? I have used Go for some small projects where I only built a REST API using Go's default http library but never for something bigger.
- Bjorkbat 10y agoNot bad at all honestly. Golang comes with a built-in templating engine that was easy enough to convince me not to look for a better one. Routing is simple, especially if you're using the Gorilla toolkit's mux package. Figuring out how to work with database calls were tricky when I first started out because I was used to Django abstracting that part away from me, but eventually I really got the hang of it. I would argue that the tricky part is session's and middleware. When I first attempted to build a golang web app that required session cookies I got so discouraged that I just swore them off and went with JSON web tokens instead. It also took me a while to wrap my head around the concept of clean middleware. I would say it was rewarding in the end though, because I learned about some low-level concepts typically abstracted away by the framework I was working with. It's fun to know about these things.
- ddmf 10y agoI've been writing our in house extranet with it, and the built in templating is very easy once you get the hang of it. The context addition makes it very easy to authenticate and pass that through to the endpoints. The https stuff is done via Caddy server that automatically serves and updates the cert via LetsEncrypt - requests are then forwarded to the go app.
- clifanatic 10y ago> if you already know javascript then I would look at node.js. I would recommend the polar opposite, actually: use a framework that has nothing in common with anything that you already know. After all, half (or more) of the point of personal projects is to learn new things, right?
- Bjorkbat 10y agoHuh, that's actually a pretty valid point. So one detail that I left off was that I actually also teach programming to complete novices in short time frames. It's kind of like a bootcamp but different in a lot of ways. We teach them node because it fits better with our tight schedule. But if you're not too terribly rushed then sure, that does sound like a good idea.
- sisedi 10y agoI just mentioned that in another comment, the fun of learning something new.