Wednesday, November 20, 2013

CodeEnvy's Marketing Approach with Environment setup is Garbage

Cloud IDE environments are becoming more popular every day. One of the cloud ides that I have invested some of my money is CodeEnvy. I think they have a tremendous opportunity to become successful if they add features that developers need. Unfortunately, they are not at that point yet.

Their biggest marketing approach to developers has been "Save 13 hours a week". The idea is that the environment does not have to be setup locally because its provisioned in the cloud and you can save 13 hours a week by using their IDE. Well, that marketing approach is total horse shit.

Most "intelligent" software developers use reproducible environments with tools. Typically, I like to use virtual machines for my development. Using virtual machines in VirtualBox or VMWare allows me to do the following:

1) Create one base environment for my development.

2) Clone my environment for different projects.

The cloning is the key. This allows a developer to setup a development environment by cloning the base environment in a matter of 15 minutes at the most. This obviously depends on the size of the virtual machine.

There is no need or has there ever been to consume 13 hours a week to setup development environments. Don't fall for it. CodeEnvy should be focusing on promoting new features.

Sorry, I know its a little rant. All the CodeEnvy tweets on their marketing has me fired up.

Tuesday, November 5, 2013

Use Primefaces UI in a Drupal 7 Theme

Drupal 7 comes shipped with JQuery and JQuery UI by default. The versions of JQuery are quite old. I believe the JQuery version with Drupal is version 5.

There are a couple of easy steps to easily use Primefaces UI javascript component suite in your Drupal pages.

1) Use the JQuery update module to update JQuery to version 1.7 at a minimum.

2) Include various JQueryUI modules in order for the Primefaces components to work. My project used Gallery and Accordion. For those two to work I had to modify the preprocess_page method in the template.php file. You have to tell Drupal to load the pieces of JQuery UI that you need. You may need to load additional ones for your project if a different primefaces component requires that base library.

drupal_add_library('system', 'ui');
drupal_add_library('system', 'ui.widget');
drupal_add_library('system', 'effects');
drupal_add_library('system', 'effects.blind');
drupal_add_library('system', 'effects.slide');
drupal_add_library('system', 'effects.bounce');
drupal_add_library('system', 'effects.clip');
drupal_add_library('system', 'effects.drop');
drupal_add_library('system', 'effects.explode');
drupal_add_library('system', 'effects.fade');
drupal_add_library('system', 'effects.fold');
drupal_add_library('system', 'effects.highlight');
drupal_add_library('system', 'effects.pulsate');
drupal_add_library('system', 'effects.scale');
drupal_add_library('system', 'effects.shake');
drupal_add_library('system', 'effects.transfer');

Thats it. Just save and blow away the drupal cache and you should see the primefaces components function on your page. (after you add their javascript to initialize them ofcourse in your javascript files)

Here are some other JQueryUI modules that are available that I didn't use in my project. You can add these if needed.

drupal_add_library('system', 'ui.accordion');
drupal_add_library('system', 'ui.autocomplete');
drupal_add_library('system', 'ui.button');
drupal_add_library('system', 'ui.datepicker');
drupal_add_library('system', 'ui.dialog');
drupal_add_library('system', 'ui.draggable');
drupal_add_library('system', 'ui.droppable');
drupal_add_library('system', 'ui.mouse');
drupal_add_library('system', 'ui.position');
drupal_add_library('system', 'ui.progressbar');
drupal_add_library('system', 'ui.resizable');
drupal_add_library('system', 'ui.selectable');
drupal_add_library('system', 'ui.slider');
drupal_add_library('system', 'ui.sortable');
drupal_add_library('system', 'ui.tabs');