Can RoR do everything that PHP can do?

I have been wanting to learn PHP for a while and now that I am a RoR
programmer I just wondering if it is worth it? Also, is there any thing
that I can do in PHP that I can’t do (or do very well) in RoR? and
vice-versa. Thanks,

-S

Sorry I forgott a part of my question. Can you mix PHP code in with a
RoR app? Thanks again,

-S

I used to build my sites with PHP and now I using rails and what I can
say to you is that as far as today I never ran into something that I
couldn’t do with ror, imho rails is more complete than PHP and it is
way easier and faster to program.

I should have no problems without PHP.

Thiago

On Dec 4, 12:58 pm, Shandy N. [email protected]

On Dec 4, 2007 10:33 AM, Thiago G. [email protected] wrote:

On Dec 4, 12:58 pm, Shandy N. [email protected]
wrote:

Sorry I forgott a part of my question. Can you mix PHP code in with a
RoR app? Thanks again,

-S


Posted viahttp://www.ruby-forum.com/.

This is the wrong question to ask because you’re trying to compare a
language (PHP) with a framework (Rails). Rails makes web development
easier,
in the Ruby language. If you want a proper comparison, go with CakePHP
vs
Rails, though that’s also hard to do because Cake is in most accounts a
port
of Rails to PHP.

As for mixing PHP code in with a Rails app, it is possible but it’s in
no
way easy and definitely not recommended. Besides, running PHP means you
don’t get any access to the Rails environment.

Jason

On Tue, 4 Dec 2007, Jason R. wrote:

This is the wrong question to ask because you’re trying to compare a
language (PHP) with a framework (Rails). Rails makes web development easier,
in the Ruby language. If you want a proper comparison, go with CakePHP vs
Rails, though that’s also hard to do because Cake is in most accounts a port
of Rails to PHP.

Maybe a better comparison would be RoR and symfony (symfony-project.com)
?


A

Eno wrote:

Maybe a better comparison would be RoR and symfony (symfony-project.com)
?

How about comparing it to django instead?

There are more similarities between the two, although I prefer all
things Ruby & Rails.

On Dec 4, 11:36 am, Cody S. [email protected]
wrote:

How about comparing it to django instead?

Probably because the OP specifically mentioned PHP? :slight_smile:

Jason R. wrote:

If you want a proper comparison, go with CakePHP
vs
Rails, though that’s also hard to do because Cake is in most accounts a
port
of Rails to PHP.

Jason

OK, so maybe a better question to ask is why Rails has become so popular
while these PHP centered frameworks seem to be less polular? Or maybe I
wrong, maybe they are just as popular, I have just never heard of them.
I am just trying to gage if Rails is going to become a dominate web
technology, or is it only useful for some things and not others. Right
now I am building an app that takes care of logins, encryption,
security, etc. and it seems to me that Rails if every web developers
dream come true because you can do all this and more. And now I am
starting another app that will have to deal with the same issues.

On Tue, 4 Dec 2007, Shandy N. wrote:

Or maybe I
wrong, maybe they are just as popular, I have just never heard of them.

Sounds about right… :slight_smile:

I am just trying to gage if Rails is going to become a dominate web
technology

I think it will become another option but not THE option. There’s still
a
lot of PHP out there and a lot of Java…


A

Shandy,

I have developed in PHP off and on for the past few years. I’ve
never done it full-time and I would not call myself a guru.
Competent, yes. About a year ago, I was contracted to work on some
PHP code part time, on a regular basis. I like PHP. Then in the
spring of this year, I decided that I wanted some sort of framework
for developing my own applications, so I started researching. I
don’t know why, but I didn’t come across any of the PHP-based
frameworks. All I found that were serious contenders for me were
TurboGears (Python), Django (Python), and Rails (Ruby). So the first
thing I had to do was decide if I wanted to code in Ruby or Python,
and since I didn’t know either, it was a pretty fair comparison. I
did some reading, did some experiments, and decided that I liked Ruby
better. That “forced” me to choose Rails.

A number of months later, I have left my full-time job (as a SQL
Server DBA) to work full time on the projects that I’ve been on for
the past year. I write in both PHP and Rails, but I like Rails a
whole lot more. I still like PHP, but I’d much rather write in
Rails. In fact, my “boss” is so happy with the work I’ve done in
Rails that we are going to rewrite the PHP applications in Rails some
time next year. And he’s also very happy with my PHP work, so that’s
saying something.

One of the sayings of the Rails project is “making developers
happy” (or something like that). I’m married with 3 kids and my
family will testify that I’m happier when I’m working Rails. And I’m
more productive. If I’ve got a spare 15 minutes, I can get something
real done in Rails. I need about 30 minutes to do the same things in
PHP.

This is just a quick account of my personal experience. I’ve decided
that all of my own personal projects will be Rails, because it suits
me better. Not everyone will agree. And when I say “personal
projects”, I don’t mean things that only I use. I have ideas for
commercial-ish applications that I plan on writing and releasing,
with the intent of providing the bulk of my income from them. So,
basically, I’ve put my personal financial future on Rails back. Only
time will tell if that was a good decision.

Oh, to provide something that is directed toward your question, I
have not yet come across anything that I can’t do in Rails that I
could in PHP. I may accomplish a task in a different way, but it
still gets accomplished.

Peace,
Phillip

On Tue, 4 Dec 2007, Phillip K. wrote:

… I decided that I wanted some sort of framework
for developing my own applications, so I started researching. I
don’t know why, but I didn’t come across any of the PHP-based
frameworks.

Really? I found a lot out there. Just using “PHP web framework” in
Google
gives you several of the leading contenders.

All I found that were serious contenders for me were
TurboGears (Python), Django (Python), and Rails (Ruby). So the first
thing I had to do was decide if I wanted to code in Ruby or Python,
and since I didn’t know either, it was a pretty fair comparison.

I actually started learning Python and then switched to Ruby (but that
was
long before Django came out of stealth). I like Rails but I use PHP in
my
regular day-job.

On Dec 4, 2007 10:36 AM, Cody S.
[email protected] wrote:

How about comparing it to django instead?

http://www.djangoproject.com/

It’s no comparison. Django is crap.

No join models.
No javascript integration now or ever.
Very poorly documented (http://www.djangobook.com/en/beta/ ← the
creat0rz “paused” this year to go write the dead tree version)
Views are called “templates”
Controller actions are called “views”
Template inheritance is upside down (inside out if that makes more
sense)
They have no clue about DRY (for example, model validation do not
carry over into form builders)
Models have to belong to “apps” (major problems exist when using
models across “apps”)
No testing framework.
Free admin site but you’ll lose much hair trying to shape it into
something you’d actually use or give a client to use.

I could go on if I thought about it and had more time.

Python: Excellent.
Django: Run like hell.


Greg D.
http://destiney.com/

On Dec 4, 2007 12:25 PM, Phillip K. [email protected] wrote:

I have not yet come across anything that I can’t do in Rails that I
could in PHP. I may accomplish a task in a different way, but it
still gets accomplished.

I agree, I haven’t found a show stopper yet.


Greg D.
http://destiney.com/

First of all, popularity is not necessarily all its cracked up to be,
but you can compare languages here http://www.tiobe.com/tpci.htm

Second, RoR is definitely not every dev’s dream, because different
projects, people, and organizations have different requirements. I
know a lot of people who consider themselves web devs but are not
programmers and RoR is too low level.

Third, I’ve found that the “really cool” Rails developers prefer to
bash it rather than hype it :slight_smile: (after all, how else do you motivate
to improve it?)

linoj

On Dec 4, 12:54 pm, Shandy N. [email protected]

From what I’ve seen, and that might not be much, but it depends on
what type of environment you want to work in. If you’re looking to go
into enterprise, Rails hasn’t made a big splash there yet. You’ll
want to know Java and possibly .NET to get into enterprise. If you
want to get into a small web development shop, Rails, PHP, .NET,
about anything you can learn will increase your marketability. The
more you know, the more opportunities you will have. If you are
looking for possible avenues to journey down at some point, don’t
limit yourself by learning just one development platform/language.
On other hand, don’t spread yourself so thin that you have no depth
in anything either. I talked to a guy once who described himself as
one of the Great Lakes as far as breadth of knowledge, but only about
an inch deep. That’s no good.

Peace,
Phillip

Rails has a much faster development process than PHP, but PHP kicks
Rails’
and Ruby’s asses when it comes down to processing power.

OK, then what if you wanted to make yourself the most marketable for the
future, which (new, old, up-and-coming) languages/technologies should I
be looking at, and lets say that I want to stick to web based
technology.

Ryan wrote:

Rails has a much faster development process than PHP, but PHP kicks
Rails’
and Ruby’s asses when it comes down to processing power.

i just want it to turn on my toaster in the morning.

fred is looking at the wiring, and greg is gonna
program the new toaster. is life good, or what?