Introduction to GruntJS

Developing in Javascript (in that case for frontend web-development) always feels manual provided you came across this nice library called GruntJS.
As the name suggests, it takes the grunt work out of the developers workflow. The repetitive and manual tasks could be automated with this nice library.
GruntJS requires NodeJS. Well, actually it does not require, it works on NodeJS. So the basic to get started is NodeJS. Once NodeJS is installed, one need to install GruntJS, locally per project. As of version 0.4, it is advised to uninstall the globally installed GruntJS module.
Must haves :
1. NodeJS installed
2. GruntJS installed locally.
3. Must uninstall GruntJS globally (if its already installed globally).

npm uninstall -g grunt

Link to the NPM Grunt package is here.

There we go, the basic setup to get started with our grunt work. Now to work with GruntJS, we need two files, which are as below;
1. Gruntfile.js (previously it was called grunt.js)
2. package.json
These two files are to be present right next to the locally installed GruntJS NPM module rather its the other way round. After deciding a place for GruntJS setup, in your work environment for the project, install the NPM modules locally in that folder. Next we can make these two files in the same folder.

The last and most notable task is to install the dependent task packages locally. These are the tasks we want to give GruntJS. For example, if we want to minify a JS file using UglifyJS, then we must install it locally for the project before using it.

npm install grunt-contrib-uglify

Finally, to fire up the grunt work, open the command prompt and navigate to the folder where we have the above two files and type;

grunt

Here is the github link to the setup, if you want to directly jump into the code.

Thats all, keep the grunt work to GruntJS.
Happy coding.

OpenFL is here

The NME or haxenme project is taking a mature shape. The library is now known as OpenFL, which can be assumed as the successor of NME. Actully, OpenFL does use NME behind the scenes.
So, if you are working on NME projects for sometime now, its time to shift to OpenFL.
A true cross-platform library over a true cross-platform language ie; HAXE.
The new site is up at http://www.openfl.org
The other links are as below
Download home
API documentation

The main difference one would see, by coming from NME is most of the packages are now in “flash” not the default “nme”. This is to make it consistent with flash API and at the same time, the add-on APIs are on “openfl” or in the respective packages.

Happy HAXE ing

First anniversary, thanking my beloved wife for everything.

I was thinking to write this post for past some months, but anyway, today I made sure to put it down.
In this busy world, when I decided to get married, I was not sure how it will al end up. Now after one year, I must say, from the beginning only my beloved wife made sure that the experience I get out of life, must be filled with life. I could not thank her for all the experiences we had together through the year.
When we left home to come to my work place (which are two different towns far enough), she made me confident that everything will out, though she was coming out for the first time.
I could not stop thinking the horrible driver and his horrifying driving on our way back from Goa. It was as if we(me and my beloved wife) were kidnapped. We started around 10AM in the morning. The driver never stopped, even if we told him several times. But when he stopped, it was midnight and at the middle of a hill. It was raining heavily and dark everywhere. The forest was dense, and the driver stopped the car. Then the driver went ahead to meet some of his friends, leaving us sitting in the car. There were no phone networks at that place. Fortunately we returned with the same driver and reached around 3AM in the next day morning. I could see deep fear in the eyes of my wife but then she made it clear that we are going to make it. And that belief made me less panic. This was just after somedays of locating in the town of my workplace.
Not very long after, when my mother was in bed counting her last breath, it was my wife, who insisted on going back alone, to home own and take care of her mother in-law. Finally, when my mom died and the rituals were done, I was surprised to see my wife, taking everything on her shoulders and doing it with absolute interest.
Theses just some incidents out of the happening last year. Apart from the all these there were so many things happening everyday that I almost fall in love with the learning to look at life from a different perspective.
I could not have continued doing the things I love, without her support and encouragement. Food was always ready and it is almost always delicious. And now, I just do not want to have outside food.It reminds of my mom and grand mom, everytime I eat food cooked by my beloved wife.
The most notable and important thing that she taught me by here actions and thoughts is, life is now or never. I was almost in a path of counting numbers, but she gave me back the life I was missing. I learned to love the small things, which absolutely give life to our lives. Smiling and being happy always is just here nature and I hope I will catch up to her someday.
I would say, it was not easy but the experience is priceless.
There are lot, but would conclude the post here saying, “Thank you for being there and giving me the year long priceless experience. I love you and happy anniversary”.

A Record is now on Play store

Continuing with my Cordova ( Phonegap ) exploration, I pushed a new Android application to Google Play store.
splash
The application is to record audio. Start the application, press the record to start and press again to stop. You are done with recording and audio file is stored in your local file system.
The application is again a standalone application and does not require to connect to internet. So its private, secure, offline and yours.

As usual, its open-source and the source code is in github. Would love to listen back your take on the application.

Phonegap ( cordova ) and iOS longtap

This is perhaps the most significant effect of using a webview for iOS development. When working with Phonegap(cordova) which uses WebView, the user gets a longtap event as it use to on a web browser. All sort of long tap menus will come up in an application using Phonegap (ex : select, copy etc).
To suppress these unwanted menus on a native application, which uses Phonegap(Cordova), there are a number of options found throughout the internet, but the one which worked for me is a style declaration as below.

/* Disabling the default iOS bevaviour of copy-paste on long tap */
*:not(input):not(textarea) {
	-webkit-user-select: none; /* disable selection/Copy of UIWebView */
    -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */

}

Happy coding :)

My first Android application on Play store, The Address.

theAddress
This is exciting to get my first Google Play store application. Previously I worked on some Android applications, but nothing was up there in the Play Store. For me its really a different experience pushing it to the Play store. Unlike pushing to Apple App store, the Play Store push feels like no brainer.
Now, talking about the application, its a personal note taking application for an absolute necessary address. This application does not require internet connection at all. Its a pure standalone application on its own. Its private to the user.
Open up the application, fill out the form to add an address and save it. Thats all it does. Once you come back to get the address, it shows upfront the saved address. Incase you are done with the currently stored address, update the form with a new address and save it. It does not store history of your previous addresses.
Now the implementation is done with Cordova (phonegap) 2.7 , jQuery 2.0 , jQuery Mobile 1.3 , lawnchair and GASP JS(GreenSock Animation Platform for Javascript). Its completely opensource and the code can be found at Github.

Looking forward to listen from you all.

Cordova(Phonegap), jQueryMobile and making a popup

This may seem obvious to make a pop-up with jQuerymobile with its popup API, but its a little more than just calling the api.
The problem is closing the popup. When working in a single page application in jQuerymobile and phonegap, the closing of the popup will take you to different jQueryMobile pages depending upon your setup.
The solution is to make the popup ready to be open just at the current page and while closing it should not make the application go to different pages. The trick is to while initialising the popup widget, initialise it with “{history: false}”, and thats all.
Here is a popup created with jQueryMobile API.

My PopUp

Title

Save Cancel

Here is the javascript code to initialise the widget and open it.

//making a popup which will not take you back to the previous page.
$('#popupDialog').popup({history: false});//awesomeness
$('#popupDialog').popup('open');

Happy coding :)

First book review : Aptana Studio Beginner's guide

This came to me as a surprise that I have been asked to review a book and write something about it. I started of with excitement as to finish the book as soon as possible and write something about it. So here it goes.
The book : Aptana Studio Beginner’s Guide
A nice book, as it states from its title. Which is unlikely, is its not only for “beginners only”. This is all you need to get started with Aptana studio but in general Eclipse IDE of any kind.
Aptana Studio itself provides a very solid IDE which is both free and opensource. I love this IDE as I do HTML and JS projects with this IDE. The most appealing thing about this IDE is its cross-platform, so one IDE, one experience everywhere. I must say its a must have for anyone who is serious about Javascript development in general.
Now to get the most out of this nice IDE, this companion book is a must have I would say to get you started and to know what can you do with the IDE.
This book starts with very basic things as to menus and workspace and then move on to deeper topics as to configure it to suite your working style. After working with this IDE for such a long time, I found this book reveals a lot more which came as surprise to me. Things like saving your own customised look and preferences, making shortcuts, the command-line interface inside the IDE and lot more are covered in detail, from a beginner’s perspective.

All in all a nice book to have if you want to get used to Aptana IDE in particular or Eclipse IDE in general.

Thanks a lot to Kenny Dias from Packt Publishing, who gave me this opportunity to review this book.

Settings Check for Apple Push Notification

While developing an iOS application with Push Notification, there might be a time, one comes across the following error message.

- no valid 'aps-environment' entitlement string found for application

Well, that means the APN (Apple Push Notification) server is denying to register your application. This situation arises when the signing certificate for the application differs from the one you generated for Push Notification.

The fix is to select the proper certificate in the settings for the project.
codeSigningCert

Happy coding.