Build A Website Using Ruby On Rails That You Can Be Proud Of
My experience with web apps started with ASP and later onto ASP.NET. I found ASP.NET a huge improvement over ASP but after working on a few sites I still found it lacking.
Specifically one thing ASP.NET does not have good support for is nice URLs. I'm sure there are ways to do it but I never found a good solution to removing those ugly .aspx page extensions. Also, the page/form centric model that ASP.NET uses is a bad design for medium to large sites I find. No matter how hard I try I've always found my ASP.NET based sites always becoming a bit of a mess if they take off in size. There were many other problems and things I just didn't like about ASP.NET so about a year and a half ago I began looking for an alternative.
I got interested in working with Ruby on Rails after seeing the original screencast. I'll never forget thinking "who is that crazy danish guy yelling 'whoops' every few minutes as he cranks out features on his demo app?" What impressed me the most was when I spent the time to duplicate what he was doing in the screencast and realized that this guy knew what he wanted when he built the framework. Pretty URLs? Yup. Organized directory structure? Yup. Support for automated tests? Yup. Database persistence layer without a huge amount of setup code needed? Yup. The feature list was just perfect except for one thing...I didn't know Ruby. I had heard of it before but never used it and coming from a C++/C# background it sure looked like Perl to me sometimes.
Luckily though, while Ruby can be as hard to read as Perl it doesn't have to be and if written well can be extremely easy to read. Once you understand blocks you'll be fine. I like to compare understanding blocks to understanding pointers in C/C++. The first time you see them they are odd but once you get the 'aha' everything starts to make sense.
After building a number of Rails sites and working with Ruby for more than a year I have become quite found of the language and the Rails framework had proven itself on a number of production sites in the past. So when it came time to pick a framework for ProductCritic there really wasn't any question that we would use Rails.
That said, there are a number of very good and sometimes overlooked features on Rails that are worthwhile to point out:
- Leverage an experienced web developer. DHH and the Rails Core team have a lot more experience than I do in web development. Using there framework allows me to leverage their experience on my projects.
- Deployment. Capistrano, the deployment tool that works with Rails is amazing for getting your site onto a production server in a safe reproducible manner.
- Free and open. Why pay for something when an equal or better solution exists?
- Fast enough. I've heard lots of stories of Ruby being slow but in all my tests and on all my sites it's never been an issue.
Labels: backend, development, rails, ruby

0 Comments:
Post a Comment
<< Home