Playing with Temboo, Cloud9 and Brackets.

Cloud9 appears to be hosted on Red Hat's OpenShift PaaS.

Setting up Github was fairly straightforward, once I created my Cloud9 account and logged in it presented me with options to connect to Bitbucket and Github.


 I clicked on 'Activate', was asked for my Github credentials and my repos appeared on my dashboard automagically. All you have to do then is to click on your project name and click on 'Clone to edit' button to get started.




I followed the Hello World example from Cloud9 to make sure that Node worked. It worked the first time. It really is surprisingly functional and I was even flummoxed by its simplicity (I hunted around for a couple of seconds for a 'Save' icon before I realised that the key-bindings worked).


You're given a choice a choice of even-numbered Node versions to use -



Then I went about trying to figure out how to get add-ins and how to install the Temboo Node libs. You have a fully functional console (you can spawn multiple console sessions). I installed a couple of add-ins to try out npm.


I had already downloaded the Temboo libs and uploading them was just a matter of right-clicking the node_modules and selecting 'Upload to this folder' to get the files up there. FYI Drag and Drop doesn't actually work. It probably would have been smarter to npm install temboo, though (-:


I then set about hacking Temboo's 'Getting Started' code. I put together a quick and dirty REST'ish service that displays the full payload from Google in JSON. The code is essentially a mashup of the Temboo example and the Adobe Brackets example. You can see the results on Github.



Temboo is a really exciting idea. I was able to get everything up and running in a few minutes (admittedly I wasn't doing much, but still). It's simple and predictable. They also offer some interesting possibilities for hardware hacks. Here are a couple of examples from my favourite hardware hacker, Lady Ada's site of things you can do with Temboo and Arduino.

Temboo's  documentation is good too and they have some interesting utilities and API mashups, that might be good material for a neo4j experiment.

I ran everything from Cloud9 (I thought I'd have to get an account on Heroku or AWS to test the code but was surprised to find just how much you can do). There were a few annoying things about using Cloud9. The biggest of which is that the console becomes unresponsive if it's inactive for more than a few minutes. Going into the 'View' menu and spawning a new console works around that half the time, but for the other half you have to exit the IDE completely and wait a while before you can get a responsive console session again. Cloud9 do have a local edition of the IDE that you can use. I played around with it a little bit but couldn't really get all the bits and bobs to work. And since I prefer vim locally anyway, there really wasn't much incentive for me to get it to work.

I thought I'd give Brackets a try instead, which is an IDE that Adobe have been working on. I first came across it when I was working on a project involving the Chromium Embedded Framework a couple of years ago. Brackets was the most active project on CEF at the time and it looks like they've made a lot of good progress. There are a number of add-ins available for it, including a very cool one called Theseus, which instruments JavaScript on the fly. They also have an npm package for Node.

I embedded Brackets into the Temboo test just for the heck of it. It's not a very useful hack since the code has to be running in order for for it to work and even though you can edit the code, you still have to restart the server for it to take effect and you have to do that through the Cloud9 IDE.

Cloud9 also gives you a URL to connect to your service. I could only make it work on the default SSL port. It's basically https://yourprojectname-c9-yourusername.c9.io. So my URL looked like this - https://temboo-geocode-c9-nikmeiser.c9.io. The way my code is set up, navigating to the root URL will invoke the Temboo Choreo for Geocodes and adding '/brackets' to the end of the URL will take you to the Brackets IDE.



In case you forget to commit your changes to Github, Cloud9 gives you a nice Googledocs-like versioning system as well. They seem pretty insistent on backing up your data - I created separate projects with the same name in Cloud9 and Github. I then deleted the Cloud9 project and tried to recreate it from Github but Cloud9 made me wait 4 hours because it hadn't backed up my deleted project yet.

Synching back to Github was straightforward too. You use the same commands at the console as you would on your workstation -
git add *
git commit -m "Working temboo test"
git push -u origin master
And I was done.

I don't think I'm ready to make the commitment to Cloud9 yet, though. It was fun to use and it's remarkably full-featured but the constant connectivity hiccups make it unusable.

Update: I've been using it exclusively for the last few days for Node.js development and despite the console connectivity issues, it's brilliant. 

Comments

Popular posts from this blog

The Forecaster Brown Fan Club

How to Create a Pentaho Report Using the REST Client

Automated Testing with vncdotool (Not Headless, but Hairless)