Javascript Frameworks

29 views
Skip to first unread message

Brandon W.

unread,
May 28, 2013, 1:17:44 AM5/28/13
to rubyonra...@googlegroups.com
I'm trying to figure out decisively what the uses are for Javascript
frameworks such as Angular and Ember in regards to Rails. My immediate
reaction to them was that it's an extra step that's being added and
clogging up the code of the application, but that's a rather biased view
considering I've never used one much less really comprehend their use.

The other point I'm trying to figure out is if we're writing all this
code and using Rails as a front end for all of this, then why don't we
skip a step and go to node.js for it?

Again, I'm new to the concept of these frameworks, so I'm not sure
exactly what to think.

--
Posted via http://www.ruby-forum.com/.

Robert Walker

unread,
May 28, 2013, 9:39:45 AM5/28/13
to rubyonra...@googlegroups.com
Brandon W. wrote in post #1110341:
> I'm trying to figure out decisively what the uses are for Javascript
> frameworks such as Angular and Ember in regards to Rails. My immediate
> reaction to them was that it's an extra step that's being added and
> clogging up the code of the application, but that's a rather biased view
> considering I've never used one much less really comprehend their use.

I wouldn't call your view of them biased, but rather a complete
misunderstanding of what these frameworks are, and the problem they are
designed to solve.

> The other point I'm trying to figure out is if we're writing all this
> code and using Rails as a front end for all of this, then why don't we
> skip a step and go to node.js for it?

You have missed the fundamental point to these frameworks. Rails is
actually being used here as a back-end to support a front-end written in
Angular or Ember.

Think of these as Model-View-Controller for your client-side JavaScript.
While these frameworks may take very different approaches to the problem
these are designed to solve the same problem. Which it basically to add
structure to your client side code the way Rails adds structure to your
server side code.

Node.js has nothing to do with any of your points. Node.js is JavaScript
running on the server. It makes no difference to Angular and Ember
whether its data (model) is delivered from the server by Ruby,
JavaScript or whatever.

> Again, I'm new to the concept of these frameworks, so I'm not sure
> exactly what to think.

If you're really interested in knowing more about these JavaScript
frameworks why don't you at least take a few minutes to actually read
the overviews on their respective web sites and try to understand what
they actually are:

http://emberjs.com
http://angularjs.org
http://backbonejs.org

mulianto

unread,
May 28, 2013, 2:38:41 AM5/28/13
to rubyonra...@googlegroups.com
Hi

These JavaScript framework is use for front end code, and the Logic of apps will be in the front end, processed and rendered in the client side eg. The browser.

The front end then will consume The data provided via REST api service by the backend, can be Rails or use nodejs with async processing capability.

These frameworks make the handling of DOM in browser more convinience and advanced, in angular there are 2 way data binding.

And for mobile apps , this is usefull as the front end can use the local resource for processing the rendering of apps, and light dan loading AS only fetch the data needed by user by easier ajax handling provided by the JavaScript framework .

Also for the backend server, AS Rails no need to process the template rendering, just handle the data persistance.

For using node as the backend, it's back to you AS developer. Will you invest Time to Dive into nodejs while you have Rails in your daily routine.

Thats what i think about the JavaScript framework like angular.


Mulianto

Sent from my iPhone
> --
> You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-ta...@googlegroups.com.
> To post to this group, send email to rubyonra...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/77a028593593fb8e25eb8afe0f3f0fe3%40ruby-forum.com?hl=en-US.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
Reply all
Reply to author
Forward
0 new messages