SitePoint Sponsor

User Tag List

Results 1 to 25 of 25
  1. #1
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Why did you choose Ruby considering the popularity of PHP?

    Also taking into account the popularity of PHP based CMSs such as Wordpress, Drupal and Joomla; what made you decide for Ruby?

    Thanks in advance.

  2. #2
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Ruby is a much much better designed language and is more enjoyable to read and write.

    It's true PHP has a lot of software like CMS's you can take and use, Ruby has a different approach. People share small packages called gems to do one thing really well. I will take this massive library of quality contributed gems to make my own applications over packages like Wordpress any day.

  3. #3
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    Ruby is a much much better designed language and is more enjoyable to read and write.

    It's true PHP has a lot of software like CMS's you can take and use, Ruby has a different approach. People share small packages called gems to do one thing really well. I will take this massive library of quality contributed gems to make my own applications over packages like Wordpress any day.
    Fair enough, but how does that fares when making a website with a backend that will be administered by the client? With something like Wordpress, for example, I can design and code my custom theme, set up the backend with different post types, pages, content blocks and plug ins depending on the site's needs and end up with an easy to use backend for the client to use, requiring only minimal training.

    How would something similar be set up with Ruby? Would you need to build it on your own by combining gems?

  4. #4
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    There are similar options - refinery, mercury and active admin come to mind. I tend to use as minimal a system as needed.

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I'm not a ruby guy (outside of chef) but I would start at http://me.veekun.com/blog/2012/04/09...of-bad-design/

  6. #6
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    There are similar options - refinery, mercury and active admin come to mind. I tend to use as minimal a system as needed.
    Cool, thanks for the info

    Quote Originally Posted by wwb_99 View Post
    I'm not a ruby guy (outside of chef) but I would start at http://me.veekun.com/blog/2012/04/09...of-bad-design/
    Hmm, it was my impression that plenty of the criticisms that are usually raised about PHP no longer apply to it's latest versions and that modern frameworks like Laravel bring things rather close to Ruby's syntax style.

  7. #7
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Evoken View Post
    Hmm, it was my impression that plenty of the criticisms that are usually raised about PHP no longer apply to it's latest versions and that modern frameworks like Laravel bring things rather close to Ruby's syntax style.
    Frameworks really do help a lot and you will be able to structure your applications similarly in any language now. Most of the quality popular web frameworks across the board like Laravel(php), Express(node), Django(python), MVC(.net) have all borrowed heavily from Ruby's Rails or Sinatra.

    You're always going to be bound to the underlying languages though, out of those languages listed above PHP would easily come in dead last as my preferred language. In writing and reading style / structure and capability.

    If I were to order them Ruby and Python sit at the top of the list as they're expressive and have a good structure. C# is a good language if you don't mind working with a microsoft stack. Node appeals to me a lot, though for all of JavaScript's strengths it has as many gotchas and npm doesn't have anywhere near as many quality packages as there are gems yet. I don't have many positive things to say about PHP other than it's popularity, simplicity and that it runs on any Apache host.

  8. #8
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I see this thread kind of smashing PHP..

    I have to jump in here. I dabbled with ROR; and I personally have to say its a joke; who cares if its fun and friendly, and has rainbows and little stupid unicorns helping you with gems.. Ya Ruby has some fans about less than a thousand of them while PHP has over 600,000+ programmers.

    When you bring up bad programming design. That's based on the developer (s) coding. PHP is an extremely powerful object oriented programming landuage; using MVC. Ruby reminds me of other standard frameworks in the PHP community like Zend, CodeIgniter, Yii etc... I even seen developers screw up the MVC structure in those frameworks too.

    There's always a HUGE community of php developers and resources out to help develop applications faster. Ruby so called Gems is same thing as PHP Libraries; there's hundred-thousands of libraries out there for PHP. If someone was going to choose between Ruby(RoR) over PHP consider the job possibilities. There's about 1 of 10,000 jobs posted on different networks (Craigslist, Monster, Careerbuilder, elance, guru) for PHP; maybe just maybe you'll find 1 job posting for a Ruby developer.

    I developed in PHP since 2001. If i was to get into Web Development now... I would consider those facts. PHP obviously is the winner. or .NET a lot of jobs for .NET too.

    If Ruby was so great there would be more demand for it.. and I would be trying my hardest to learn it for job security..
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  9. #9
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,228
    Mentioned
    194 Post(s)
    Tagged
    2 Thread(s)
    A think a lot of the Ruby "buzz" had to to with Rails and it's use of Scaffolding. i.e. if you stuck with the conventions a lot of things were created automatically.
    This would allow for more rapid churning out of websites.

    Any language has to deal with a set of common problems it's how they go about it that differs and IMHO some do some better, some not so much.

    Rails and Gems aside, I like Ruby a lot because the code can be a lot "cleaner" and easier to understand. But I still prefer PHP because that's what I've been working with the longest and feel comfortable using.

    Of course as said, the tools used don't ensure they're used correctly or in the best way.

  10. #10
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by Shaydez;
    I see this thread kind of smashing PHP..
    The thread's question was "Why do you prefer Ruby over PHP given PHP's popularity?" and we've given our honest opinions.

    Quote Originally Posted by Shaydez;
    PHP has over 600,000+ programmers. I dabbled with ROR; and I personally have to say its a joke. If Ruby was so great there would be more demand for it.
    I listed it's popularity as one it's few strengths, it still doesn't want me to write code in it every day of my life as I find there's much better options these days. The interest in PHP has been in a steady linear decline for the last 10 years.

    Quote Originally Posted by Mittineague View Post
    A think a lot of the Ruby "buzz" had to to with Rails and it's use of Scaffolding. i.e. if you stuck with the conventions a lot of things were created automatically.
    This would allow for more rapid churning out of websites.
    Nah, most developers who have used Rails for more than a couple of months don't find much benefit in the Scaffolding, I found it a good teaching aid though.

    Quote Originally Posted by Mittineague View Post
    Rails and Gems aside, I like Ruby a lot because the code can be a lot "cleaner" and easier to understand. But I still prefer PHP because that's what I've been working with the longest and feel comfortable using.
    This is the main reason people stick with a technology, familiarity.

  11. #11
    SitePoint Enthusiast
    Join Date
    May 2007
    Posts
    96
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by markbrown4 View Post
    The interest in PHP has been in a steady linear decline for the last 10 years.
    But hasn't that been the case for Ruby/Ruby on Rails over the last few years as well? I think it was on this site that I recently read an article about the programming languages to learn and it showed Ruby losing market share. If you put Ruby on Google Trends, you can see it peeking around 2006 and slowly declining since then:

    http://www.google.com/trends/explore...2F06ff5&cmpt=q

    As far as PHP goes, I don't know...it may be that it's popularity is artificially boosted by the mass appeal of PHP based CMS solutions like Wordpress, Drupal and Joomla; but then again, why aren't there equally popular solutions based around Ruby?

  12. #12
    SitePoint Mentor silver trophy
    Rubble's Avatar
    Join Date
    Dec 2005
    Location
    Cambridge, England
    Posts
    2,435
    Mentioned
    82 Post(s)
    Tagged
    3 Thread(s)
    I think one problem with using Ruby is it does not tend to be installed on servers by default. I suppose a catch 22 situation - it is not installed so people do not use it; it is not installed as not many people use it.
    Shared hosting seems to be very conservative with what they install.

  13. #13
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Rubble View Post
    I think one problem with using Ruby is it does not tend to be installed on servers by default. I suppose a catch 22 situation - it is not installed so people do not use it; it is not installed as not many people use it.
    Shared hosting seems to be very conservative with what they install.
    - this goes back what I'm saying about popularity. If there was a huge market for Ruby, I'm sure hosting providers would toss Ruby into their hosting packages. I asked my hosting provider to install ruby, they had no problem doing so. It's not like its a deal breaker when selling hosting services.

    Quote Originally Posted by Evoken View Post
    But hasn't that been the case for Ruby/Ruby on Rails over the last few years as well? I think it was on this site that I recently read an article about the programming languages to learn and it showed Ruby losing market share. If you put Ruby on Google Trends, you can see it peeking around 2006 and slowly declining since then:

    http://www.google.com/trends/explore...2F06ff5&cmpt=q

    As far as PHP goes, I don't know...it may be that it's popularity is artificially boosted by the mass appeal of PHP based CMS solutions like Wordpress, Drupal and Joomla; but then again, why aren't there equally popular solutions based around Ruby?
    If we're going to bring stats into this. There's a very good explanation as to why Programming in general is declining. If you put PHP, Java, .Net, Ruby they're all decline since 2006. I'm assuming because alot of frameworks, and CMS platforms are out there not much use for straight programming anymore lol
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  14. #14
    SitePoint Addict Shaydez's Avatar
    Join Date
    Jul 2006
    Location
    Boca Raton, Florida
    Posts
    356
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    any how the whole point of my response to this post.. is I'm assuming the person asking about Ruby vs PHP is looking to pick a language. Don't miss lead new developers to pick the least popular language, limiting his chances to get a job.
    Sr. Website Developer and Internet Marketing
    www.CarlosJa.com Note: If anyone
    needs to get ahold of me please feel free to email me through
    my site. Apparently i missed quite a few private messages.

  15. #15
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,116
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    If there was a huge market for Ruby, I'm sure hosting providers would toss Ruby into their hosting packages.
    The only time I use shared hosting anymore is when I work on PHP sites like Wordpress. Ruby, Node, Python projects I've worked on have their own servers(like Amazon EC2) where they control what's installed, shared hosting is irrelevant to me.

    On job security, there will always be opportunity for any skilled/creative programmers who are always learning. There's certainly plenty of high paying jobs for Ruby developers where I am located.

    I feel like the most important aspect of the question may be being missed - the reason I prefer using Ruby and Rails is that it is by far the most enjoyable stack to work with. It makes my job easier and more enjoyable, period.
    Job security and installation is not a problem for me.

  16. #16
    SitePoint Member
    Join Date
    Apr 2014
    Posts
    1
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm currently learning PHP as part of my degree but there are parts I dislike about it. Mainly I find its a messy language, reading it can be a headache for me. I decided to pursue Ruby in my spare time as I really like the idea of it being easy to read, and fun to write.

  17. #17
    SitePoint Addict
    Join Date
    Jul 2014
    Posts
    218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shaydez View Post
    I see this thread kind of smashing PHP..

    I have to jump in here. I dabbled with ROR; and I personally have to say its a joke; who cares if its fun and friendly, and has rainbows and little stupid unicorns helping you with gems.. Ya Ruby has some fans about less than a thousand of them while PHP has over 600,000+ programmers.

    When you bring up bad programming design. That's based on the developer (s) coding. PHP is an extremely powerful object oriented programming landuage; using MVC. Ruby reminds me of other standard frameworks in the PHP community like Zend, CodeIgniter, Yii etc... I even seen developers screw up the MVC structure in those frameworks too.

    There's always a HUGE community of php developers and resources out to help develop applications faster. Ruby so called Gems is same thing as PHP Libraries; there's hundred-thousands of libraries out there for PHP. If someone was going to choose between Ruby(RoR) over PHP consider the job possibilities. There's about 1 of 10,000 jobs posted on different networks (Craigslist, Monster, Careerbuilder, elance, guru) for PHP; maybe just maybe you'll find 1 job posting for a Ruby developer.

    I developed in PHP since 2001. If i was to get into Web Development now... I would consider those facts. PHP obviously is the winner. or .NET a lot of jobs for .NET too.

    If Ruby was so great there would be more demand for it.. and I would be trying my hardest to learn it for job security..
    The reason why Rails reminds you of many of PHP's frameworks is because Ruby has greatly influenced the PHP community - for the better -- over the past few years. And Ruby absolutely is a better designed language than PHP.....although that is a bit unfair, since PHP evolved into what it is from something it never originally intended on being.

    That said, for web development, I'd take PHP over Ruby / Rails any day of the week.

  18. #18
    SitePoint Addict
    Join Date
    Jul 2014
    Posts
    218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LiamG View Post
    I'm currently learning PHP as part of my degree but there are parts I dislike about it. Mainly I find its a messy language, reading it can be a headache for me. I decided to pursue Ruby in my spare time as I really like the idea of it being easy to read, and fun to write.
    Well written PHP is a thing of art. You are the painter, you decide how good it is....that is the double edged sword of a language like PHP that gives you so much freedom

  19. #19
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I would generally argue PHP wasn't designed at all which is half the problem there.

    You don't see ruby (or many things besides PHP) on el cheapo shared hosting for a few reasons. One is that there is probably a free php script for whatever you want to do out there so if you are into cheap things line up. But more important is the memory model -- PHP only consumes memory when the script is executing. This translates into making it possible to put 1000s of low traffic sites on a single host as, given they are low traffic you are probably not talking about 1000s of simultaneous requests. Ruby web apps run in a persistent container that needs to be active and will always consume memory so you need a lot of RAM to serve a lot of low traffic web apps, so much that it makes the $4.95/mo hosting plans uneconomical. Another issue -- though this is largely solved by rvm -- is that ruby has a bit more of a versioning headache than php and some folks will need different, specific versions. Different versions of rubygems also come into play here. In addition, ruby grew up in the age of AWS so you have reasonably economical dedicated options and also services like heroku if you want some management. It is a different ballgame than php.

  20. #20
    SitePoint Addict
    Join Date
    Jul 2014
    Posts
    218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by wwb_99 View Post
    I would generally argue PHP wasn't designed at all which is half the problem there.
    Lol!

    But seriously, cmon now, let's be fair...today's PHP is legit. Granted, I am partial towards it due to my background in C, which also means that I have thicker skin when it comes to crazy conventions or unexpected behavior, but warts and all, PHP is one helluva language. It has much more going for it then just being cheap, easy and ubiquitous...which in and of itself, are very nice virtues to have

  21. #21
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Modern PHP is better than the old days for sure. But I would not call it a hell of a language by any stretch of the measure. The best way I've seen it described is the shell scripting of the web -- horribly ugly, lots of warts but gets the job done.

    Now, I, myself, have started writing my shell scripts in ruby or python as they will get you to the same place and you feel a lot better doing so.

  22. #22
    SitePoint Addict
    Join Date
    Jul 2014
    Posts
    218
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    "shell scripting of the web" isn't too far off, in my opinion. I think "ugly" is very subjective; and kind of irrelevant. Beautiful code to me is when you take a complex task, and when you are done with it, it is easy to follow and read, without thinking "what is this clever fellow doing here?"....has nothing to do with curly brackets vs. indentation and all that jazz.

    PHP sucks as an actual scripting language, in the sense that Python or Ruby are scripting languages, where it is used for many things not web-related. I think it rocks when used for web development though.

  23. #23
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,649
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    So I ended up having to write some samples using "modern" php -- guzzle / phar / etc.

    The good was that phar works as advertised and that is a huge win in and of itself. The bad is that it seems libraries all take loosey-goosey arrays.

    The other ugly part is dealing with so much low level stuff. Granted the standard libraries for other things I spend more time in are far richer but still -- manually sniffing post data and handling url tokenization isn't worth it in 2014.

  24. #24
    SitePoint Addict bronze trophy Hall of Famer's Avatar
    Join Date
    Apr 2013
    Location
    Ithaca
    Posts
    368
    Mentioned
    6 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by arout77 View Post
    "shell scripting of the web" isn't too far off, in my opinion. I think "ugly" is very subjective; and kind of irrelevant. Beautiful code to me is when you take a complex task, and when you are done with it, it is easy to follow and read, without thinking "what is this clever fellow doing here?"....has nothing to do with curly brackets vs. indentation and all that jazz.

    PHP sucks as an actual scripting language, in the sense that Python or Ruby are scripting languages, where it is used for many things not web-related. I think it rocks when used for web development though.
    This... I actually came across an RPG game development software in which each game developer uses Ruby as scripting language, I've also seen Python used as crawler converters for some forums(ie. zetaboards). PHP's usefulness, on the other hand, is pretty much all about web development. I know there was a PHP-gtk project, but doubt how successful it was. I agree that Python and Ruby are much more useful for non web-based applications than PHP.

  25. #25
    SitePoint Addict
    Join Date
    Aug 2013
    Location
    New Zealand
    Posts
    302
    Mentioned
    5 Post(s)
    Tagged
    0 Thread(s)
    I am more the python/Django guy rather than the ruby/rails guy but I do have some things to say about php.

    1. It doesn't matter so much where a language is as far as where its going. I just feel Zend lack direction as a technology company. Granted they are trying to fix the warts of PHP but they still seem to be committed to PHP as a kind of "better" C/C++ language. C/C++ are not the best languages to model after (imho) and yet Zend seems to be hero worshipping those languages for some reason.

    2. Why did they ever bring in traits into the language. I really don't get what purpose that has in a dynamically typed language.

    3. They really need a better system than those half baked references when dealing with PDO calls. Their only purpose seems to be in accommodating C API calls.

    4. PHP is the legacy language of the web. I must admit it does have one advantage (which is arguably a disadvantage) in that software written in PHP is able to install itself. (Like wordpress 5 minute installs). This is probably a major security issue but it does make easy install software to the web.

    Ruby/Rails seems to have lost momentum is the market these days and I don't know if there is much work going on in Ruby outside the web.

    I suspect something in the future will both surplant both PHP and Ruby. Maybe it will be something like javascript which can run both on the browser and the web server but at this stage that is only a guess.

    Sent from my XT316 using Tapatalk 2


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •