Has anyone worked with Ruby, Ruby on Rails or Sinatra?

Has anyone worked with Ruby, Ruby on Rails or Sinatra?

I have used Ruby and Ruby on Rails. I have not used Sinatra.

How do you think it compares to node.js and other languages/frameworks?

Ruby on Rails was designed to fit on top of Ruby seamlessly, so if you already know Ruby, it is a very easy to use. It is hard to make a direct comparison to node.js because you need other pieces such as Express (for routing). Ruby is a very different language than JavaScript. In fact Ruby is considered to be one of the more pure objected oriented programming languages in general. While JavaScript has object oriented parts, it is a hybrid of object oriented and functional programming.

Before I started learning more about node and javascript in general, I leaned more towards Ruby on Rails and Python’s Django. However, since the release of JavaScript ES6 and the fact that I understand so much more about JavaScript now, I really like being able to learn a single language and be able to apply it on the front-end (where there is no other choice) and the back-end (node coupled with backend libraries).

I am still learning about node, but each day I like it a little more.

Hopefully that kind of answers your question.

1 Like

What typically would javascript be used for on the front end? Couldn’t someone embed php to do the same thing?

PHP can only run on the server side. PHP can generate HTML, CSS, and JavaScript code and send back to the client.

JavaScript is the only way to manipulate the DOM.real-time to create dynamic page content. Uses for JavaScript include creating animation for HTML elements, simple form validation, creating games, and many many more uses. You can call server side scripts written in php, python, ruby, etc… with JavaScript to get back information to display to the client without every having to leave the current page. These types of behind the scenes transactions are what AJAX is all about.

Because it now be used on the front-end and the back-end is why I am liking JavaScript more and more each day.

If you have not taken any tutorials on JavaScript, you should start by trying out the Free Code Camp site (http://freecodecamp.org) and create an account if you have not already. If you are familiar with PHP, you will see some similarity in the syntax. It is not exactly the same, but it is similar enough to give you a head start in the learning process.