Posts

Does NoSQL means you forget everything you learnt at RDBMS school?

I found it interesting to see how to integrate NoSQL, but more interesting was to unlearn somethings i learnt through years of training - denormalise! Normalisation was the term that made rdbms, good normalisation design was supposed to be a hallmark of a good database designer. But NoSQL is different, forget joins forget collecting data from 10 different tables NoSQL is radically different and the best part is it works for very large datasets, is distributed, and some very big installations like twitter, amazon and others mean if you don't look at this seriously soon you will be in trouble. Drupal by itself doesn't support NoSQL out of the box and you don't throw away mysql yet, there is a module (cassandra) that was recently added on drupal.org which is worth checking, One possible way of integrating with drupal is using a nosql may be casandra or mongodb with your entities, infact this is one of the best things of entities, your fields can live in a separate database ...

My Macbook informs me of tragic death of Steve Jobs the Apple co-founder

Image
Like everyone in the UK i woke up to the news of tragic death of Steve Jobs the Apple co-founder, i was not going to write a blog post on the topic, but there was something that prompted me to write one. I got the news not from my tv but my macbook pro! I switched on my macbook, fired up a new tab in safari, and there it was, very simple, very sober 'Steve Jobs' 1955-2011. A real tribute to the design genius he was. I am sure there will be a new person at the helm of things at Apple, Apple may continue to grow in leaps and bounds or may just fizzle out - but you can't take that away from Steve, the way he came back to Apple when things weren't going very well - brought the iMac which was a run away success, followed up with other fantastic products we all love and cherish. The most important thing was he got Apple to believe they were not in the business to shift boxes but deliver what the customer expects, stuff that just works. Hats off and tributes to the g...

Configuring drush on Mac OS X Lion

I downloaded the drush from the drupal website at http://drupal.org/project/drush. I downloaded the 7.x-4.5 version -  I was using mac os x and if you are also using mac os or any other flavour of linux - you should download the tar.gz file.  Drush works best on linux/mac os x - it works on windows as well but has its limitations, although things are improving but you will need to install additional software that allows you to use many drush functions. If you are interested to look at how to install drush on windows then have a look at drush.ws. I did install on my old windows pc as well, got most of it working. Coming back to the topic, we are installing on mac os x - so here goes. The accompanying readme.txt file is quite good in showing what is required, and it really is straight forward. Albeit there are a few differences and may be you would like to customise your installation a little bit - but this is what i did. The first step was to download and extra...

How do you expose your legacy database tables to views in drupal 6 Part 2

Continuing from Part 1 of the post where we defined custom data table to make drupal aware of our legacy data, we also want to define custom filters that can be used by the views system to define conditional views. in the hook_views_data() or our example code in part one, the candidate_views_data() function you can see that a field was defined as below:     $data [ 'candidate' ][ 'candidate_gender' ] = array (         'title' => t( 'Gender' ),         'field' => array (           'click sortable' => TRUE ,         ),         'filter' => array (             'handler' => 'candidate_handler_filter_gender' ,         ),     ); notice the filter key in the $data array, we want custom data to appear here, for example 'Male' and 'Female', so we have defined a custom handl...

How do you expose your legacy database tables to views in drupal 6 Part 1

This is a 2 part post, that shows how I exposed a legacy table to views in drupal and used the incredible power of views to create many combinations static and conditional views. This was very helpful for my client. I had a requirement that warranted exposing existing database table to views, so that views can contain data from this table.  To enable this to happen, the following steps need to be taken. In a custom module you need to first define the views_api hook as following: function candidate_views_api(){     $view = array ();     $view = array ( 'api' => 2 ,                   'path' => drupal_get_path( 'module' , 'candidate' ). '/views' );     return $view ; } candidate module was a custom module which I already had, so it made sense to add this hook here.  The important bit here is telling the drupal sub-system where the views file will reside.  ...

Drupal 5 and CKEditor

FCKEditor has had its hey days, worked well with drupal as well, but it was bloated and slow. Then came the CKEditor, shiny new and fast gui editor. There is a drupal 6 & 7 module for CKeditor, but the module for drupal 5 is missing. Understandaby, we dont want no one to use drupal 5 any more... however there are still some legacy systems using drupal 5, like the one i am currently working on. upgrading to drupal 6 is not straight forward and requires approvals and budgets from tons of people. The next obvious option is to write a custom quick fix to make drupal 5 work with ckeditor, ckeditor and drupal 5 works out of the box with wyiwyg module but unfortunately only works on drupal defined or cck defined content types, if the content type is defined programatically - it doesnt work with those textareas. Hence a need for a custom module like the ones available for drupal 5 & 6. There may be a work around i am thinking but havent yet got time to get around to trying....

Preparing your drupal development environment with Mac OS X Lion.

I just got a MacbookPro and the first thing i wanted to do was get a drupal developer environment on the machine, I ideally would have like to mirror what i had on my windows laptop - which was Apache/PHP/MySQL/Eclipse. I googled and found OSX Lion comes with Apache and PHP built in, I must add here that i didn't know there was a MAMP server similar to the WAMP server i had installed on my windows machine, but using the already installed Apache and PHP was just as easy. To enable Apache just do the following: 1. Go to System Preferences  2. Click sharing 3. Click Web Sharing service 4. Note the location of the Website Folder on my macbook pro it was Macintosh HD->Library->WebServer->Documents, i would think this is the same for you as well. We can change the document root from httpd.conf if required, i left it as is. A quick run to safari/firefox and go to http://localhost to make sure Apache is working - and it does tell you emphatically 'It Works!',...