HAML and NetBeans IDE

I've recently blogged about NetBeans IDE and how it is a great tool for Ruby on Rails development. So, I expected everything to simply work out of the box when it comes to Rails (it probably also does so for Java, HTML, CSS, and many other technologies NetBeans claims to support). Well, recently, I've stumbled upon something that doesn't quite work out of box.

UPDATE Below, you will see a reference to Akita on Rails screencast. Well, it was a long time ago when I saw it, and I thought it was talking about the make_resourceful plugin, but it is actually not talking about it. It does more or less the same thing, but it's a different plugin.

I've seen something very neat in one of the Akita on Rails screencasts (interesting accent, and very infromative), as well as in Ryan Bates' make_resourceful screencast on . It's a make_resourceful plugin for Ruby on Rails. What it does is simply cleans up the controllers of all the RESTful actions (total of 7) and replaces them with a simple and very customizable make_resourceful directive.

I haven't used it extensively yet (just downloaded it), but I've noticed it has its own generator. It's called resourceful_scaffold. What it does is the same as the deafault Rails scaffold generator, but it uses make_resourceful instead of generating code for default controller actions (7 methods). Not only that, it also generates views that are written in HAML. Now here's where I hit the wall.

First of all, what is HAML anyway?! On HAML website I found this:

Haml takes your gross, ugly templates and replaces them with veritable Haiku.

So, it does look a bit like poetry mode in Ruby, where all punctuation is missing. It does look like it can save a lot of typing, too. And it also looks like something I should learn as soon as possible to give some hope to my aching fingers. But it's also a bit scarry because I've barely managed to build my confort zone around ERB and its Ruby-inside-HTML style of familiarity mix.

Well, while I'm at learning the HAML magick, you may want to take a look at the HAML syntax highlighting plugin for NetBeans IDE. You didn't think NetBeans couldn't handle HAML, did you?

HAML highlighting in NetBeans IDE
HAML highlighting in NetBeans IDE

I'm still struggling to feel HAML, but at least I can see the color-coded version now.

just my 2 cents

Personally used netbeans for a while to write ruby + haml
yes, it is a good for ruby, and has haml syntax coloring
but, as long as haml is tab sensitive, netbeans lacks such powerfull feature like Identation Guides
these vertical dotted lines helps a lot
and i found them in Komodo Edit
of course there are an haml plugin for Komodo Edit, but it does not actually works for me
even with no syntax coloring for haml, i switched to KE, cause it is die hard to write haml without Identation Guides
for ruby code i use eclipse

Haven't seen Komodo yet

Thanks for the tip. For those of you interested in Komodo Edit, it's available at ActiveState (link). It is released under Mozilla Public License, LGPL, and GPL.

It's commercial, though.

I myself am no longer using an IDE. Since I started using Django, IDE's been totally unnecessary. Unlike Rails, Django project start with minimal set of files and just one folder, so it is not necessary to have all that file management, snap-open, and similar stuff in my editor. So I use Vim.

As you might know, it is very easy to keep track of indentation in Python, because Python code MUST use indentation, so I don't even need vertical guides. ;)

Eyedeal

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Post new comment

The content of this field is kept private and will not be shown publicly.

Powered by Drupal - Design by artinet