SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 51
  1. #26
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'd second Heroku, it's awesome, though it is rather more elegant than most PHP developers may be used to.

    Just tell Heroku about your Git repo, push, and it's live. Within certain limitations it's also free, you only pay when you start to scale, and this is done by dragging sliders. The downside is that the filesystem is read only, so if you're doing image uploads you have to store them in the database, which is actually really no big deal.

    Brightbox is also great. You install a gem and it handles your deployment for you via Capistrano, so for me to deploy now I just type: cap deploy, wait 5 minutes while it uploads the zip, and it's live.

  2. #27
    SitePoint Addict dnordstrom's Avatar
    Join Date
    Jul 2006
    Location
    Amsterdam
    Posts
    337
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    I use Capistrano for deployment and have always managed to get it working with any "regular" hosting provider that supports Ruby/Rails, so I don't see the problem there. I even use Capistrano for multiple-environment and PHP projects such as Magento Commerce sites, with Railsless Deploy.

    Whatever site I'm working on, it's just a matter of setting up the recipe with the right paths and instructions (if any), and:

    "cap deploy"

    With SSH keys in place, no password, no nothing. It just works.

    As for the issue of popularity among developers, and language vs language, just look at the origins of the two. I believe someone wrote something nice a few posts above. Though I like Ruby more than PHP these days, I'm not as much concerned about the programming language as I am with the client's requirements.

    The language is just a more or less important piece of the puzzle so stop obsessing about it and go write your client some good software. I mean it, go talk to your client, go figure stuff out—it's time better spent than sitting here arguing why German is better than French and vice versa.

    EDIT: If you despite what I just said still want to argue (of course you do since you are a human being behind a keyboard), I can argue that if you're a good developer (meaning you are curious), Ruby will simply sooner or later refer to Rails, which refers to many good programming practices you can learn from. You can't really read up on Rails without passing by TDD, DRY and so on. In my experience, more so than the PHP frameworks I've tried, such as CodeIgniter, Symphony2, Zend, Recess etc.

    In the end, what does it matter anyway? Do your thing—do what your boss tells you or what you deep down in that "elitist Mac" heart of yours feel is right. If one language seems to be lagging behind the other, you're still a programmer—if you're good, it will take you a few hours to learn something else. Same goes for frameworks. The world, especially our world as web developers, is changing. If you're any good, you adapt. If you're mediocre, at least stay awake because if you really suck you might just fall asleep behind the wheels and it's game over. It's a metaphor but it happens.
    Daniel Nordstrom. of. Nintera(ctive)
    -- Featured post: Part 2. Writing NI.JS JavaScript
    ----- Follow me on Twitter. Got project? Contact me.
    -------- SitePoint: Community Guidelines Be A Great Member

  3. #28
    Non-Member
    Join Date
    Apr 2004
    Location
    Miami, FL, USA
    Posts
    448
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The simple answer:

    PHP is based on C and uses the pervasive C sytax, which is one of the two predominant syntaxes people learn to program in. Most schools teach Basic syntax languages (Ada, Pascal) for intro to programming classes, and transition students into the more abstract C syntax languages (Java, C, PHP) in more advanced courses.

    Ruby is based on nothing, and uses a proprietary <snip /> syntax that no other language uses. Further, it's unstructured, and flawed in concept, as its flexibility allows too wide a range of coding style to be adopted by any group of people in a uniform way (what this means is that it's impossible for large companies to adopt). PHP is similarly flawed, but is evolving towards organization and structure, whereas Ruby is not.

    Cheers.
    Last edited by SpacePhoenix; Mar 1, 2011 at 13:14. Reason: removed swearing

  4. #29
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by transio View Post
    The simple answer:

    PHP is based on C and uses the pervasive C sytax, which is one of the two predominant syntaxes people learn to program in. Most schools teach Basic syntax languages (Ada, Pascal) for intro to programming classes, and transition students into the more abstract C syntax languages (Java, C, PHP) in more advanced courses.

    Ruby is based on nothing, and uses a proprietary <snip /> syntax that no other language uses. Further, it's unstructured, and flawed in concept, as its flexibility allows too wide a range of coding style to be adopted by any group of people in a uniform way (what this means is that it's impossible for large companies to adopt). PHP is similarly flawed, but is evolving towards organization and structure, whereas Ruby is not.

    Cheers.
    Hmmm, yes, calling methods with -> and string concatenation with .

    I would say Ruby is closer to the C family than PHP. There's really very little in Ruby that's odd or unfamiliar, once you *understand* it.
    Last edited by SpacePhoenix; Mar 1, 2011 at 13:15. Reason: removed quoted swearing

  5. #30
    SitePoint Zealot Dorsey's Avatar
    Join Date
    Feb 2004
    Location
    NJ
    Posts
    103
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Technical issues seldom win the battle. For years, I fought the Oracle vs. Ingres vs. Sybase vs. Informix battles and Oracle came out the clear winner. Was/is it the better RDBMS for technical reasons? Not by a long shot then, and it still isn't. Oracle won the battle through marketing - strategic ad placements, golf outings, "user" conferences, and loading MBA-types with the mantra: "no one ever got fired by recommending Oracle" (paraphrasing the old IBM adage). Projects cost more and took longer, but that only meant that the consulting companies made more profit, and the CTO/CIO could brag to his buddies at the country club how much that new system cost. If it failed, the consultant took the heat.

    Who's going to quote Ruby when a PHP framework takes longer and costs more? The customer won't know and as long as it works, won't care.

  6. #31
    SitePoint Member yesica's Avatar
    Join Date
    Apr 2011
    Location
    Gibraltar
    Posts
    23
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ruby is good one, it is quick and easy.
    But the PHP is an old programming language, everyone knows this that's why it is more popular than Ruby.

  7. #32
    SitePoint Zealot
    Join Date
    Sep 2010
    Location
    Brighton, UK
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by yesica View Post
    Ruby is good one, it is quick and easy.
    But the PHP is an old programming language, everyone knows this that's why it is more popular than Ruby.
    Actually, Ruby turned 18 this year. Horray

  8. #33
    SitePoint Enthusiast barrykins's Avatar
    Join Date
    Feb 2011
    Location
    Virginia Beach, Virginia
    Posts
    47
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by goldfidget View Post
    Actually, Ruby turned 18 this year. Horray
    Well if that is young compared to PHP, How old is PHP?

  9. #34
    SitePoint Guru marcel's Avatar
    Join Date
    Nov 2000
    Posts
    920
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Difficult to install on Windows and Linux.

  10. #35
    SitePoint Member
    Join Date
    Sep 2003
    Location
    Sydney, Australia
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by barrykins View Post
    Well if that is young compared to PHP, How old is PHP?
    PHP 3 was released in June of 98. Prior to this (since 94) there had been PHP/FI & PHP/FI 2.0 but there not really anything like the PHP of today.

    So, in actual fact. Ruby is a little older than PHP.

  11. #36
    SitePoint Addict skunkbad's Avatar
    Join Date
    Apr 2008
    Location
    Temecula, CA
    Posts
    278
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've been using php for 5 or 6 years, and a couple of times tried to figure out how to install ruby on my windows dev machine. Both times was not successful. Ruby needs a one click install like xampp or wampserver, and it would probably be adopted a lot faster. Im still interested in learning ruby, but I feel like I can do everything I want to do with php, so maybe it's just a waste of time? I don't think php is going to go away anytime soon.

  12. #37
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    A quick rehash:

    Age? No, they're about the same age. Ruby is older than PHP, but there were no english language books on it until 2000, and not much interest until a year or two later.

    Syntax? Not, really. Both descend from other languages in their syntax, and are fairly simple to use.

    In a nutshell, the largest reason is mod_php. There was an attempt to get a mod_ruby rolling, but it was always extremely buggy and unreliable. Unlike mod_php, which was far more solid. So anyone writing code for the web in ruby had to settle for fastCGI, which was also buggy and unreliable. In these days of heroku and passenger, though, deploying a ruby app is no more difficult than deploying a php app.

    A secondary issue for it was threading. The standard ruby interpreter didn't really handle threads (in anything other than name only) until 1.9.x, and even now it's not all that useful, as it can only utilize a single core of a multicore processor.

    There is, however, no reason to trap yourself into only using the default ruby interpreter. Unlike PHP, there are several ruby interpreters in play, and jRuby (as well as IronRuby, if memory serves) both are quite capable of using multiple cores. The competition is leading to rapid improvement in all entries to the field.

    MRI (Mats's Ruby Interpreter, the default ruby) just isn't very well designed. 1.9 was a big step forward, but it has a long way to go. I was really looking forward to MagLev's release; coming from the smalltalk world, it had the benefit of long experience solving the issues MRI was facing, and there's not all that big a difference between smalltalk and ruby languages. But it's taken so long to get to alpha, I'm starting to lose patience.

    But these days Ruby is catching up. More and more large sites are coming online using Ruby, even some of my clients who used to tremble in fear if I mentioned the R-word are now open to the idea of using it.

  13. #38
    SitePoint Enthusiast
    Join Date
    Apr 2007
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've done both.

    RoR is a heavy beast. In 2006 I deployed a RoR site on Windows 2003 on IIS 6.0 ( mongrel behind an ISAP_REWRITE reverse proxy - read that as we paid for ISAPI_REWRITE to get that functionality ).

    Ruby was the 1.8 Windows All in one. On the same server I ran a ruby script that would parse an xml file, a mysql database and then output a particular formatted xml file for Adobe Indesign becuase AI had 'special' readability issues like carriage returns etc.

    As for the syntax it is pretty petty to bicker over which one is better. As for rails I think a lot of people misrespresent rails and its conventions. It isn't any easier to maintain a site using its conventions. It isn't any easier to create a site. It is/was only easier for a particular dev or group of dev's to learn the rails convention.

    CodeIgniter is arguably just as easy to work with and maintain. Migrations aren't the cat's meow for many reasons... but the biggest one is legacy code. If you cannot start in the conventions then you soon find out the 'agile' nature of the framework isn't as nice to play with as a start up would find.

    Since they both work best in fast-cgi they also exist in Windows a lot better now especially in Vista/7 with IIS7+

    Ruby also sucks vanilla. Enterprise Ruby or Jruby is where you want it. Ruby's garbage collector is a leaky faucet. In Fast-CGI you better not be using a shared host. In fact, every con of hosting JSP (tomcat/jetty) applies to standard Ruby. IE... you better have a lot of memory.

    Ruby also is best when used with Ruby Version Manager or you might as well start learning 'make' and 'make install' commands. Most ruby fans use Mac's... where things seem to just work. But most of the time they work until you want to so something like memchache integration, certain db connectors etc. Then you have to either use rvm or 'make' just the same. Mac users are liars in full effect most of the time. I develop on my iMac and I have a complete custom environment to do things my Ubuntu dev environment takes for granted.

    So...

    Which is better? Depends on who you work with, want to work with/for and what type of local resources are available to you. Ruby shines in JRuby environments... b/c of java's garbage collector and threading.

    PHP shines just as bright as Ruby and 5.3+ is very hard to beat in terms of speed, support and maintenance.

    PS there are far more reference manuals that are relevant to this day in PHP. I've got 2 Rail books considered the rails bibles... and each revision essentially makes the prior completely useless unless talking about patterns and basic syntax.

  14. #39
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Neither one is more difficult to learn than the other. In fact, both of them are easy if you set your mind to learning them. Vanilla JavaScript is much more confusing and difficult than either PHP or Ruby. The reason there is the illusion that these may be harder than JavaScript is because learning JavaScript was mandatory - you HAD to learn it. If you HAD to learn Ruby or PHP first instead of the very unintuitive, illogical JavaScript; your attitude and outlook toward learning other languages would be far more positive If you're doing this out of necessity (like for your job), choose PHP - because it's more popular and far more widely used. If not, you can't go wrong with either, and it won't be nearly as frustrating as your JavaScript-learning experience. I say dive into either one with confidence; they're both easy to learn (especially with frameworks like Rails out there to walk you through it step by step).

  15. #40
    SitePoint Enthusiast joseninogarcia's Avatar
    Join Date
    Feb 2012
    Location
    Makati, Philippines
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I think Ruby on Rails isn't popular yet, I'm a PHP guy for almost 2 years and I'm having fun on it.

  16. #41
    SitePoint Addict NetNerd85's Avatar
    Join Date
    Aug 2005
    Location
    Australia
    Posts
    298
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I remember a few years ago, oh the shouts of Ruby will replace PHP, was never going to happen. PHP is accessible and very easy to learn and once you do you can easily learn other languages. Not the same story with Ruby, the Rails framework is popular, not the language. Now we have Active Record everywhere else, no need to learn Rails or Ruby.
    a new day, a new beginning
    never follow the crowd, the crowd is poor!

  17. #42
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    @NetNerd85

    It's true. And they're still saying that in the Ruby realm. I never cared, and still don't because PHP has always very good to me, as well as the PHP community. The Ruby and RoR communities however are snooty and condescending (actually it's only the hardcore Ruby and RoR fanboys who are arrogant and self-righteous). It's a shame because they give Ruby a bad name, and it's a great language.

    As far as PHP going anywhere, it's only getting more and more popular as time goes on. The RoR folks consistently trash PHP and it's proponents, as if they are unenlightened, brain-dead primates if they program in PHP. But PHP is a fantastic language, especially when you really study up and realize how much you can accomplish and how powerful it is.

    Most programmers (especially those who put it down) haven't even scratched the surface of discovering what PHP is capable of, and it's development is always growing and improving faster than any other language. PHP is incredibly popular for a reason, and not for the reasons the RoR folks would have you believe. It's popular because it's still the most used, versatile, stable, documented, fastest growing, and all-around best programming language for the web, period!

  18. #43
    SitePoint Member
    Join Date
    May 2011
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You CAN compare Rails with PHP. They are both tools (to use a broader term) to develop web applications. What the commercial is saying is that developing with Rails can save you a lot of headaches PHP would cause. There is nothing wrong with that, considering that a great number of websites/web applications used to be developed with PHP alone, without any additional frameworks.

    So please, stop saying the same thing over and over again.

  19. #44
    SitePoint Member
    Join Date
    Jun 2007
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    RoR is generally better for more complex applications, with more complicated data models. E.g. many startups use RoR. PHP is better when you want to quickly add some programmatic logic to your site.

  20. #45
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,266
    Mentioned
    18 Post(s)
    Tagged
    0 Thread(s)
    When PHP 3 rolled out, it was a pretty terrible language. No OOP to speak of; hundreds of functions in the global namespace; inconsistent naming; registered globals; magic quotes; mixing logic with presentation; bad or no multibyte characters; strange type coercion; and probably many more issues I've since forgotten about. BUT... it was super easy for people with no programming background. They could build contact forms, blogs, forums, etc., with little knowledge of security issues and no knowledge of design patterns. (If you can, take a look at vBulletin's 3.x code, and be ready with a barf bag. WordPress 2.x is also pretty sickening under the hood.) I think the most significant factor in PHP's rise to fame was its appeal to the large population of aspiring non-programmers.

    Today, PHP is a lot better. Now we can write code that is Java-esque. Ruby, I'm sure, is also a good and fully featured programming language, but I think it's going to remain a minority language for two reasons: PHP already has a strong foothold, and because Ruby's syntax tends to look foreign to people accustomed to C-style syntax.

  21. #46
    SitePoint Zealot
    Join Date
    Feb 2003
    Location
    Akron, OH, USA
    Posts
    102
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Jeff Mott View Post
    When PHP 3 rolled out, it was a pretty terrible language. No OOP to speak of; hundreds of functions in the global namespace; inconsistent naming; registered globals; magic quotes; mixing logic with presentation; bad or no multibyte characters; strange type coercion; and probably many more issues I've since forgotten about. BUT... it was super easy for people with no programming background. They could build contact forms, blogs, forums, etc., with little knowledge of security issues and no knowledge of design patterns. (If you can, take a look at vBulletin's 3.x code, and be ready with a barf bag. WordPress 2.x is also pretty sickening under the hood.) I think the most significant factor in PHP's rise to fame was its appeal to the large population of aspiring non-programmers.

    Today, PHP is a lot better. Now we can write code that is Java-esque. Ruby, I'm sure, is also a good and fully featured programming language, but I think it's going to remain a minority language for two reasons: PHP already has a strong foothold, and because Ruby's syntax tends to look foreign to people accustomed to C-style syntax.

    This is probably the BEST post in this entire thread. Well said.

  22. #47
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Today, PHP is a lot better. Now we can write code that is Java-esque. Ruby, I'm sure, is also a good and fully featured programming language, but I think it's going to remain a minority language for two reasons: PHP already has a strong foothold, and because Ruby's syntax tends to look foreign to people accustomed to C-style syntax.
    Agreed. It's a lot better today in 2012. The OOP side of PHP is fantastic. Most programmers are afraid of change and do not want to leave their comfort zone. They don't have the interest (or time) to learn something new. This is why they continue to exclusively use the procedural side of PHP. They will dabble in OOP PHP, and insist it is overkill, and return to procedural programming. This is because they only "dabble."
    Many who refer to PHP as being antiquated and messy only know about the procedural side of PHP, or what little OOP PHP they know is due to using a Framework. However, I urge people to not just dabble, but seriously learn and master the Object-Oriented side of PHP (not just minimally, like when using a Framework). I think most would have a totally new appreciation for PHP, not to mention that the future of OOP PHP is very bright indeed. PHP will always be dominant. Ruby has had just as many years as PHP to ripen, but it never does (it's just as old as PHP). People have been saying it's the way of the future year after year, but it's never gone anywhere, and it never will (maybe because the Ruby and RoR community is ..... well, never mind - you reap what you sow). PHP is the future, especially Object-Oriented PHP - and it's getting better and better at an exponential rate.

  23. #48
    SitePoint Enthusiast joseninogarcia's Avatar
    Join Date
    Feb 2012
    Location
    Makati, Philippines
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This means that many people are using PHP....

  24. #49
    SitePoint Member
    Join Date
    Feb 2012
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    90% of the web uses PHP. By comparison, only 2% use Ruby (actual Ruby stat). I just wanted to encourage people to try/use the Object Oriented side of PHP because it is fantastic. Anyway, if you are trying to decide which language to learn - from a practical, financial, and productive point of view, PHP is the language you want.

  25. #50
    SitePoint Enthusiast joseninogarcia's Avatar
    Join Date
    Feb 2012
    Location
    Makati, Philippines
    Posts
    55
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Do you have any manuals on OOP on the PHP? I'd like to learn more about that....


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
  •