Hacker News new | past | comments | ask | show | jobs | submit login

I'd disagree having a backend written in Go and a front-end written in another language is being minimal. Plus I think the majority of people attracted to Go are fundamentally opposed to Javascript.



I don't think there's any other choice. You can only write javascript in the browser (anyone who writes in Go has to be fundamentally opposed to hacks like coffeescript).

I write Go on the server to serve pages, and write rich front ends using simple javascript and jQuery. Being able to do nice quick page fetches means I don't get into massive complexity on the front end with a bloated single-page app, and not trying to deal with front-end complexity on the server means my server routes stay nice and simple.

I use Gocraft/web on the server because it's a useful library not an opinionated framework, and IMHO the most Go-idiomatic of the options (I tried them all and it was a toss-up between Gorilla and Gocraft/web, which won because of the really simple, useful context and middleware paradigm).

Creating API endpoints and page routes is simple and easy, and then writing the javascript to call endpoints when needed is simple (once I'd learned to stop jQuery from appending my data to the url and put it in the request body!).

My only gripe about the mix is that GoConvey doesn't integrate with Jasmine so I have to run two test suites.


anyone who writes in Go has to be fundamentally opposed to hacks like coffeescript

Why? In fact, there's someone writing a Golang → Haxe transpiler, which is no less of a hack than CoffeeScript: http://tardisgo.github.io/


> Plus I think the majority of people attracted to Go are fundamentally opposed to Javascript.

I think the majority of people attracted to go are fundamentally opposed to broad statements such as that one.


I assume that companies like Stripe have people writing JavaScript and people who write JS will be willing to use their own productive environment.

So if you're a single guy writing everything by yourself, yeah you can also use your own programming language for both backend and frontend.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: