Not signed in (Sign In)

SkillShare - A place to discuss Web Standards and Web Design topics

Categories

Vanilla 1.1.5a is a product of Lussumo. More Information: Documentation, Community Support.

    • CommentAuthorvarland
    • CommentTimeApr 24th 2007
     permalink
    I do most of my development in Rails, and I'm trying to convert an app I wrote in Rails to PHP because PHP runs so much faster on my client's shared hosting account at Dreamhost. There's a function in Rails that allows you to automatically output the output of a block by using "<%= … %>" instead of "<% … %>". Is there anything like this for PHP? I know I can do "<?php echo … ?>", but it just isn't nearly as elegant.
    • CommentAuthorMatt
    • CommentTimeApr 24th 2007
     permalink
    Yep, because PHP is awesome.

    http://us.php.net/manual/en/function.echo.php

    I have <?=$foo?> foo.
    • CommentAuthorvarland
    • CommentTimeApr 24th 2007
     permalink
    I just found that. I still hate PHP (compared to Rails), but I just can't accept the performance hit, and my client can't accept the financial hit good Rails hosting costs.
  1.  permalink
    Actually there is a way to make rails run faster on Dreamhost. If I can find it I will post the solution.
    • CommentAuthorvarland
    • CommentTimeApr 24th 2007
     permalink
    I'd really appreciate it. I know that Rails will probably never be as fast as some other languages, but it's so much more fun to develop with. I've tried a lot of the PHP frameworks, but they all seem like poorly executed copies of Rails. Most of them admit it, saying that they're trying to capture the best practice design ideas present in Rails but with PHP. I think it's a case where the copies aren't nearly as good as the original.
    • CommentAuthorMatt
    • CommentTimeApr 25th 2007
     permalink
    I doubt I will get into the whole rails thing, creating PHP application creation goes fast without any frameworks in my opinion... and the execution is insane, I forgot what server I crashed back in my blackhat days, but I got a PHP script to add/delete 1million files in a loop and it took less than 5 seconds for the script to run one cycle (this was a good 5 years ago at least).
  2.  permalink
    In order to improve Rails speed put ENV['RAILS_ENV'] ||= 'production' into config/environment.rb. This is a quick way to improve the overall performace.
    • CommentAuthorvarland
    • CommentTimeApr 26th 2007
     permalink
    I appreciate the effort, muffinsincream, but that doesn't help nearly enough. Dreamhost still sucks for Rails hosting (on their shared plans, at least). I recently tried hosting a Rails app on a shared TextDrive account (the cheapest one they offer), and it's many times faster than the Dreamhost-hosted app. I think I'll stay there from now on.
  3.  permalink
    OK, I wasn't sure how much it would help. TextDrive will always have better Rails hosting because it is the official webhost of Rails.
    • CommentAuthorvarland
    • CommentTimeApr 26th 2007
     permalink
    I figured that, but hadn't tried it. I tried hosting Rails on a MediaTemple GridServer account a while ago, and it sucked, too, even though it advertised a bunch of features that should have made it well suited to Rails hosting. I guess I'll just stick to TextDrive from now on, and I'll definitely abandon my Rails to PHP conversion.
  4.  permalink
    I agree with you completely, but I have used Media Temple's Grid Server, and it is really slow for Rails and PHP aswell. I would not recommend using them. A Small Orange has great PHP performance, but I cannot comment on their Rails performance.
Add your comments
    Username Password
  • Format comments as (Help)