GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   php vs ruby (https://gfy.com/showthread.php?t=914320)

gnet 07-05-2009 07:42 PM

php vs ruby
 
A few months ago, I was pitching a web dev project but lost it to a dev firm in Boston. The main reason why the client chose them over me was because the other guys scoped out the job to be built in Ruby on Rails and committed to get the job done faster (3 months vs my 5 month quote), which obviously meant their quote was much lower than mine.

I'm still using php/mysql for all of my recent jobs. I've messed around with RoR and like it, but don't think it's necessary for all projects. Especially not until there are more resources available and online support.

Four months later, these guys still haven't launched, they're over budget, and now are stuck with a language and framework that most programmers aren't too fluent in. It looks like the project is now dead.

For those of you who have worked with both languages (and .net for that matter)... which do you recommend to your clients and why?

Babaganoosh 07-05-2009 07:47 PM

I know nothing about .net but I do have some experience with Ruby and PHP. Ruby deployment is a pain in the ass. Development time is significantly longer than PHP assuming you're using a similar framework like CakePHP or Code Igniter. RoR is a buzzword right now. It's trendy to use it and most people who want it don't know why they want it.

Young 07-05-2009 07:48 PM

The RoR community is huge and extremely helpful....and there is a lot of documentation out there. The only thing you're not going to find is an abundance of free and opensource scripts.

For quick jobs I'll hack together some PHP.

If I'm building something that's worth anything I'll use the Rails framework.

This topic is going to get ugly though...I know it.

Young 07-05-2009 07:49 PM

Quote:

Originally Posted by Babaganoosh (Post 16032765)
I know nothing about .net but I do have some experience with Ruby and PHP. Ruby deployment is a pain in the ass. Development time is significantly longer than PHP assuming you're using a similar framework like CakePHP or Code Igniter. RoR is a buzzword right now. It's trendy to use it and most people who want it don't know why they want it.

CakePHP is based almost entirely on how Ruby on Rails was setup. A practical clone. So dismissing RoR as hype and then in the same breath hyping up CakePHP is retarded :2 cents::2 cents:

Young 07-05-2009 07:52 PM

BTW

Scribd.com, Hulu.com, Twitter.com (scaled after initial trouble), yellowpages.com, justin.tv

All of those sites are built on Ruby on Rails. So much for just hype.

Babaganoosh 07-05-2009 07:56 PM

Quote:

Originally Posted by Young (Post 16032770)
CakePHP is based almost entirely on how Ruby on Rails was setup. A practical clone. So dismissing RoR as hype and then in the same breath hyping up CakePHP is retarded :2 cents::2 cents:

I wasn't hyping anything you ror fanboy. Stop being so touchy.

BTW, I have friends who created Django. I've got a ton of experience with that framework. You think you love Rails? Check out Django. Unfortunately it doesn't have the hype that Rails does.

gnet 07-05-2009 08:06 PM

But, for smaller projects, is ruby always the better choice? Not every project is Twitter or Hulu. And not every client has a CTO on staff to make these decisions. At the old agency that I worked at, we dealt with a CTO that requested a small brochure site ("who we are", "what we do", "how to contact us" kind of site) be built in .net simply because he felt it was much more stable than php. That's like shooting a frog with a bazooka.

Are these CTO's choosing RoR over other languages for the right reasons?

Babaganoosh 07-05-2009 08:15 PM

Quote:

Originally Posted by gnet (Post 16032792)
Are these CTO's choosing RoR over other languages for the right reasons?

No. They definitely aren't. They hear ror is pure, concentrated awesome and they want it. They have no clue why. When it comes up I try to remind decision makers that Flickr, Digg and Wikipedia use PHP. I like ror. I really do. It's fun and anything that makes coding fun is cool with me...not that that's a reason to use it to build a site.

Frankly I would love to use Django or ror to build everything but the fact remains that PHP is faster, much easier to deploy and sufficient for almost anyone.

Killswitch - BANNED FOR LIFE 07-05-2009 09:22 PM

Who cares, build what you want to build with because you like it, and if someone is paying you to build with something else, DO IT, because THEY are paying YOU for it...

d-null 07-05-2009 09:44 PM


V_RocKs 07-05-2009 11:04 PM

I get ticked off when people want a buzz word and have no idea why.. I feel your pain.

sysk 07-06-2009 12:17 AM

Quote:

Originally Posted by Young (Post 16032773)
BTW

Scribd.com, Hulu.com, Twitter.com (scaled after initial trouble), yellowpages.com, justin.tv

All of those sites are built on Ruby on Rails. So much for just hype.

Twitter = failwhale

Iron Fist 07-06-2009 12:23 AM

What good is a framework when it can only accept 140 characters for input?

;)

mrkris 07-06-2009 04:48 PM

PHP has a horrible OO implementation, but is simple to learn. Ruby has a great OO implementation, but not as fast as PHP. RubyOnRails is a framework, and works very well depending on what your requirements are. Cake/CI/etc tend to be slow because they are cloning RoR, which can do what it does because of the language itself, not because of framework features.

GrouchyAdmin 07-06-2009 05:14 PM

Quote:

Originally Posted by mrkris (Post 16036459)
PHP has a horrible OO implementation, but is simple to learn. Ruby has a great OO implementation, but not as fast as PHP. RubyOnRails is a framework, and works very well depending on what your requirements are. Cake/CI/etc tend to be slow because they are cloning RoR, which can do what it does because of the language itself, not because of framework features.

How did I know you'd be in here blowing Ruby?

'sup bitch?

kenny 07-06-2009 08:19 PM

Quote:

Originally Posted by mrkris (Post 16036459)
PHP has a horrible OO implementation, but is simple to learn. Ruby has a great OO implementation, but not as fast as PHP. RubyOnRails is a framework, and works very well depending on what your requirements are. Cake/CI/etc tend to be slow because they are cloning RoR, which can do what it does because of the language itself, not because of framework features.

There is nothing wrong with PHP OOP ... what can't it do that ruby can?

kenny 07-06-2009 08:24 PM

Let me put it this way..what can any of them do that a clean shade of Perl can't rip apart?

mrkris 07-07-2009 11:37 AM

Quote:

Originally Posted by kenny (Post 16037003)
There is nothing wrong with PHP OOP ... what can't it do that ruby can?

I'm not even going to reply to this.

Babaganoosh 07-07-2009 12:18 PM

Quote:

Originally Posted by mrkris (Post 16039209)
I'm not even going to reply to this.

Seriously, what can Ruby do that PHP can't?

Ravage 07-07-2009 12:26 PM

Quote:

Originally Posted by Babaganoosh (Post 16039412)
Seriously, what can Ruby do that PHP can't?

Not scale :winkwink:


I do find it funny that the 37signals.com is done in PHP and they created RoR http://37signals.com/?=PHPE9568F36-D...9-00AA001ACF42 :1orglaugh

gnet 07-07-2009 12:44 PM

I won't throw away the idea that ruby is > than php, but I'll need to have more proof than simply "it just is". Twitter can be built in PHP. So can Hulu and all of the other websites that have been written in ruby. And, from what I hear (depending on what php framework you're using and the scope of the project), it can probably be built faster in PHP.

The lack of online support and resources (compared to PHP) scares the crap out of me. I know that if I ever run into a PHP roadblock, I have millions of websites and hundreds of fellow programmers who I can rely on for answers. The same can't be said about ruby... yet.

BestXXXPorn 07-07-2009 12:56 PM

To me it comes down to efficiency. I'm a PHP developer and a business owner. I want to use the least servers possible and not pay licensing fees. So I use PHP. I've developed in RoR as well but I still prefer PHP, partly due to the framework I've developed over the years.

Once again though for me it all comes down to efficiency and cost. PHP offers the lowest cost at the highest efficiency with quick to production times (if you have good developers).

Ruby does have more traditional OO than PHP by a long shot but the things PHP is missing aren't really that big of a deal. In fact it really boils down the developers I've seen horrible Ruby code that doesn't use OO properly at all and of course I've seen the same in PHP (much more in fact since there are many more hobby PHP programmers out there).

But now I'm rambling... advise your client on what you think is best for them and explain the why. If they still go against it, it's their money. The client gets what the client wants, no matter what. That's what keeps the client happy, the relationship going, and the cash flowing :P

BestXXXPorn 07-07-2009 01:03 PM

Also, depending on the php apps running on your webheads look into Nginx + PHP5 (with fast-cgi and xcache)... I just deployed that on some live servers to test and watched the load drop from 3 to .15 ... I shit you not.

mrkris 07-07-2009 02:02 PM

Quote:

Originally Posted by Babaganoosh (Post 16039412)
Seriously, what can Ruby do that PHP can't?

You mean aside from the lack of mixins/multiple inheritance? If I need to go over a list, then you obviously haven't worked with real languages.

Krea Peter 07-07-2009 02:21 PM

RoR is pretty hot and we used to support it time ago, lots of popuplar sites use it... even our client extranet is powered by RoR.

Though, I still believe it really depends on the programmers and not the system that much... you can have killer tools if you don't know how to use them. My 2 cents.

Babaganoosh 07-07-2009 02:51 PM

Quote:

Originally Posted by mrkris (Post 16039880)
You mean aside from the lack of mixins/multiple inheritance? If I need to go over a list, then you obviously haven't worked with real languages.

No, I want to read this list. Post it. Stop pretending you know something I don't.

sysk 07-07-2009 02:53 PM

Quote:

Originally Posted by mrkris (Post 16039880)
You mean aside from the lack of mixins/multiple inheritance? If I need to go over a list, then you obviously haven't worked with real languages.

That's actually a good thing... multiple inheritance is a bad OO design practice.

composition >>> inheritance

Also, for your interest, PHP is a much more traditional language than ruby. Ruby's syntax is different from most languages out there. PHP's syntax and OO implementation is very close to C.

Varius 07-07-2009 03:03 PM

I think in a way, this argument boils down to the same thing as the undying Procedural vs. Object-Oriented argument.

My statement on it is, different people and different projects have different needs. That said, at this point in time, personally I've never had any use for RoR above PHP.

You'll have people benchmarking PHP as much quicker than RoR in code execution. Then, you'll have other people with the exact opposite result. PHP has that it's easier to debug problems. RoR has many supporters claiming its got much nicer readability and maintainability. The list goes on.

To sum up, I'd say:

CTOs, Project Managers and large companies prefer RoR. People who love to write comments and documentation do as well.

Independent coders who care more about speed, efficiency and could care less about what the future holds for their code (as in they don't care to know if anyone else will ever have to touch it), will definitely prefer PHP.

That's not to say you cannot have well-documented, modular PHP code. On a personal note, I fit more in the 2nd category but have learned over the years how to use PHP to its most modular capacity while not sacrificing speed and efficiency.

In the end you'll have great RoR coders, great PHP coders, bad RoR coders and bad PHP coders. It all depends on the individual.

BestXXXPorn 07-07-2009 03:31 PM

Pretty solid posts in this thread :P

"In the end you'll have great RoR coders, great PHP coders, bad RoR coders and bad PHP coders. It all depends on the individual."

I couldn't agree more... that's why when I look at a language I look at its cost and efficiency. If I can develop in any language I want and write clean code in any language I choose. Why would I select something that doesn't perform as well and/or costs more? That just doesn't make good business sense.

mrkris 07-07-2009 04:29 PM

Quote:

Originally Posted by Babaganoosh (Post 16040093)
No, I want to read this list. Post it. Stop pretending you know something I don't.

I listed a couple, feel free to research the rest.

mrkris 07-07-2009 04:33 PM

Quote:

Originally Posted by sysk (Post 16040108)
That's actually a good thing... multiple inheritance is a bad OO design practice.

composition >>> inheritance

Also, for your interest, PHP is a much more traditional language than ruby. Ruby's syntax is different from most languages out there. PHP's syntax and OO implementation is very close to C.

It depends on how you write your code. I'm not 100% fond of multiple inheritance, but I do love mixins. PHP is great for quick stuff, and does scale well, but I feel it encourages people to write bad code, and hacks in OO features here and there.

Babaganoosh 07-07-2009 04:39 PM

Quote:

Originally Posted by mrkris (Post 16040472)
I listed a couple, feel free to research the rest.

That's what I figured, fanboy. :1orglaugh

mrkris 07-07-2009 05:13 PM

Quote:

Originally Posted by Babaganoosh (Post 16040503)
That's what I figured, fanboy. :1orglaugh

I do both for a living, and know quite a bit about both. What PHP Lacks (or has shitty support for), in my opinion:

1. Blocks.
2. Namespaces
3. Lambdas
4. Mixins
5. Modules
6. OO (It's not pure OO, it's a bolted on hack fest)
7. Syntax (It's horrible)

Now, I'm not saying I hate PHP, I think they just need to get their shit in gear and build a better foundation. I also believe people should use the right tool for the job. If it's not for you, so be it.

dissipate 07-07-2009 05:41 PM

Quote:

Originally Posted by mrkris (Post 16040598)
I do both for a living, and know quite a bit about both. What PHP Lacks (or has shitty support for), in my opinion:

1. Blocks.
2. Namespaces
3. Lambdas
4. Mixins
5. Modules
6. OO (It's not pure OO, it's a bolted on hack fest)
7. Syntax (It's horrible)

Now, I'm not saying I hate PHP, I think they just need to get their shit in gear and build a better foundation. I also believe people should use the right tool for the job. If it's not for you, so be it.

Well put, and I knew you'd show up in this thread ;-)

gwidomains 07-07-2009 06:30 PM

neither RoR nor CakePHP
Django :thumbsup

Babaganoosh 07-07-2009 08:08 PM

Quote:

Originally Posted by mrkris (Post 16040598)
I do both for a living, and know quite a bit about both. What PHP Lacks (or has shitty support for), in my opinion:

1. Blocks.
2. Namespaces
3. Lambdas
4. Mixins
5. Modules
6. OO (It's not pure OO, it's a bolted on hack fest)
7. Syntax (It's horrible)

Now, I'm not saying I hate PHP, I think they just need to get their shit in gear and build a better foundation. I also believe people should use the right tool for the job. If it's not for you, so be it.

Blocks - True, I miss blocks when I am coding PHP. I couldn't grasp the concept when I was learning Ruby. Once you wrap your head around them and learn to use them correctly they are great.
Namespaces - Most of the time namespaces are unnecessary. I personally only screw with namespaces if I am using a framework or am on a monster project. That said, I will also say that support does exist for namespaces if one chooses to use them.
Lambdas - create_function() exists in PHP.
Mixins - Really? Why?
Modules - No problems with PHP modules.
OO - Undoubtedly you were using PHP before it had OO functionality too. It does feel cobbled together to those of us who were. It does function as one would expect though.
Syntax - I like it. It's easy to read and easy to manage. I'm have a strong Perl background though. Ruby syntax makes my head hurt but to each his own.

AlexGT 07-08-2009 12:21 AM

RoR is good, but there's luck of good programmers. that's why RoR still costs more to develop ..


All times are GMT -7. The time now is 02:55 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123