Live data from Hacker News

How to integrate AngularJS with Rails 4

shellycloud.com

1–10 of 11 posts

Re: How to integrate AngularJS with Rails 4

#2
I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript, which makes learning this stuff harder.

Javascript is the lingua franca of frontend web development. Stick to that.

Re: How to integrate AngularJS with Rails 4

#3
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

I am absolutely with you here, but it seems that a lot of people are using coffeescript in tutorials because it's become the de-factor convention for Rails apps.

Fortunately for us, it's relatively easy to convert it to regular javascript.

Re: How to integrate AngularJS with Rails 4

#4
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

I guess it goes both ways. I have to mentally translate all those boilerplate curly mess when reading JavaScript and find CoffeeScript much easier to understand. CoffeeScript is much closer to Ruby syntactically, not to mention a Rails default.

Re: How to integrate AngularJS with Rails 4

#5
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

Rails has defaulted to scaffolding with coffeescript and sass since version 3.1. It makes sense then in the context of a rails 4 tutorial, that the code would be in coffeescript.

Re: How to integrate AngularJS with Rails 4

#6
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

I find coffeescript so much easier to read - I welcome the coffeescript examples and wish there were more.

Re: How to integrate AngularJS with Rails 4

#7
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

Maybe the solution is to incorporate js/coffeescript switcher tabs into the code boxes. It would be a pretty easy feature to add to a code highlighting library.

Re: How to integrate AngularJS with Rails 4

#9
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

Bottom line: everyone who knows coffeescript knows javascript. The inverse is not true. Personal preference, de facto standards, "it's just like ruby" - none of this has to even come into the equation.

Re: How to integrate AngularJS with Rails 4

#10
post #2

I say this as a developer who uses ruby as my primary language - Can we just please cut it out with the coffeescript in these tutorials? It just adds another level of complexity on top of the tutorial. Everybody already knows javascript, just write your examples in that. Instead, in addition to absorbing the Angular portion of this tutorial, I also have to mentally translate everything from coffeescript to javascript…

Bottom line: everyone who knows coffeescript knows javascript. The inverse is not true. Personal preference, de facto standards, "it's just like ruby" - none of this has to even come into the equation.

>everyone who knows coffeescript knows javascript.

Is this necessarily true? You can't put coffeescript between script tags and just have it run, as it's designed to use incompatible idioms which need to be 'compiled' to js (because js is ugly and awkward).

It's entirely possible someone who has only ever used coffeescript and has a deep aversion to js has no idea how to actually write the js version of whatever it is they're coding.

Post reply on HN