Just launched my rebuild of my website. It's a dynasty manager, tracks all the stats from playing dynasty mode in EASports NCAA football series. Originally the site was PHP and I had used Mojavi to build it. Great at the time but once it became clear that Mojavi was mired down in development and I began to find it's shortcomings, then I was disappointed in having commited all my time to using it to build the site. Considered refactoring the site to Symfony. I think those guys are on the right track. But in the end decided to learn Ruby and Rails and after 6 months, a full time job, a 5 month old son and lots of late nights I finally finished the thing. I don't think even with refactoring to Symfony I could have done it that quickly with the time constraints I'm under without using Rails.
Couple things that I really learned to love about the Rails framework:
1) Unit testing built in.
This has been so helpful. The site is still buggy because I was rushing things at times and I'm the only developer but without unit testing it would probably really be a mess. I don't have 100%, or even 90% but what I do have has made it much easier to fix things and know if I have broken something important instead of rolling out a fix that broke one of the main functions of the site but I never checked it. My only complaint is that I'm having issues running rake test as opposed to just using "ruby test/functional/blah_controller_test.rb". I get errors with "rake test" that I think have to do with fixtures that I don't get using just ruby command with the test file.
2) AJAX support and RJS templates
Both make it so much easier to do some cool and interesting stuff with the UI. This is an area I could probably do more with and the whole site could use some refactoring to make using RJS templates in particular more consistant so that things like confirmation messages on CRUD actions are more consistant.
Other than that it has been an interesting experience learning both Ruby and Rails. I look at the code I first wrote 6 months ago and I see how I was still writing code like I would if I was using PHP and it's fun to rewrite it in a more Rubyish and Rails way.
I guess another complaint I would have is that it doesn't seem like the View/Template system is as DRY is it should considering that's one of the driving principles of the framework. I have looked and looked for explanations and information on how this could be done better but have come up dry so to speak. This comes into play largely with a lot of the views for the data I'm displaying. For instance, if I'm displaying a players ratings from the game I want to be able to use one template file to display the form and the non-form view. I wrote my own helper to do this but I don't think it's the best written thing for the job. It seems like this would be a more common situation and it would have been solved in a Rails way but so far I've had no luck finding anything.
Finally, I'm using Apache/mongrel_cluster to serve the app as described here. So far it seems to running well. Still probably need to do some performance testing to see how it would stand up to heavy use but I don't forsee the app really getting heavy traffic. Probably won't even get moderate traffic since it's for a niche group.
That's about all I have. Just thought I'd share my experience and thoughts now that my first RoR site is launched.






Bookmarks