Starting of with mirror development

Choosing a suitable development environment as well as deployment options for the magic mirror development.

Advertisements

We have come at a point in our mirror development where we can start looking at integration of the Alexa Voice Services with the magic mirror software, and adding extra functionality to both AVS and the smart mirror.

But for that we need an IDE, or at least an editor for Javascript / CSS / HTML.

I’ve pondered on several options.  There quite some good editors out there.  Some of which are free like atom, brackets and some of which are paying like Sublime Text and Webstorm.

I didn’t feel like paying for an editor, so that leaves the free alternatives.  Looking into those alternatives, however, none really work on a Raspberry Pi.  Or not out of the box, or with a few tweaks and workarounds.   According to me, not a future proof option.

As an alternative there is an option for full fledged IDE’s, two of which are Eclipse and NetBeans.  We’ve already installed NetBeans on the Pi for the Java development, but we’ve installed the SE version, which is the lowest version, with the smallest footprint.

Installing a higher version of NetBeans could be an option, but when editing and debugging the Java Client I found that the speed of the Raspberry Pi just doesn’t cut it when it comes to a fluent way of working with the IDE.  I know from experience (I used to make android apps as well) that eclipse is a very “heavy” IDE with lots of configuring and a large footprint.  Seeing what NetBeans does, I’m not even considering it.

I considered VIM.  Yes I did.  I seriously did.  There’s a lot of controversy about the tool.  Some couldn’t live without, and some find it sh*t.
I have to say I can understand the pro’s and cons.  I’ve seen some good tutorials on the tool, and I also read the documentation (vimtutor).  The shear power of the commands, the macro’s, the plugins etc make it a truly powerful editor.  This is at the same time its biggest problem.  There are so many options, and to be frank, there is quite a steep learning curve in getting to know all of the commands before you can gain an advantage is development time by using all the shortcuts.

I figured that it’s perfect for people who are developing all of the time, but for someone like me, that will do it only occasionally, a more graphical and intuitive interface would have more benefits.

Another disadvantage is the lack of debugging functionality. You really need to know your syntax and possibilities pretty well.  There’s highlighting and code completion (if you install the plugins), but that doesn’t prevent you from writing “dumb” code.

These two things combined made me search for an other solution.

 

I figured that it was an advantage for me to be running all this from a Mac.  In the end, I can run the mirror software on my mac as well.  I’m not able to run the java code of the AVS client (yet), but I will worry about that later.

The big advantage to be editing and running the mirror software on the Mac would be speed and debug ability.  Since we already installed atom before, I will keep on using this editor.  It’s fast and has quite some cool plugins to make my life easier.

The disadvantage here, however, is deployment to the Pi.  How to get the latest software to the Pi after developing on the Mac.

I have been thinking about that, and there are several command line tools that could help

  • rsync
  • sftp
  • scp

All of these have pro’s and cons as well, but what they have in common is the setup cost.  I would need to create scripts, setup authentication, etc.  That’s quite some effort while I’m not planning on deploying just yet.  And if I do, it won’t happen that often.  That’s why I’ve abandoned this idea, and I will by copying over the changed files from the finder, whenever I want to deploy.  There aren’t that many html, css and js files, so it’s no big hassle to do it manually.

So there we have it: a consensus.  Time to get cracking!

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s