Jump to content

Archived

This topic is now archived and is closed to further replies.

Ninjakreborn

php vrs ror

Recommended Posts

This is still primarily a php question.  Php has it's power, it does what it does, it has it's limits but it can do quite a bit, is ruby on rails something I could use WITH php or something that would REPLACE php.  I am always out to possibly learn new languages, but I still don't need to learn anything that will replace something I already use unless it's better, I don't think ruby on rails is a server side language.  I am just wondering how can I use ruby on rails with php, what can it do that php can't

Share this post


Link to post
Share on other sites
Ruby on Rails is standalone server side lanaguage. You cannot mix it in with PHP. If you want to create a ruby on rails site you use ruby on rails. Just like you do if you want code in ASP. You cant mix ASP with PHP as they are completly different lanaguges. The same applies to Ruby on Rails.

Share this post


Link to post
Share on other sites
And technically, Ruby on Rails is a [i]framework[/i] based on Ruby. I believe.

Share this post


Link to post
Share on other sites
That's my understanding as well.

Share this post


Link to post
Share on other sites
echo all three - ruby on rails is a framework for ruby, and ruby is a totally separate programming language from php.

i would suggest mastering one language at a time.  without trying to be offensive, it seems you have much left to learn and experiment with in php (based on your previous topics and questions).  that being said, everyone does, but i don't suggest jumping from one ship to another when the first is not yet sunk.

ruby on rails appears to be both powerful and useful (from what i've read/watched), but it is also a whole new ball game and it requires that your host has ruby on rails installed.  not to mention, i don't think ruby has anymore power than php does, given the appropriate knowledge and practice with php.

Share this post


Link to post
Share on other sites
i was thinking about Ruby as well...i migth give it a try.

[quote author=akitchin link=topic=103873.msg414233#msg414233 date=1155337478]
not to mention, i don't think ruby has anymore power than php does, given the appropriate knowledge and practice with php.
[/quote]
but there are some things about PHP that can be very annoying. for example the inconsistent function naming convention and parameter orders (the whole needle/haystack thing) and the fact that OOP in PHP doesn't allow Multiple Inheritance (an i'm not talking about simulated multiple inheritance) which would make MANY things a lot easier to do.

Does Ruby allow multiple inheritance in OOP?

Share this post


Link to post
Share on other sites
I am thinking of sticking with php and jumping other languages, until I find something I like on the side, like perl, and java I know I am going to play with, c+, c++, I don't know just studying and messing around with them on the side, ruby-on-rails looks like it would be worth learning, because a lot of clients are running ruby on rails too, so it's got enough clientel I could get from it, to make it worth the effort.

Share this post


Link to post
Share on other sites
watching this video floored me:
http://media.rubyonrails.org/video/rails_take2_with_sound.mov

there is still a lot of tweaking that would be done, but still...

and there is a php on Rails or something to that effect

Share this post


Link to post
Share on other sites
[quote]I am just wondering how can I use ruby on rails with php, what can it do that php can't[/quote]

IMO, I doubt that it can do anything that PHP cant. I think the way it's structured is what makes it so unique. Same goes for ASP - nothing it can do that Ruby can't, it's just the syntax and structure of the language that make it different. At the end of the day, all you got to remember is the OUTPUT of all of these programs is just HTML, which all of them can do with ease.
I have no experience with Ruby apart from watching clips like emehrkay posted, but it seems its strength is in the way it promotes seperation & structure and its ease of database management. However, with good working habits, these things can easily be addressed in PHP/etc too. I prefer languages like PHP as sometimes (in the case of testing things out, etc) I like to just throw something together in the 'wrong' way. I don't like the idea of being somewhat forced into doing things a particular way.

The only limitation with PHP is how much you know it.

Share this post


Link to post
Share on other sites
your real question is actually for ruby, not ruby on rails. ruby is the actual language. ruby on rails is a framework, as mentioned above.  it is a script that makes making an interactive website 'easier'.  Think of RoR as... being able to do db stuff with phpmyadmin, instead of on the command line, or.... Frontpage, where a lot of things are 'automated' for you, so you spend less time coding.  But the price of all that is that everything you create looks the same. Sure, you can go deeper into it and customize it even more, but at that point, your doing what you would have already been doing, doing it by hand.

i've read a couple articles about it, and even watched that video posted ^^^ but i think for now i'm sticking with PHP.  maybe it's the wave of the future, maybe it's not. who knows?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.