in

 

Jimmy Bogard

Assistant to the assistant to the regional manager

Rails notes, from the .NET side

I'm starting a small experiment to try out Rails, and I'm keeping notes as I go.  From the first day, here's what I have so far:

  • Rails easy to install
    • First MySQL (easy)
    • Ruby, another MSI and go
    • Rails - from gem
    • All easy to install, basically a one-click installer for all
  • gem installer is crazy nuts
  • Don't forget to actually start the MySQL service (duh)
  • rake is also nuts
    • rake db:migrate is my friend
  • The generators trump ridiculous wizards any day of the week
    • We as .NET developers seem to be rather infatuated with projects and wizards
  • Ridiculous how little code is needed
  • The Rails console script is nice to try things out (it's an interactive Ruby session)
  • I can't tell when I need to restart the console to pick up changes

On that last point, it's unbelievably ridiculous how little code is needed.  When using Active Record, I don't have to create properties and business as I would with any other ORM.  This comes from the ingenuity of Rails, combined with the power of Ruby.  Literally, an Active Record class could be just two lines of code, with as many properties as you wanted.

  • Convention over configuration, or "the Rails way", took exactly 5 minutes to accept
  • e is a nice text editor, which I need to remember to pay for someday
  • I need to find a good color template for e
  • Remember when using e, to set the tab size to 2, and use soft tabs
  • I'm surprised how little I care that I'm not in VS when developing in Rails

I'm pretty much primarily using VS right now for a handful of features:

  • Compile, run, debug
  • Host ReSharper, TD.NET and VisualSVN (thanks Jeremy for reminding me on the last two)
  • An explorer-ish window to see my files

I got rid of all the other items quite a while back.  I don't use the Toolbox window, the Server explorer, or the designer (the biggest waste).

I'm not trading my career for a Rails path, not by a long shot, but I'm really curious to see what other communities have come up with.  More soon...

Published Aug 04 2008, 10:09 PM by bogardj
Filed under:

Comments

 

Joey Beninghove said:

Yeah, it can become addicting.  I was in your shoes about a year ago when I first started playing with Ruby (and of course Rails).  Unfortunately I haven't had a chance to do much with it in a while, so I'll be interested to read more about your experiences.

I really like "e" as well (bought it) and it's what I use now as my "default" text editor instead of Notepad++.  For themes, I like the Vibrant Ink theme 'cause it's the closest match to the Vibrant Ink-esque theme I created for VS.

Anyway, Happy Coding!

August 4, 2008 10:37 PM
 

Garo Yeriazarian said:

I just started to look at Rails today too.  Another decent editor / IDE for Ruby and Rails is Aptana (http://www.aptana.com).  It puts some GUI on top of some of the Rails functions to "help".  It's a good starting point to get your feet wet, but more experienced Railsers may find the command line / bare bones editor more efficient.

The only thing that really bugs me is figuring out where to find the rest of the methods / properties that are accessible at a particular context.  It's not directly evident what context you are in, it seems there's a lot of voodoo at work in there.

August 5, 2008 1:40 AM
 

Ben Scheirman said:

TextMate themes work natively in E, so you can check out some good ones here:

wiki.macromates.com/.../UserSubmittedThemes

I'm partial to why's (poignant) theme.

August 5, 2008 7:15 AM
 

Jeremy Jarrell said:

Regarding e themes, I'm a big fan of EspressoLibre which comes out of the box with the app.

-jeremy

August 5, 2008 7:33 AM
 

Joe Fiorini said:

Rails is extremely addicting.  It's completely changed me thinking on the need for an IDE.  The project structure is so simple.  It's also made me grow to loathe XML configuration files.  Being able to set config options through Ruby code rocks.  Hope you have fun with it!  I know I have.

August 5, 2008 8:01 AM
 

Dew Drop - August 5, 2008 | Alvin Ashcraft's Morning Dew said:

Pingback from  Dew Drop - August 5, 2008 | Alvin Ashcraft's Morning Dew

August 5, 2008 8:04 AM
 

zack said:

Regarding the console picking up changes?

>>>reload!

Should do what you want. I don't know how I ever lived without an interactive console before. So sweet.

August 5, 2008 9:19 AM
 

terry said:

On *nix, rubygems is great. It works almost always without a hassle (except for stuff like imagemagick).

On Windows, I've seen a much bigger deviation. A few guys who know how to use Cygwin and have their environments all set up don't have any trouble with it, whereas people who rely more on ghetto cmd can't install some gems (like rfacebook or twitter4r, for example).

You might have skirted those issues already by having the whole MS stack installed, but I'll be curious how things go as you start tinkering with more gems.

And if you think rake is cool, wait til you play with cap.

August 5, 2008 9:45 AM
 

Loc Nguyen said:

I'm a Java guy who's been on and off with Rails the last two years. I share the same sentiments about how little work is needed to accomplish some task. It's really incredible. I don't know if I'll be changing my career track in the Ruby direction anytime soon, but RoR has shown me a different perspective. I think that's important for us developers - to always be learning how others are doing something and integrating the positives of the "other side".

August 5, 2008 11:18 AM
 

bogardj said:

@Garo

I used Aptana at first, and I'll probably go back, but I wanted to make sure I knew what was going on underneath.   Aptana is pretty nice.

@Jeremy, Ben

Thanks, I finally found the themes.  I'm trying Vibrant Ink for now, we'll see how it goes.

August 5, 2008 12:46 PM
 

bogardj said:

@Zack

Yes. that's what I was looking for, I was doing the quit/restart dance.

August 5, 2008 12:48 PM
 

Joe Ocampo said:

Once you get into an RSpec rhythm make sure to start using AutoTest.  It makes the experience very enjoyable from a BDD perspective.

1. Install ZenTest

     --  gem install zentest

2. Install diff-lcs

     --  gem install zentest diff-lcs

3. Install RSpec Autotest

Without subversion -- ruby script/plugin install

svn.caldersphere.net/.../rspec_autotest

With subversion -- ruby script/plugin install -x

svn.caldersphere.net/.../rspec_autotest

August 5, 2008 6:28 PM
 

Isaiah said:

Yeh Rails is an awesome framework, it leverages all the power that come with a dynamic language. If your really curious to see what other communities have come up with, you may want to check out www.seaside.st its an awesome web framework build on smalltalk, which take a radically different approach to RoR. GemStone/s www.seaside.gemstone.com provides a very scalable Seaside implementation

August 6, 2008 11:18 AM
 

Matt Scully said:

I know you're content without an IDE, but you may consider checking out Netbeans' support of Ruby.  Yes, Netbeans was primarily a Java IDE, but it added support for Ruby last year (both the C version and JRuby) and I believe it is doing well.  

If you're interested, you can view some demos here:

www.netbeans.org/.../ruby

and read a feature comparison review here:

tnlessone.wordpress.com/.../ruby-rails-ide-comparison-idea-netbeans-radrails

August 11, 2008 6:43 PM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About bogardj

I'm a senior consultant with Headspring Systems in Austin, TX. My focus is using .NET technologies together with Agile methodologies. Back in 2005, I drank the Agile punch and haven't looked at a waterfall the same since.
Copyright Los Techies 2007. All rights reserved.
Powered by Community Server (Commercial Edition), by Telligent Systems