php vs ruby

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gnet
    Confirmed User
    • Jul 2004
    • 292

    #1

    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?
    ICQ: 442-748

  • Babaganoosh
    ♥♥♥ Likes Hugs ♥♥♥
    • Nov 2001
    • 15841

    #2
    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.
    I like pie.

    Comment

    • Young
      Bland for life
      • Nov 2004
      • 10468

      #3
      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.
      ★★★

      Comment

      • Young
        Bland for life
        • Nov 2004
        • 10468

        #4
        Originally posted by Babaganoosh
        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
        ★★★

        Comment

        • Young
          Bland for life
          • Nov 2004
          • 10468

          #5
          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.
          ★★★

          Comment

          • Babaganoosh
            ♥♥♥ Likes Hugs ♥♥♥
            • Nov 2001
            • 15841

            #6
            Originally posted by Young
            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
            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.
            I like pie.

            Comment

            • gnet
              Confirmed User
              • Jul 2004
              • 292

              #7
              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?
              ICQ: 442-748

              Comment

              • Babaganoosh
                ♥♥♥ Likes Hugs ♥♥♥
                • Nov 2001
                • 15841

                #8
                Originally posted by gnet
                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.
                I like pie.

                Comment

                • Killswitch - BANNED FOR LIFE

                  #9
                  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...

                  Comment

                  • d-null
                    . . .
                    • Apr 2007
                    • 13724

                    #10

                    __________________

                    Looking for a custom TUBE SCRIPT that supports massive traffic, load balancing, billing support, and h264 encoding? Hit up Konrad!
                    Looking for designs for your websites or custom tubesite design? Hit up Zuzana Designs
                    Check out the #1 WordPress SEO Plugin: CyberSEO Suite

                    Comment

                    • V_RocKs
                      Damn Right I Kiss Ass!
                      • Nov 2003
                      • 32449

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

                      Comment

                      • sysk
                        Confirmed User
                        • Aug 2007
                        • 1005

                        #12
                        Originally posted by Young
                        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
                        icq: 612510168 / email: [email protected] / php ninja 4 hire

                        Comment

                        • Iron Fist
                          Too lazy to set a custom title
                          • Dec 2006
                          • 23400

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

                          ;)
                          i like waffles

                          Comment

                          • mrkris
                            Confirmed User
                            • May 2005
                            • 2737

                            #14
                            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.

                            PHP-MySQL-Rails | ICQ: 342500546

                            Comment

                            • GrouchyAdmin
                              Now choke yourself!
                              • Apr 2006
                              • 12085

                              #15
                              Originally posted by mrkris
                              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?

                              Comment

                              • kenny
                                Confirmed User
                                • Mar 2002
                                • 7245

                                #16
                                Originally posted by mrkris
                                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?
                                7

                                Comment

                                • kenny
                                  Confirmed User
                                  • Mar 2002
                                  • 7245

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

                                  Comment

                                  • mrkris
                                    Confirmed User
                                    • May 2005
                                    • 2737

                                    #18
                                    Originally posted by kenny
                                    There is nothing wrong with PHP OOP ... what can't it do that ruby can?
                                    I'm not even going to reply to this.

                                    PHP-MySQL-Rails | ICQ: 342500546

                                    Comment

                                    • Babaganoosh
                                      ♥♥♥ Likes Hugs ♥♥♥
                                      • Nov 2001
                                      • 15841

                                      #19
                                      Originally posted by mrkris
                                      I'm not even going to reply to this.
                                      Seriously, what can Ruby do that PHP can't?
                                      I like pie.

                                      Comment

                                      • Ravage
                                        Confirmed User
                                        • Mar 2007
                                        • 2242

                                        #20
                                        Originally posted by Babaganoosh
                                        Seriously, what can Ruby do that PHP can't?
                                        Not scale


                                        I do find it funny that the 37signals.com is done in PHP and they created RoR http://37signals.com/?=PHPE9568F36-D...9-00AA001ACF42
                                        Formerly known as Adult Rental Chris
                                        ICQ - 452-693-463 | Skype: xravagex

                                        Comment

                                        • gnet
                                          Confirmed User
                                          • Jul 2004
                                          • 292

                                          #21
                                          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.
                                          ICQ: 442-748

                                          Comment

                                          • BestXXXPorn
                                            Confirmed User
                                            • Jun 2009
                                            • 2277

                                            #22
                                            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
                                            ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

                                            Comment

                                            • BestXXXPorn
                                              Confirmed User
                                              • Jun 2009
                                              • 2277

                                              #23
                                              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.
                                              ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

                                              Comment

                                              • mrkris
                                                Confirmed User
                                                • May 2005
                                                • 2737

                                                #24
                                                Originally posted by Babaganoosh
                                                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.

                                                PHP-MySQL-Rails | ICQ: 342500546

                                                Comment

                                                • Krea Peter
                                                  Registered User
                                                  • Aug 2005
                                                  • 33

                                                  #25
                                                  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.


                                                  Adult design by Kreadult.com
                                                  10 YEARS IN BUSINESS • 100’s OF CLIENTS • 1000’s OF PAYSITE DESIGNS • 100,000+ OF BANNERS • AND GROWING

                                                  Hot DESIGN SPECIALS coming on JULY 10

                                                  Comment

                                                  • Babaganoosh
                                                    ♥♥♥ Likes Hugs ♥♥♥
                                                    • Nov 2001
                                                    • 15841

                                                    #26
                                                    Originally posted by mrkris
                                                    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.
                                                    I like pie.

                                                    Comment

                                                    • sysk
                                                      Confirmed User
                                                      • Aug 2007
                                                      • 1005

                                                      #27
                                                      Originally posted by mrkris
                                                      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.
                                                      Last edited by sysk; 07-07-2009, 01:55 PM.
                                                      icq: 612510168 / email: [email protected] / php ninja 4 hire

                                                      Comment

                                                      • Varius
                                                        Confirmed User
                                                        • Jun 2004
                                                        • 6890

                                                        #28
                                                        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.
                                                        Skype variuscr - Email varius AT gmail

                                                        Comment

                                                        • BestXXXPorn
                                                          Confirmed User
                                                          • Jun 2009
                                                          • 2277

                                                          #29
                                                          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.
                                                          ICQ: 258-202-811 | Email: eric{at}bestxxxporn.com

                                                          Comment

                                                          • mrkris
                                                            Confirmed User
                                                            • May 2005
                                                            • 2737

                                                            #30
                                                            Originally posted by Babaganoosh
                                                            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.

                                                            PHP-MySQL-Rails | ICQ: 342500546

                                                            Comment

                                                            • mrkris
                                                              Confirmed User
                                                              • May 2005
                                                              • 2737

                                                              #31
                                                              Originally posted by sysk
                                                              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.

                                                              PHP-MySQL-Rails | ICQ: 342500546

                                                              Comment

                                                              • Babaganoosh
                                                                ♥♥♥ Likes Hugs ♥♥♥
                                                                • Nov 2001
                                                                • 15841

                                                                #32
                                                                Originally posted by mrkris
                                                                I listed a couple, feel free to research the rest.
                                                                That's what I figured, fanboy.
                                                                I like pie.

                                                                Comment

                                                                • mrkris
                                                                  Confirmed User
                                                                  • May 2005
                                                                  • 2737

                                                                  #33
                                                                  Originally posted by Babaganoosh
                                                                  That's what I figured, fanboy.
                                                                  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.

                                                                  PHP-MySQL-Rails | ICQ: 342500546

                                                                  Comment

                                                                  • dissipate
                                                                    The Dirty Frenchman
                                                                    • Nov 2005
                                                                    • 8904

                                                                    #34
                                                                    Originally posted by mrkris
                                                                    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 ;-)

                                                                    Comment

                                                                    • gwidomains
                                                                      Confirmed User
                                                                      • May 2007
                                                                      • 426

                                                                      #35
                                                                      neither RoR nor CakePHP
                                                                      Django

                                                                      Comment

                                                                      • Babaganoosh
                                                                        ♥♥♥ Likes Hugs ♥♥♥
                                                                        • Nov 2001
                                                                        • 15841

                                                                        #36
                                                                        Originally posted by mrkris
                                                                        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.
                                                                        I like pie.

                                                                        Comment

                                                                        • AlexGT
                                                                          Registered User
                                                                          • Jul 2005
                                                                          • 7

                                                                          #37
                                                                          RoR is good, but there's luck of good programmers. that's why RoR still costs more to develop ..
                                                                          Your personal Trade Script : Ask for new features right now

                                                                          Comment

                                                                          Working...