SitePoint Sponsor

User Tag List

Results 1 to 10 of 10
  1. #1
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Makng Tansition from PHP to Rails

    Hi there,

    I am quite an experienced PHP developer but I am thinking about developing a MVC application but using rails instead not only for another string to my bow but also for a change. The application is quite challenging and mainly deals with delivering YouTube content through the YT API.

    I was wondering if this is a wise move in that the learning curve from PHP to Rails may be too intense, could you please advise me if this is so and also tell me a liittle bit about the dis/advantages of using Rails as opposed to existing PHP based frameworks like ZEND and CodeIgniter?

    tHX
    "Persistence is the path to perfection"

  2. #2
    SitePoint Wizard bronze trophy Jeff Mott's Avatar
    Join Date
    Jul 2009
    Posts
    1,246
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    I guess it depends on what kind of deadline you have. If this is a project just for yourself, then by all means, take the time to learn Ruby and RoR. But if this is a project for a client with a hard deadline, then I think you should use what you're familiar with.

  3. #3
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    What Jeff said, never accept work on a timeline if you're unfamiliar with the tooling.
    Yes, you should learn Rails, because you'll love it.

    I was wondering if this is a wise move in that the learning curve from PHP to Rails may be too intense, could you please advise me if this is so and also tell me a little bit about the dis/advantages of using Rails as opposed to existing PHP based frameworks like ZEND and CodeIgniter?
    I'm unfamiliar with php frameworks.

    A few advantages are:
    - It's easier. The conventions make a lot of sense so things just work. Encourages simple elegant code.
    - very active community, gems provide packages for almost everything you want to do on the web
    - PHP's OO model was an afterthought and it shows, Ruby is a beautiful language.
    - programmer happiness

  4. #4
    Avid Logophile silver trophy
    ParkinT's Avatar
    Join Date
    May 2006
    Location
    Central Florida
    Posts
    2,330
    Mentioned
    191 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by markbrown4 View Post

    A few advantages are:
    - It's easier. The conventions make a lot of sense so things just work. Encourages simple elegant code.
    - very active community, gems provide packages for almost everything you want to do on the web
    - PHP's OO model was an afterthought and it shows, Ruby is a beautiful language.
    - programmer happiness
    And, don't forget, Geeky Coolness. Ruby & Rails is one of the "hot topics" and still growing.
    Don't be yourself. Be someone a little nicer. -Mignon McLaughlin, journalist and author (1913-1983)


    Git is for EVERYONE
    Literally, the best app for readers.
    Make Your P@ssw0rd Secure
    Leveraging SubDomains

  5. #5
    SitePoint Zealot bronze trophy
    Join Date
    Jan 2012
    Posts
    116
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    I recommend this book if you're a php programmer interested in trying rails: http://www.amazon.com/Rails-PHP-Deve.../dp/1934356042

    It has a lot of language specifically geared towards the php developer, and it explains a lot of concepts using parallels in the php world. It also comes with all the requisite "ruby fanboy" jargon. You know. The usual stuff like "looking at ruby code is like beholding a breathtaking sunset" or "writing in ruby is like composing a sonnet." Along with a whole bunch of other dorky metaphors they love to throw around. You'll be a drooling fanboy in no time!

  6. #6
    SitePoint Evangelist silversurfer5150's Avatar
    Join Date
    Aug 2010
    Posts
    534
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thanks I will definitely check that out
    "Persistence is the path to perfection"

  7. #7
    Non-Member
    Join Date
    Oct 2007
    Posts
    363
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    I'm an experienced php dev of 6 years now. I've spent a lot of time learning different frameworks in PHP and learning how to write neat OOP code using design patterns and unit testing.

    All well and good, but the amount of horrible code I still inherit drives me mad! I've decided to take a look at Ruby now myself.

    One resource I've just found is called Ruby Koans - the idea is that you start with a bunch of failing unit tests and have to fix each issue while learning the Ruby language. I thought this was a brilliant idea, so I'm looking at this now. Might have a skim read of a book first and then go through these.

    I'm hoping Ruby is all it's hyped up to be. I am so tired of inheriting awful php code.

  8. #8
    SitePoint Addict
    Join Date
    Feb 2007
    Posts
    270
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by aaarrrggh View Post
    I'm hoping Ruby is all it's hyped up to be. I am so tired of inheriting awful php code.
    So you want to inherit awful ruby code instead? ;{>}

    That's only half flippant. As the number of ruby coders grows, the total amount of awful ruby is growing as well; it has to, it's a law of the universe. I make this point because inheriting bad code is what you're going to be doing, no matter what language platform you're on. It's part of the job.

  9. #9
    SitePoint Wizard bronze trophy
    Join Date
    Jul 2006
    Location
    Augusta, Georgia, United States
    Posts
    4,147
    Mentioned
    16 Post(s)
    Tagged
    3 Thread(s)
    In my opinion it seems like a significant amount of PHP development involves using others god awful tools. It is more about being able to install, configure and customize existing solutions than ground up development. Honestly, that is one of reasons I'm beginning to learn ruby and rails. I'm becoming sick and tired of the PHP market being saturated by things such as Wordpress, Drupal, Magento, etc. I've always enjoyed building things myself and those types of tools while they have their place I'm getting quite sick of dealing with them. Not to mention every PHP MVC framework out there is a pile of crap when compared to the grand daddy of them all – rails. Besides it is always good to expand your horizon.

    I've been using PHP now for about 5 years and to be quit frank am getting a little sick of it. From the *types of projects to inherit lack of quality associated with many things I see developed in it. Mostly though I don't really think there is a future for PHP outside of the types of projects which were previously listed. I enjoy building things and programming – not configuring stupid content management systems and dealing with poorly built products. Someone else might have a different perspective but it seems like the asp, rails and python market provides much more opportunity to create custom software. That is what the technologies are geared toward. So if you are merely looking to push out simple, budget sites than PHP has more opportunity for that with all the open source cms's available. There just doesn't seem to be much custom development going on with PHP considering all the open source things available.

    The most painful part of ruby and rials though so far is really setting it all up. I'm on mac os x 10.6 and it has been a painful process to install the most recent version of ruby and rails. Nothing I couldn't figure out but I ran into several issues which required looking up over the internet to problem solve. However, once the environment was set-up everything seemed to flow smoothly. If you familiar with C, Java, PHP, Python, etc learning the basics of ruby doesn't seem to be that difficult. If familiar with any PHP based MVC framework than using rails is very similar – only more elegant and intuitive. At least that is my impression after having used CakePHP, CodeIgnitor and Symfony 2.
    The only code I hate more than my own is everyone else's.

  10. #10
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,108
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    There's three other big reasons why Rails apps are less awful.

    The Ruby community has the biggest focus on testing of any language I know of.
    The Ruby language itself was designed to make programmers happy.
    Rails was designed to make programmers happy.

    All of the Ruby developers I've worked with they are constantly seeking to write more elegant code.

    The most painful part of ruby and rials though so far is really setting it all up. I'm on mac os x 10.6 and it has been a painful process to install the most recent version of ruby and rails. Nothing I couldn't figure out but I ran into several issues which required looking up over the internet to problem solve.
    There will be a simple installer in the future.
    http://www.kickstarter.com/projects/1397300529/railsapp

    I've installed the stack about six times now and found I learned quite a bit about the environment in the process.


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
  •