Wednesday, January 25, 2012

What is special about Node.js?



   I am not a Node.js programmer, but an aspirant to give it a try and try to do some real time stuff. Few days back, I came across this link on wired Theres are lots of things given in that link, but I have copied the best lines which I think is the best summations about Node.js



       Node is the successor to Ruby on Rails, the programming framework that made it big when Twitter made it big. “First there was C, which Amazon was written in,” he told us this past spring. “Then there was Perl, and Craigslist was written in Perl. Then there was PHP and Facebook, and then Rails and Twitter. With each of these things, they solved a lot of hard problems, but then new problems arrived. Node solves the next set of hard problems, the problems that come with all this real-time stuff.”


I have been a great fan of real-time things. Also I was amazed when I saw Google doing real time analytics at
Google Analytics. Since then, I am just patting my feet to get Nodejs running of my laptop and have a taste of it. Hope the above paragraph was useful to you.

Thanks.
See you again soon.

Monday, January 16, 2012

Comman line error in BlackBerry app development

Hello all, not much to share with you all, but some serious but silly problem that bugged me for a while. I was trying to create a simple BlackBerry project, HelloWorld and I faced with an error when I started running the project.

Command Line Error - BlackBerry Smartphone Simulator
----------------------------------------------------
Unknown option: World
Try "fledge /help" for command line help.






Later I found the solution on Google.


Solution
Just remove any spaces from your project name. Thats it.




This is a silly thing that RIM allowed to pass in into BlackBerry JDE plugin.
anyways, see you soon with some new stuff.

Sunday, January 8, 2012

Growing your contact network on IntouchId

Hi folks, its been a great time to see ya all.

  Today I am going to talk on something really different. Its not technology, its not programming, its not some kinda break through that I have done. But its about a small innovation, which I believe should grow out and become a de-facto standard of sharing contact information between people.

   Image even in the world of Quad Core smart phones and tablets, we still exchange contact information like an idiot. One guy asks the other for his/her cell no. then the first one types and missed calls the other one and then they save the numbers, that too in a static manner. Tomorrow either of these guys looses the number and they again exchange the contact information in the same static way.

     I mean, common man, we are all living in 2012. Here phones are smarter, TVs are smarter, even Web is smart enough to work, even in the situations of absence of Internet connectivity.

ok, so what exactly is this magic, I am going to talk about. Its the magic.

What is IntouchId?




IntouchId is a great way to share contact information and stay intouch with people forever.
No matter how many cell phone devices you change, no matter if your phone contacts are lost or entire phone is lost.

   And at the top of all, its not only about phone nos. Its about
1. Emails
2. Addresses
3. Contact Notes

They have mobile apps for almost all types of mobiles, Android, Apple iOS, BlackBerry, J2ME and Nokia's Symbian. In addition to this, they also have browser plugins to view your contact information from within the browser.

Beside, IntouchId also creates event pages which help you connect with people you meet at different events and share contact information with them.

Hope you have got an idea of what exactly IntouchId is. If you have any questions, feel free to throw them up in the comments.

Saturday, November 26, 2011

Using Google Analytics with HTML5 or PhoneGap apps


   Hello all, this time I am back after so many days and have brought with me some cool stuff related to HTML5 and PhoneGap mobile web applications. I had been going thorugh Google Analytics SDK for Android and figured out that they have a really cool way of tracking app usage of Native android apps.

   What about mobile web apps developed using HTML5, CSS and Javascript or say PhoneGap.?

:(  :(  ;(   .... !#*"&!)£+=$;^"%.... developers cry.

Putting the javascript code provided by Analytics Dashboard does not work in case of Android web applications. I have already tried it.

    So I begun my challenge of achieving this. I wrote a simple app which had a couple of couple of HTML pages in it. To get such an app running into the Android mobile device, we essentially create a WebView component and then load the first HTML page of the app into this webview. Then the user is good to play with your application.

   Now getting back to the Analytics tracking of this web app, I used the code provided by Google here.
   So the code becomes somewhat like this.

public class  myWebApp  extends Activity{

      Webview mWebview;
      GoogleAnalyticsTracker tracker;

  protected void onCreate(Bundle savedInstanceState) {

        tracker = GoogleAnalyticsTracker.getInstance();


        // Start the tracker in manual dispatch mode. The following UA-xxxxxxx-x code must be replaced by //your web property ID.


       tracker.startNewSession("UA-xxxxxxx-x", this);


       mWebview = new WebView(this);
       mWebview .setWebViewClient(new myWebViewClient());
       mWebview .loadUrl("file:///android_asset/www/index.html"); 
  





    private class myWebViewClient extends WebViewClient
    {
        
        //After the user visits a particular page, send the tracking notification to GoogleAnalytics.
         @Override
         public void onPageStarted(WebView view, String url, Bitmap favicon)
         {
tracker.trackPageView( mWebview.getUrl());
tracker.dispatch();
         }
      }

   }


On the similar lines, PhoneGap also uses the WebView component to get the app running in Android. So the same code(or little bit modified) can be used to track user engagement in the PhoneGap applications.

    This feature should be used to determine the user engagement into your application and nothing more than that. It will help you figure out which features of your application are used more by your user and enhance the user experience, user interface of such features.


Note: It should be made sure that your application conforms to the terms and policies of Google Analytics.

Thursday, October 20, 2011

HTML5 Support in Android 4.0

Hello Android folks and mobile freaks, just about a day before I came to know that Google has shipped out its long watched Android 4.0 aka Ice-Cream Sandwich operating system for mobiles as well as tablet devices.

     Thought it would be great to take a ride on Android 4.0 browser & test out its support for HTML5. Just fired up some code and found out that there are some good improvements in 4.0 browser.


CSS3

Javascript APIs

Input attributes

Input types

Miscellaneous

Sorry for posting the snaps directly this way, but had been busy with work, anyways, the purpose is conveyed. Feel free to share the article as well as above snaps.

Sunday, October 2, 2011

Using Google Docs as database in cloud

Hello all,

 sorry for long awaiting, just had been busy with work, as usual.

For sometime back, I was looking for something using which I can control the data on client applications. I could definitely host a server for this and it could get me the work done, but that was not what I wanted.

   I wanted to achieve this without hosting a server, I thought, why not use Google Docs as a database and get done what I want.

In the sample project that I have created for you people, I have used Google Docs as simply a READ_ONLY database, I did not explore into how to use it on READ_WRITE mode. So this is the limitation you people are going to face.

  Now all I have to do is just change the data on the spreadsheet in google docs and my client application gets the updated data in a while. But please note that, this takes some time for data to appear on the client, for me it once took entire one day.

Heres the download link for the sample project, which is hosted on Google Code website.

Tuesday, September 13, 2011

One look at BlackBerry App Development

Recently I happened to take a look at BlackBerry mobile operating system while I started developing some applications for my day job.

   And to the astonishment of myself, I discovered that it is a fabulous operating system. I just wonder why has it not attracted the developers' attention as yet. Some of the key features that I would like to enlist here are:

  1. Great documentation with embedded code samples.
  2. Pretty good device emulators and enough of them.
  3. BlackBerry OS 6.0 exhibits Webkit based advanced browser.
  4. Extensive API to do almost everything.
  5. Free App Developer registration.
  6. Monetization through ads.
  7. App Developer gets paid in Paypal account(which is a great feature over Android Market, where app selling is not allowed in lot many countries.)
     Also, as now I have got into BlackBerry, I was curious to know where are they heading these days. BlackBerry OS 7 is currently in Beta and it is also one of the good and promising mobile OS(I dont say that it will take over iOS or Android, but definitely RIM can breath with this OS flavor in the market for a while.)

 One of the great things with BlackBerry now, is that they provide Webkit based advanced browser, which greatly supports mobile app development frameworks like JQueryMobile and Sencha Touch. Again this is great opportunity for Cross-platform or Hybrid App developers.
   
    I dont know to what extent BlackBerry will attract developers, but looking at OS 7, better documentation, better and alive official forum (as opposed to Nokia's) and support of Standards based web browser will definitely play good for their recent future.

Thursday, August 25, 2011

HTML5 Application Cache Tutorial

Hello all, not much time to talk about. Here straight way we goto the tutorial of HTML5 Application Cache. I hope u know what it is and how useful it is, if not, I will tell you in short.

Application Cache or AppCache is HTML5 feature using which whole or a part of website can be made available offline. It has following great advantages.

  • Make your web apps available offline.
  • Load your web apps faster.
  • Reduce the server load.
  • Save bandwidth.
There are some changes to be made on server in order to provide support for AppCache.

   If you are using Apache, LAMP, WAMP, MAMP or any other server based on Apache, follow the steps below.

1. Goto appropriate installation directory or search for httpd.conf file.
2. Add 'AddType text/cache-manifest .appcache' to it and save the file.
3. Restart the server.

Or if you are using Google App Engine. Put the following code in your app.yaml file.


- url: /mystaticdir/(.*\.appcache)
  static_files: mystaticdir/\1
  mime_type: text/cache-manifest
  upload: mystaticdir/(.*\.appcache)


Now you are set to use AppCache for the content hosted from this server.

Download the AppCache Demo Project from here and open index.html

Use Google Chrome to study this sample application. In Chrome browser press 'Ctrl+Shift+I' to open Chrome Developer Tools and click on resources tab. When the index.html downloaded from the above project is loaded in the browser. You should see something link as shown in the picture.

cached resource from your localserver


Now just open the cache manifest file and change the version no. in it. Make some change to the already cached files and click refresh in the browser. The newly changed file is cached again.

Application Cache can be used by mobile phones also to make web apps more responsive. Android 2.2 and above supports HTML5 Application Cache.

Update: You can check out what has been cached and what not in your Chrome browser by typing 'chrome://appcache-internals' in the address bar.

Update: If you want to check support for various HTML5 features in your browser, you can use the following Apps.

Chrome App
Android App

Saturday, August 13, 2011

Creating Nested List using jQueryMobile

  Hi folks, for the past 2 days I have been working on creating a small demo nested list for mobile applications using jQueryMobile(JQM).

    jQueryMobile is one of the most famous mobile UI framework. It is based on jQuery and currently in Beta. Thought its Beta, the perfomance of Nested Lists using JQM is really good on low end mobile devices as well. I have tested it for only Android 2.2 though.


   What I have noticed while writing my last two mobile Apps using JQM is that list transition is more responsive than page transition. I had to put much time to get JQM Nested Lists working, so I just created a simple nested list application shown in the picture above. Its freely available for download under GNU GPL v3 Open Source License. The link for the open source page is JQM Nested List.

Update: After downloading the code given below, please do open it using a webkit based browser like Google Chrome or Apple Safari.

Download Nested List Demo Code

Saturday, July 23, 2011

Sencha Touch vs jQueryMobile

Hello all my dear visitors, techno geeks and novice users. Today I will list out some outstanding features, Pros and Cons of mobile App development frameworks which I could figure out while learning to develop using them.

   Since last couple of months, I have been working on content driven mobile apps.

I have had a good experience in learning both of these mobile frameworks while developing these two applications.

JQM and ST, both are HTML5 based Mobile App development frameworks.



Sencha Touch:
  • Steep learning curve, means it will take you time to learn and implement Apps using Sencha Touch. Better understanding of JavaScript is required, but extremely powerful API.
  • Lots of UI controls like buttons, panels, window, list, nested list, layouts and more native look and feel.
  • Faster across variety of mobile devices from Android 2.1 and up.
  • Sencha touch, one of the first mobile App frameworks, runs gracefully in webkit based browsers. 
    e.g.
    Android and iOS, and probably Meego also, I never tried it.
JQueryMobile:

  • Very easy to learn and implement.
  • Not too many UI controls.
  • Currently it is beta, consequently slower across mobile devices. Expected to be improved a lot when stable version is released.
  • JQM, hails from a royal family of frameworks and spawned from community of jQuery, the most famous cross platform JS library. Works great with mobile browsers from Symbian, Android through iOS to Blackberry, Window Phone 7, WebOS.


Conclusion: Both the frameworks are good and it depends upon your app requirements which one to use.

  If too much of work is to be done, just using HTML5 and JS, Sencha Touch is more appropriate. In case, you just need the UI and rest of the work needs to be done in native programming, JQM is more suitable.

Wednesday, June 29, 2011

How to learn to develop for Android/anything.!!!

Hi all,

    Its been around a month or so I have been learning Android. I have got nice experience with the books I have been learning Android from. So just wanted to share my experience with all you guys.

   I started of learning Android when I felt like I have a good hold of Java. My protocol to learn computers is simple, take a reference book/reference website and start reading.

  This is something I have seen  many people criticizing. They say, why take a book and learn,
They would say
1. Write some App and you will learn it.
2. Use Google to learn things on the fly.

1. Write some App and you will learn it.
 But what I believe is writing an App will give knowledge of that particular API part that you have used in your App.

For instance, I will give you a scenario. It was sometime when I had written my own Download Manager in Java. I developed it all though, I never came into a scenario where I would want to change color of JPanel. When I was doing some other project, I ran into such a scenario and learned something interesting about changing it background color.

     JPanel jp = new JPanel();

       a. jp.setBackgroundColor();                              // did not work, as I tried a lot.
       b. jp.getContentPane.setBackgroundColor();    // DID WORK.

 Merely writing an App did not teach me these things. I had to read it somewhere.


Using Google to learn something, what methinks, is wrong. It wont teach you anything, it will just get you the work done.


2. Use Google to learn things on the fly.


   Google is, not doubt, a great utility to use to learn something. But let me ask, did I just say 'learn something', it should be 'get done something'.
   As you all know, by profession, I am a software developer. I keep working on computer, solving problems, developing something everyday. When I need to do to something I have been asked for, I just google it, get the solution and do the work. Thats it.

   But did I learn something? No, I just got done something.

 For example,
take another scenario(This is a very basic example, but imagine of some bigger than this). I want to embed some HTML page in my android project. My naive approach would be, I will fire Android Web Browser, to show the HTML page.

    Now, I have been through the API using either a reference book or Android reference website. I know there is something called WebView in Android that can be used to display HTML in the currently running App itself, than firing separate browser process and display it.

Another instance, try writing HTML5 App, you get all the help and code snippets using Google. But referring to W3C website is always good. In a sneak peek it will give a view of what method and properties are provided by that HTML5 API rather than just getting you work done using Google

So I would suggest, learning things from their respective reference website/guide is always better. I am not saying to by-heart everything, just a watchful overview might take about 3 days or a week or a couple of weeks, but will do great.

The biggest advantage to reading from books/ reference websites is 
1. You can fore plan how your project is going to behave and how its going to be developed.
2. What would be the correct design patter for it.
3. You can easily figure out what is easily possible and what is going to take tolls.

So coming back to learning Android. I bought 2 books and what I have found about these books. (Note: none of these books act as guide books)

1. Wrox Professional Android 2 Application Development.
Its a good book to get started with. They seem to be missing somethings sometimes, but later in chapter 5 they caught the track.

2. Manning Android in action.
It is ok, but its more App development oriented. I needed something that will teach me how to play around with basic building blocks of Android.

for example, teaching me how to fire an Intent and invoke BroadCast Receiver or how to create a service which count till 100 in the background etc.

3. Hello Android (e-learning)
This is totally Application development based book. They teach me developing for Android from the perspective of tick-tac-toe. Though you are doing it step by step, it comes to the case explained in '1. Write some App and you will learn it.' above.

Conclusion:
I did not find any book which gives me a reference of API as well as they small demos with code to use those APIs
I would suggest, learning from Developer Guide from official Android website. I am currently referring the same while developing for Android.

Above is my perception of learning things.

Thanks and bye. I expect a lot of criticism for this blog post. You can just fill it in the comments box below.

Friday, June 3, 2011

Google Reader, best way to stay in touch with the latest tech updates.

    I have been using Google Reader for about an year and I have noticed that among my friends hardly does anyone know about it. Google Reader is an online RSS Reader Application by Google.

    I have been addicted to read news using Google Reader ever since I started using it. Its one of the best Applications ever by Google and greatly helps me in staying updated with the news from Silicon Valley, Mobile Technologies, Internet, Android etc.

The video below will explain you in plain English what is and how to use, Google Reader.







  I can suggest you sites worth subscribing on Google Reader.

Engadget
TechCrunh
AndroidOS.in
MobileCrunch
ReadWriteWeb
LifeHacker
GigaOM

The list goes on as per your interest and needs. Above are the sites I frequently used to go and visit, but Google Reader came to rescue.

And Google Reader is not limited to only this. I am a software developer and I have made the suggestions accordingly. Besides technical sites, you are free to subscribe the RSS feeds of sites that relate to ,say, Cooking, Sports, Automobiles, Economy, Politics and possibly everything.

Just login into your Google Reader and start scrolling the articles. Thats it. Ain't that easy.!!!

Saturday, May 14, 2011

5 things I liked about Chrome OS & Chrome Book

   The rate at which the Innovation is taking place in the world is tremendous. Some company introduces a new technology today, people begin to adopt it, someone introduces another new technology the second day and the earlier one goes obsolete.

      The advancement in science and technology is responsible for all these things & of course the Internet. One such recent innovation has caught up my attention recently. Yes you are right, thats Google's Chrome OS.

   So here I have enlisted about 5 features that I really liked about Chrome OS, but these features are not just about Chrome OS, but any Cloud based Operating System.

1. The Concept of Cloud Computing: Cloud computing, like Internet, will prove to be a boon to mankind. Though it has not come up with its full run as yet, but it will help mankind to soon as we start living the fully connected world. The concept is really great. I have all my data on an unknown server, at an unknown place, I dont bother about it. I can access the same data from any of my devices. All I have to do to get the data back is just query the service, thats it. My laptop is stolen, no more worries, nothing. With Cloud, I dont have to bother about the threat to my data. Upgrades are done automatically, so no worries about outdated software.
   Even from small things like preferences, settings, passwords and my favorite Apps everything resides in the cloud. I just DONT HAVE TO BOTHER.

   And common, dont talk to me about security, recently CCAvenue was hacked, Gmail accidently deleted 150K user email accounts, Sony's blog hacked. You can take measures, try to avoid it from happening. But theres nothing that cannot be compromised.

    I have been a guy who carried out experiments since childhood. I hardly used to like things the way they were, so I used to change them to fit my needs. With Chrome OS  I have full FREEDOM to remove it, to change it.

2. Chrome Web Store: Already before launch of Chrome OS and Samsung's Chrome Book  there were more than 4000 applications on the Chrome Web Store.
Its easy to download, install and use the applications. Once I install them I dont have to bother reinstalling them for life long even if I change the computer or reinstall my Operating System. All that I have to do is just sync the applications onto the cloud. Thats it.

3. Chrome Book keyboard: The Chrome book has been launched at Google IO and there are many controversies about it. Chrome Book really seems to be light weight and the keyboard is fully web based. It does not have those old function keys F1 through F12, but pretty useful keys like refresh, forward, back, full screen and tab switch.

4. The Search Button: Many a times I have seen myself take pain to open up a new tab and search for something that I need. But you  dont have to do this with Chrome Book, just press the 'search' button shown in the picture. It opens a new tab and places the cursor in the address bar. Pretty simple.


5. Size of Chrome Book: The Chrome Book is pretty slim and it enables users, students, business-men to carry it easily and move wherever wanted. The adjacent picture shows the thickness of it as compared to human hand.

Friday, April 29, 2011

Why Microsoft de-emphasized Silverlight at MIX11 | IE10 comes with HTML5 support

So here I come with some news-like post. Recently when I was going through tech news early in the morning, I came to know that Microsoft has been de-emphasizing Silverlight and seemed to adopt HTML5 at MIX11. MIX11 is a Microsoft web developers conference.

     As has always happened, Standard and Open Source technologies have always been at the top of all the other technologies. HTML5 is extremely powerful and sooner or later everyone is going to provide support to it. Earlier Microsoft went on with its jargon of Silverlight and did not provide complete support for HTML5 in its browser till IE9. Recently they have announced and released a developer preview of IE10. They are boasting that IE10 provides great support to HTML5 and CSS3 Gradient and CSS3 Flexible Box Layout.

       Probably Microsoft initially wanted Silverlight to go like Adobe's Flash and become prominent for internet users, thats the reason they did not provide support to HTML5. But besides providing support to HTML5 in IE10, they have been de-emphasizing Silverlight. At MIX11, Dean Hachamovitch, corporate vice president of Internet Explorer, did not even mention Silverlight even in the keynote speech,  according to CNET NEWS.

    All this brings us to a conclusion that Microsoft may sooner or later slowly fade out Silverlight development, eventually kill it and adopt HTML5 completely in future.
       Lets see how do the web standards direct the growth World Wide Web.

UPDATE: In a recent blog post on Zdnet, I got to read something, that I was hoping to know from Microsoft. Refer the image below.



Saturday, April 2, 2011

Google Chrome Packaged App Tutorial

Hello folks, recently I have registered with Google and published a couple of Google Chrome browser applications to the Chrome Web Store. I am here to share my experience and knowledge with you all.

     The first app that I published to the Google Chrome Web Store is my blog app, The4thDimension, as shown in the screenshot.


    Later I published a 'Hello Packaged App' app to the Chrome Web Store and now its up and working fine. I have also written a small Game App, show in adjacent picture, for Google Chrome, you can download it here.

   The primary difference between a Packaged App and a Hosted App is the manifest.json (I will explain one shortly). Rest all is same for both of them.
In behavior, a Packaged App is an installable application & can RUN even when the browser is offline whereas the  Hosted App is hosted from a web server and will NOT RUN offline.

1. What is 'manifest' file and how to create it?
A manifest file is a little JSON description file which holds the meta-data of your application. The code for manifest.json file is available at the chrome web store docs, but here is the customized code for the Hello Packaged App manifest file.

{
  "name": "Hello Packaged App",
  "description": "Demonstration to create a simple packaged app",
  "version": "11.4.2.2",
  "app": {
    "launch": {
      "local_path": "main.html"
    }
  },
  "icons": {
    "16": "icon_16.png",
    "128": "icon_128.png"
  }
}

Copy the above code into the notepad and save it as manifest.json. Here is the description for the above code.


name : This field of the manifest file denotes the name that will be seen in the web store by the users of your application.

description : This field describes the functionality and usability of your app in brief.

version : This is the version of the app. It can have value with three decimal point at the most. For example 3.2.0.1 would be correct value for version of the app.

app : The app field describes the behavior of the app. app field has a child field 'launch'

launch : The launch field describes the action to be taken when the application is launched. launch filed has a child filed 'local_path'

local_path : The local_path field denotes the path of the target file to be launched when the app starts running. It can refer to .html, .js, .php kind of files.

icons : This field has 2 sub fields '16' and '128' which refer to 16x16 PNG image icon and 128x128 PNG image icon for the application. Both of these fields are compulsory for the application to run.

2. Creating the target file for the launch field.
    In the above code I have created main.html file. You can write whatever you want but must be a valid HTML code.

3. Packaging the application.
   This is where I was stuck initially, but had figured out the way later. Now you have to select all the 4 files mentioned below and create a zip archive for example 'HelloPackagedApp.zip'
1. manifest.json
2. main.html
3. icon_16.png
4. icon_128.png

4. Publishing & Charging for the application.
   Log into Chrome Web Store and goto the Developer Dashboard. Click the 'Add Item' button. A page will appear where it will facilitate you to upload the 'HelloPackagedApp.zip' file, fill the entries in the page and click 'Publish'.
     Regarding the money that you can charge to users, Google provides a Web Store Payments API which makes is pretty simple to charge the users for the App, maintain licensing for the App etc.

5. Testing & Running your App.
   When you are done with publishing the app. Search the Chrome Web Store with the name of your application (here 'Hello Packaged App') install it. When you open up a new tab, you should see something like the one shown below in the red colored rectangle.




When you run the app you should see something like this.



Thats it. You can now call yourself a Chrome Web App Developer.

LinkWithin

Related Posts Plugin for WordPress, Blogger...

Share This

Share |