![]() |
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? |
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.
|
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. |
Quote:
|
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. |
Quote:
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. |
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? |
Quote:
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. |
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...
|
|
I get ticked off when people want a buzz word and have no idea why.. I feel your pain.
|
Quote:
|
What good is a framework when it can only accept 140 characters for input?
;) |
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.
|
Quote:
'sup bitch? |
Quote:
|
Let me put it this way..what can any of them do that a clean shade of Perl can't rip apart?
|
Quote:
|
Quote:
|
Quote:
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 |
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. |
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 |
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.
|
Quote:
|
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. |
Quote:
|
Quote:
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. |
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. |
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. |
Quote:
|
Quote:
|
Quote:
|
Quote:
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. |
Quote:
|
neither RoR nor CakePHP
Django :thumbsup |
Quote:
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. |
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