sayun raba ang RoR. . ?
Sayon ra man ang ROR. The advantage of ruby over php is that ruby is really a object-oriented and dynamic programming language with methods overriding and overloading which not present in php. But php had larger community than ruby.
whats the difference between Ruby and RoR. . ? unsay relation nila. . ?
OT: Ring of Regeneration. hihi.
bitaw unsa bitaw ang difference sa Ruby ug sa Rails. . ?
ruby is an interpreted programming language(similar to php, python, perl)
rails is a model-view-controller(MVC) built on top of ruby(or built using ruby)(similar to PHP's symfony,cakePHP,codeIgniter)
as someone who actively uses both, i could enumerate some of diffs in ruby vs php:
ruby is a pure oop language(like java) while php is not(not sure which is the better thing though):
by this i mean, everything in ruby is an object while php has some functions)..
php's object oriented aspect is not as good as ruby's:
by this i mean:
mixin is way too powerful compared to interface.. closures for ruby, which you can't do in php.. also, note that php just started taking oop seriously in php5, ruby was from beginning..
(namespaces will be supported in future version of php, ruby has modules for namespacing)
php's dynamic aspect is not as good as ruby's:
in php, you're left with eval which can only execute code until you do a newline and some support for reflection.
in ruby, eval, class_eval, hooks(e.g. Module#extended), open classes, reflection, introspection,metaprogramming(hence dsl) are all natural.
ruby's regex is based on perl, in php it has it's own regex(but note php supports perl regex with pcre)
this one is just my opinion: perl regular expression has the superior regex construct.
in php, you have preg_match, preg_replace and etc..
in ruby(just like perl), regex comes natural as well, you can do:
"test" =~ /test/ #which is equiv preg_match
"testing".gsub(/t/,'') #which is eqiuv to preg_replace
ruby 1.9's regular expression has some new bells(w/c i don't like to explain) like look-behind, look-ahead, look-around etc built into it..
ruby 1.8 has a poor support for string encodings(which will be fully supported in 1.9), php has a rich support i think with mbstring but it's a non-default extension..
ruby is slow, php is fast..
in deployment: rails is a bit expensive compared to php. rails hosts are also smaller than of php..(prob b/c of the user base)
on ruby on rails vs the mvc framework for php such as codeigniter, cakephp, symfony.. i think these guys are looking at rails and see if they can make the feature in their php mvc frameworks.. it's almost like they're a fan of rails..
lol, quite a long post.. sorry for that..![]()
Last edited by jtpopol; 07-07-2008 at 10:14 AM. Reason: updated typos..
Ruby On Rails (ROR) is a MVC Framework built on the top of Ruby.
@jtpopol: thanks bro now i understand the difference between ruby and rails. . .
so rails is just like cakephp. . . hmmmm interesting. . .
Similar Threads |
|