Archive for the 'ruby on rails' Category

Published by Fabian on 16 Apr 2008

Response to Andy Jeffries: Why Ruby is better than symfony

Dear Andy,

I read your blog about symfony and that you now switched to Ruby on Rails. You claim to work with symfony, but I cannot understand how you then can come up with those 20 things that Ruby handles better than symfony. Perhaps you made some up to complete your list of 20? Or you just don’t know?

Yes I am biased to symfony, but I am not advocating the one or the other here.

So here my remarks to each of your points:

  1. If you think that Propel is inferior to AR, thats fine with me. Btw there is a doctrine replacement for symfony available.
  2. Also matter of taste, I think both do a good job here, and neither is perfect :-)
  3. You miss to mention that symfony also has an integrated test system and fixtures. I wonder how you could miss the entire chapter about testing in the symfony book.
  4. Propel has Behaviours, and there are tons of readymade plugins out there for that purpose.
  5. the built in webserver is unique to RubyOnRails. In my personal opinion thats unneded but helps with prototyping.
  6. Well thats php not symfony. If ruby is better thats fine.
  7. Yeah big big minus for symfony. Luckily there are a few guys that started working on this in plugins.
  8. It sounds like that you think symfony has got no environments? it has.
  9. PHP hasn’t, but symfony has a database session store, cool eh?
  10. Symfony hasn’t too much support for webservices built in. sad but true.
  11. Thats a nice feature. I think thats on the roadmap for sf1.1.
  12. You can do custom tasks in symfony. 1.1 has even the same syntax.
  13. Deployment is cool? symfony also has something there. I never used it because I think that deployment is a more controlled process rather than a developer executing a task. What I saw from the symfony one it also was not too powerful.
  14. I thought RoR has an own server :-)
  15. Well you can write easy filters in symfony 1.0. Fabien changed the filter system for 1.1. I am not sure if i will like it.
  16. No interactive debugging in symfony. I think its a PHP issue but actually it is an issue.
  17. Cron isn’t supported in symfony. But you can designate some scripts as batch scripts.
  18. Profiling is nice. I have to have a look at it!
  19. Flash
  20. Again a whole chapter that you seem to have missed in symfony. I personally find caching a very good part in symfony. It is fast and very easy to use.

Wrapping it up, I can notice that you missed your target of listing what is better in Ruby on Rails than in symfony:

there are some things that make it less than perfect when compared with something like Rails

In 8 out of 20 of your points you were just unaware of the features of symfony. I cannot believe that you claim to develop in symfony but haven’t read the great documentation. The whole book is online and free.

Other aspects of both, symfony and Ruby on Rails, I personally dislike: developer and process tools, such as crons, deployment, servers etc do not belong into a web application framework. It should be inside the development process. Perhaps even bundled with an IDE, bug tracker, or SCM tool. But not in the “language” itself.

But since you are so happy about RoR, I am very excited, because I will try it also myself.
In essence I think that symfony and Ruby on Rails are very similar. The major difference is the language. I think.

Published by Fabian on 11 Apr 2008

Rubies are girls best friends?

I resisted for a long time, but there is a talk coming up in the Düsseldorf Java User Group about JRuby, so I really want to get to know what this Ruby thing is all about. Up to now I thought that PHP is good enough to be complement for Java for low scale projects and prototype, but however, we need software that is able to be integrated. I was not so successfully getting a Java<->PHP Integration running, so perhaps this can be done with Ruby?

Let me quickly take you along with my Getting Started experience:

  1. Google for “Ruby on Rails getting started”
  2. From

    http://wiki.rubyonrails.org/rails/pages/GettingStartedWithRails

    got to

    http://wiki.rubyonrails.com/rails/pages/RailsOnWindows

    A bit lost there but found a nice installer on

    http://bitnami.org/stack/rubystack

  3. Install the stack, wait for 30 Minutes until Ruby has extracted thousands of yaml files.
  4. The stack pretended to have a demo application ready on port 3000, but this was not configured.
    Also the Ruby on Rails wiki pages were not very helpful on how to finalize this last setup step.
    I found a README in the application directory. That one told me to invoke script/server…
    Well.. I tried. Windows said: command or file not found.
    The file itself has:
    #!/usr/bin/env ruby
    How is that supposed to work on Windows?
    Even creating an new project with “rails” command which was found in path correctly does produce unix shell scripts…
    Ah!

    http://wiki.rubyonrails.com/rails/pages/ShebangChangeScripts

    ruby -i.bak -pe 'gsub!("#!/usr/local/bin/ruby", "#!c:/ruby/bin/ruby")' public/dispatch.* script/*

    and now? The command did not succeed, even after fixing the permission errors, because the script tries to modify folders and the path being incorrect, its still a unix shell script.. not a windows command script. Though not working.

  5. okay, I was bold and tried invoking “ruby script/server” and surprise that did work! And even the application was running.

90 Minutes for getting the welcome screen of a ruby app under windows. not very impressive. Lets hope application development is more convenient.

Lets see how my Ruby experiments will go on. I better open a new category for it.