Friday, May 4, 2012

My week of Sproutcore and Netbeans

After running around with knockout, I decided to try out sproutcore for a week. The first task was getting it installed. My dev maching is running the lastest from Ubuntu (I think its 12.04 LTS). My install experience wasn't exactly pleasant. I followed the Sproutcore's install guide to the letter and it resulted is a dozen or so of can't compiles and missing libs - I did fix the errors eventually.

With my Sproutcore running, I started following the tutorials and by the "TodosThree" part I was writing a fair amount of JavaScript. I need an IDE for this work - Netbeans.

Sproutcore and Netbeans

Netbeans doesn't officially support Sproutcore but that isn't really a problem. Sproutcore is like 95% JavaScript and Netbeans has excellent JavaScript support. It's just a matter of "creative" use of Netbeans. The trick is to create a "PHP Application with Existing Source" and point it to your Sproutcore project folder. Here's the procedure:

  1. New Project > PHP Application with Existing Source
  2. Sources Folder should point to your Sproutcore project folder (not the apps folder)
  3. Change the Project URL to https://localhost:4020 also remove the index file
  4. And your done!
As for the rest like running the "sproutcore gen app" commands. You'll have to run that outside Netbeans and on the terminal. Its not really a big deal. 

BTW, code intellesense amazingly also works, I didn't expect it to work but it does. BONUS!