+ 2

Ruby On Rails

Can I use Ruby on Rails as an alternative to PHP?

4th Apr 2018, 12:32 PM
mahir
mahir - avatar
7 Respostas
+ 2
first I'll like to note you're comparing a ruby framework to a massive programming language!. Well php is designed for web so when you talk about request speed php is way faster than ruby on rails.Ruby on rails isn't completely designed for web so you don't expect it to beat php at its own game Also cost Scarcity is a fundamental concept of economics. So if you have ten PHP developers for every one Ruby developer, and the role of the project depends on the language, than there will be a clear winner in costs. PHP, due to its heavy competition, has lower prices. As a business owner, if your motive is based on costs then this should be a very helpful incentive. There is the saying, “You get what you pay for”, but it doesn’t mean you have to pay the same amount for the experience on hand. PHP has a very easy learning curve. On top of that many PHP developers are new to programming in general and programming web applications in particular. On the other hand, Ruby is a quite harder language to learn, so people who do choose that language already know how to program. It’s very natural to have a PHP developer move to Ruby on Rails, and their experience in the PHP world transfer to Ruby. In fact many Ruby developers were once PHP developers. So why would developers jump to Ruby on Rails? Well this answer would be the same for almost every other programming language other than PHP. In every other language (except PHP) the language will limit you on the code you can write, as well as what is available to use. edit::ruby on rails could be alternative,but based on my idea it shouldn't be as effective as php
4th Apr 2018, 1:18 PM
᠌᠌Code X
᠌᠌Code X - avatar
+ 3
I think there is a bit of confusion here. 1. Ruby is not complicated to learn. Ruby has more elements (syntactically speaking) than PHP, but it is not complicated to start with the language. There are even those who begin to develop in Ruby on Rails (Rails from now on) without previous knowledge of Ruby (since not all elements of the language are used). 2. Rails is designed for the web. And it admits a greater number of requests per second (this is better reflected in the benchmarks that are available all over the web). In what differ is in memory consumption, where Rails has a higher consumption of resources. 3. The development of an application is not measured exactly like this, there are many factors that interfere. And in any case, the number of developers that can use Rails is currently high (thanks to the amount of Bootcamps that there were in later years). Similarly it is likely that you have a functional prototype in Rails is very short time, due to the nature of the framework (this was a very influential reason for many startups to adopt rails in the past). Now, in a generalized way, you can use Rails as an alternative to PHP in web development. Rails has its advantages and disadvantages with respect to PHP, but still has areas where it is used. Learning Rails or Ruby will not take you long and there are enough resources to learn. In the end you will notice that each tool can have a use.
4th Apr 2018, 6:40 PM
Mickel
Mickel - avatar
+ 3
I think the only way to check the first point is by doing a test directly, lol. It's not that complicated I've seen threads in other networks of people who learned Rails without knowing Ruby. The framework does many things automatically, so learning how to use it is easy. I've been doing several tests with Rails and what I've used from Ruby is quite minimal (considering all the elements of the language), even the template system (ERB) has been quite easy to master (although I'm not a big fan of ERB )
4th Apr 2018, 7:47 PM
Mickel
Mickel - avatar
+ 2
Ruby on Rails is a framework. You should compare PHP to "raw" Ruby. Yes, you can use ruby as alternative to PHP.
4th Apr 2018, 1:15 PM
Nikita Semenov
Nikita Semenov - avatar
+ 1
you seem to know alot about these,well lol poor me,never done anything than sololearns code playground.Wonder how 'real' programming feels like,perhaps boring.
4th Apr 2018, 7:55 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
mickel php has more requests per second than ruby on rails,for the remaining I might be wrong?I'm not even into either of those two,just saying from the few I know,but anyway it's good you backed up,also it will be quite difficult jumping into ruby on rails directly without ruby knowledge,still...just my idea
4th Apr 2018, 7:39 PM
᠌᠌Code X
᠌᠌Code X - avatar
0
in addition Ruby and PHP are some of the slowest languages to pick from, but Ruby takes more resources than PHP does. With the given performance issues, both languages have taken steps to help reduce the sluggishness that arise in everyday applications. Both languages have several runtimes, their core runtimes, such as MRI for Ruby, and Zend Engine for PHP. Using those runtimes are rather slow compared to other languages. There have been several attempts to resolve these issues. There has been work to run both languages on the JVM, which is what Java uses as its runtime. The reason to run on top of the JVM, is not only speed, but to also utilize everything Java has to offer. However just because they run on the JVM doesn’t guarantee a faster application. There are things on the JVM that run slower. So if you need your application running as fast as possible then there is also Rubinius for Ruby and HHVM for PHP which are designed to run your applications faster, at the expense of limited platform support. For example Rubinius and HHVM do not support Windows. They do not support everything the core runtimes provide, thus you’ll have to change certain parts of your application to ensure it can run on these high performance runtimes.
4th Apr 2018, 7:43 PM
᠌᠌Code X
᠌᠌Code X - avatar