Dec 14, 2014

Pidora Node.js quickstart

I have been using pidora (a fedora remix) for my raspberry pi experiments. So far, pidora has been treating me fine. However, you can quickly notice that pidora lacks documentation compared to debian based raspbian, so here is my instructions for getting node.js to work on pidora.

Actually, if you try to install node.js from yum repository, you will notice that node.js is available and can be installed. In fact, it was version 0.10.25, which was OK, when I was writing this.  However, when I tried to run an application with it, it failed with the message "Binary compiled with -mfloat-abi=hard but without -DUSE_EABI_HARDFLOAT". As one can imagine, I have not pursued further this road and looked other options.

So next option is to get node.js directly from the node.js distribution. First download the latest arm build for node.js. Although the latest release for node.js is 0.10.33, the latest ARM build I could find was 0.10.28.


Next extract the contents, move contents to /opt/node and link the bin folder to /opt/bin. I guess you can use different directories but can't imagine why.

tar xvzf node-v*
mv node-v* /opt/node
mkdir /opt/bin
ln -s /opt/node/bin/* /opt/bin/

Check that PATH includes /opt/bin. If it does not, edit /etc/profile to include it on PATH.  Now you should be all set. Of course, you need a library for accessing GPIO, and have your LEDs blinking but that is subject for another post.
Read more →

Jul 14, 2014

Adoption... Sort of

Apparently, myeclipse has started to use bits and pieces from Thym. It was brought to my attention that the plugin wizard image on the myeclipse feature page is from Thym. You can compare it with an image of the same wizard on JBoss tools features page for yourself. I have not tried the product myself hopefully it is working well.

Normally, I would be very excited about a product adoption happening this quickly. However, the folks behind this product have a different way of adopting open source software, which usually means project Thym will get zero benefits from this adoption. Of course, one can only hope for a positive surprise.
Read more →

Jun 10, 2014

Sharing Cordova projects becomes easier

Whether a project is created using Cordova's CLI or the Eclipse Thym (or JBoss Tools) sharing Cordova projects within a team is unpleasant. Cordova projects include generated artifacts and binary files in their source tree which violates source code management (SCM) best practices.

The first set of generated files are on the {$PROJECT_ROOT}/platforms directory. When using Cordova CLI when a cordova platform add {$PLATFORM} command is issued on a project, a {PROJECT_ROOT}/platforms/{$PLATFORM} directory is generated. This directory contains all your artifacts from {$PROJECT_ROOT}/www, {$PROJECT_ROOT}/merges/{$PLATFORM} directories and all the files necessary to create a native application with the platform build tools. Fortunately, Eclipse Thym generates platform folders on a temporary location and only when needed, hence does not share this problem. When using SCM tools, {$PROJECT_ROOT}/platforms should not be added to source management. For long term sanity, developers should do the extra step when they get the code from SCM and issue  "platform add" commands for the platforms that they will work on.

The {$PLATFORM_ROOT}/plugins folder includes the files for Cordova plugins installed to the project. These files are not usually modified by the developers but installed with the cordova plugin add {$PLUGIN_ID} command. This command creates a {$PLATFORM_ROOT}/plugins/{$PLUGIN_ID} directory and copies the plugin's files in. Eclipse Thym also does a similar thing but it uses a filter on the project explorer so that the files do not confuse developers. Since these files can be regenerated and are not modified during daily development, it is a bad practice to add them to the SCM tools. Because both Cordova CLI and Eclipse Thym did not have a record of installed plugins other than the directories under {$PLATFORM_ROOT}/plugins/ directory, it was not possible to avoid adding them to SCM.

Recently, I have added a couple of new commands to Cordova CLI. cordova save plugins saves the list of currently installed plugins to config.xml. cordova restore plugins reads these entries from config.xml and restores them to the project. The save command also comes with a --shrinkwrap flag to freeze to the installed versions of the plugins. Of course, Eclipse Thym also implements this feature. Here is a demo that shows the feature at work.

With the new save and restore commands and its implementation on Eclipse Thym, it is considerably easier to share Cordova projects but we are not done yet. At this time, restore and save commands support restoring plugins only from Cordova plugin registry but support for more sources should be expected in the future. It is also planned to extend these commands to platforms.

UPDATE: The commands and the functionality has evolved since the original post. Please refer to Cordova platform and plugin version management guide for the latest.
Read more →

Mar 31, 2014

Eclipse is changing and that is a good thing

After missing a few years, I have attended the EclipseCon NA 2014 this year.  I am not sure if it is because I missed a few of these but I felt a deep change in Eclipse. I think the change roots from the fact that Eclipse foundation nowadays, has almost no restrictions on the type of projects that it hosts. I am not sure when this was actually relaxed. Back in the day, it was required that all Eclipse projects to use OSGi as runtime, hence be developed with Java. Nowadays, any project regardless of the runtime, development language is welcomed as long as it agrees to adhere to eclipse way. I believe this has triggered a slow shift on Eclipse from being a tooling community to a larger scoped open source community. I expect to see this change to accelerate in coming years as Eclipse's perception as a tooling only community slowly fades.

Looking at the interest and attendance from project committers, I am sad to report that Eclipse WTP project is terminal. There are a couple of reasons why an important project such as WTP is not dead yet. First, it has a large user community as indicated by download numbers. Also, it has a lot of commercial, and open source products that depend on WTP or parts of WTP. One would imagine that this dependency would create a lot of contributions to upstream. However, most of these products, for one reason or another, prefer to build around WTP and not contribute. I do not think we will be seeing new features on WTP anytime soon if ever.

I did receive a good amount of attention to my Hybrid Mobile development talk and the new Thym project proposal. I have started listing some of the interested parties to the proposal. And also was able to recruit Doug Schaefer and Chris Aniszczyk as mentors to the project. If you would like to be listed as an interested party and show your support, it is not late, please do let me know.

I am continuing my great open source community conferences tour with ApacheCon. It will be my first one, so I am not sure about what to expect. I will be speaking about building Cordova applications with Eclipse IDE on Tuesday. April 8, which should be fun.

Read more →

Mar 12, 2014

Talking About Cordova Tooling and Thym Project Proposal

This spring turning out to be the season for conference sessions for me. I will be speaking about the new Hybrid (ehh... well Cordova) development tools on three different conferences. 

The series starts with EclipseCon next week. My "Hybrid Mobile Development Tools for Eclipse" session will be on Tuesday, March 18, 2014 between 13:30-14:05. 

Also, we had a recent proposal to move the development of most of the JBoss Hybrid Mobile tools to Eclipse. This will give me a chance to discuss anyone who is interested on Hybrid Mobile tooling for Eclipse and get the project going possibly faster. If you are attending and would like to discuss please let me know or just find me at the conference. 
Read more →

Jan 9, 2014

Multiple Cordova Engines on JBoss Hybrid Mobile Tools

Until this week,  JBoss Hybrid Mobile Tools were able to work with a single Cordova version. To add insult to injury that single version (which is Cordova 3.1.0) was embedded in and was not changeable. However, Santa was busy and just dropped an initial implementation of multiple Cordova engine support to nightly builds. Below is a video of it in action. If you are cool enough to get the nightlies, instructions are on the project's site .

A word of caution is needed though. This feature is still under development. If you really really need to use a different cordova version it will do the trick but for anything else I would wait for the release before moving my production code. Please do try the feature and provide feedback either on the related issue  or create new ones. 
Read more →