2012 in review

The WordPress.com stats helper monkeys prepared a 2012 annual report for this blog.

Here’s an excerpt:

600 people reached the top of Mt. Everest in 2012. This blog got about 4,700 views in 2012. If every person who reached the top of Mt. Everest viewed this blog, it would have taken 8 years to get that many views.

Click here to see the complete report.

1 Comment

Filed under Others

Mobile App – Non Functional Requirements

general

When we are thinking of a web application, the most important nonfunctional attributes which comes to our mind are Availability, Performance, Scalability, Extensibility, Usability, Reliability, Maintainability, Security, and Privacy.

But when you think of Mobile application there are certain additional parameters which you need to take care during your App design like Form factors, Device coverage, Portability, Cpu & Memory, Network conditions, Operability, Notifications, Screen resolutions, Font, Layout,compatibility,Response Time,Testability,  Fault Tolerance, Failure Management and so on. The correct specification and adherence of non-functional requirements similarly plays at least an equal, if not a greater, role in the success of mobile applications also.Non-functional requirements are often called qualities of a system.

This is due to the following reasons:

  • Mobile devices are uniquely constrained in several dimensions such as the processor speed, memory, multi-tasking support, available network bandwidth, screen real estate, etc. These constraints translate into strict bounds being imposed on the operating characteristics of an application running on a mobile device.
  • Mobile applications need to operate successfully (or degrade gracefully) within a wide spectrum of operating conditions, such as a range of supported screen resolutions and form factors, network bandwidth situations and network types (2G, 3G, Wi-Fi), etc.
  • Mobile applications sometimes need to interact with the device’s sensors such as GPS, accelerometer, the ambient light sensor, camera, etc. The application must respect the sensor’s operating characteristics such as its operating range, sensitivity, accuracy, maximum polling interval, etc.
  • Finally, users expect a different quality of user experience from an application running on the mobile device than they do from their desktop computer. For example, it is much less acceptable to have to reboot the phone when a mobile application hangs. Thus the latitude for error tends to be less for a mobile application than for the desktop version of the application in the same situation.

    Thus, it is critical to capture these requirements as accurately and exhaustively as possible, ensure that the application’s design addresses each requirement, develop the application to meet these requirements, and test the application against each requirement so as to verify compliance. It is worthwhile to highlight some design considerations while designing a mobile application. This document tries to cover some important considerations among these.

Key Design Constraints

cpuCPU and memory

When an application is developed to run on a particular software platform such as Android, iOS, Windows etc., it can in theory be installed and run on any device that supports that platform. However for any given platform, the supported devices could have a very wide range of capabilities in terms of CPU speed and available memory. You can evaluate each feature in your application from the point of view of its CPU and memory consumption while running it, and accordingly arrive at a lower bound for the entire application from this analysis.

Here’s a list of the CPU and memory profiling tools you can use for some of the common smartphone platforms

  • IPhone: The Instruments tool in the XCode development environment from Apple.
  • Android: HPROF on Android (hprof output can be generated and analyzed in a variety of different ways.

(Refer References for more details)

networkNetwork conditions

There are four things to consider in this area.

  • Support for different network channels: Mobile devices can communicate with the network on one or more channels such as SMS, USSD, Wi-Fi, GPRS (2G/3G/4G), WAP, etc. Certain functions in your application may not perform well (or at all) on certain channels and protocols. If you wish to support only the high capacity channels such as Wi-Fi, or GPRS on 3G, you will risk shutting out the vast majority of low-end devices which may not support these radios. On the other hand if you do not specify which are the required (or recommended) channels for your application, it may result in the users inadvertently trying your application’s high-bandwidth features on a low-bandwidth channel such as GPRS on 2G or WAP, thereby frustrating themselves out of the application.

For a networked application, it is crucial that you evaluate each network-enabled feature of the application from the point of view of determining the channels that it is most likely to satisfy the minimum latency requirements on.

  • Signal drop or signal strength reduction: Be sure to evaluate each network-enabled feature in your application in the situation where the channel over which it is operating becomes unavailable or its signal strength reduces. Ensure that the feature is either network-fault tolerant or degrades or fails gracefully in such a situation.
  • Network channel transition: This network condition deals with the mobile application’s behavior when the device transitions from one channel to another. A classic example is when a user walks out of their office building and the device transitions from Wi-Fi to 3G. If there is a transaction underway in the mobile application when this happens, how will the application react to such a transition? It is useful to evaluate the application’s functionality in such situations and design it for a seamless transition to the new channel or for a graceful degradation or failure.
  • Support for multiple channels: This network condition relates to the mobile application’s behavior when there are multiple network channels active at a time. For example, Wi-Fi, 3G and SMS are all active – which is not at all an unusual situation on a mobile device. For networked features that can operate over multiple channels, it helps to designate a preferred channel(s) and design the feature for detecting the preferred channel (or the next preferred channel) and use that channel over others. For example, you may specify that the application will always prefer the Wi-Fi channel over all others.

The SDKs of most major mobile platforms provide a means to register for listening to one or more network related events or notifications when a channel becomes available or unavailable or when the signal strength changes. You should register for such notifications and perform network condition handling inside the network listeners. Also code all network calls defensively via extensive use of exception blocks and return value checking so as to ensure a graceful degradation or failure.

notificationInterrupts, notifications and multi-tasking

When a phone call, SMS or some type of notification (such as a calendar notification) arrives, your mobile device will usually inform your application of this event. If the user chooses to respond to the event, the OS may either background your application or, in case of non-multi-tasking OSes, simply terminate your application. In each case, the OS will usually give your application a chance to respond to the pause, background or termination event by invoking a handler method that you should implement. It is important that your mobile application handles the interrupt in such a way that

  • It does not come in the way of the OS’s processing the user’s decision to respond to the interrupt (such as accepting a call or reading an SMS)
  • It does not result in any damage to your application’s ability to function normally after the OS ‘foregrounds’, or resumes your application after the user finishes handling the interrupt or after they choose to ignore the interrupt.

You should evaluate each feature in the application from the point of view of determining how it would/should function if the application gets background-ed or made dormant while that feature is executing.

formScreen resolutions and screen form factors

An application that is designed for the 240 x 320 pixels resolution screen will look tiny on the high resolution 480 x 360 pixels display of smart phone. The text will likely be too small to read, the images may look too tiny to decipher and the widgets and controls will be too small to use. Overall the application will be mostly useless even though, technically it ‘functions correctly’. Similarly, an application designed for a high-resolution (high DPI) screen will have a major part of its UI go off screen on a low DPI screen phone, leading to quite an annoying experience at best. It’s important to keep a set of target screen resolutions in mind while designing the user interface of a mobile application. If it’s not practical to enumerate the complete set of supported screen resolutions, try to identify a reasonable range of values, for e.g. 400 to 500 pixels along the short dimension and 600 to 850 pixels along the long dimension. Then identify a small set of devices, which taken together, will constitute a representative set of screen resolutions lying this in range, and then design the UI of the application for these devices.

Font adjustment

The text font size may need to be adjusted up (for high resolution screens) or down (for low resolution screens) so as to keep the text readable

layoutLayout tweaks

The layout may need to be adjusted to increase or decrease the spacing between and around labels and widgets shown on the screen so as to prevent them from getting clustered together on high-res screens or spaced apart too much on low-res screens.

Image changes

Background images or background art may have to be provided in two different versions: a large size/high resolution version and a small size/low resolution version so that it properly fills the amount of physical space available on the screen.

Portrait and Landscape modes

Avoid adding the complexity of supporting both portrait and landscape modes if your application does not need to work in both modes. However if you decide to add support for both modes, it’s generally a good idea to add this support for all screens in the application and not just some of the screens so as prevent a usability surprise

Reference

http://pcquest.ciol.com/content/Developer/2011/511042902.asp

http://android-developers.blogspot.com/2011/03/memory-analysis-for-android.html

https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/Introduction/Introduction.html

Leave a Comment

Filed under Mobility

Emerging Technologies for Mobile platform IOS/Android

There has been a sudden explosion in mobile arena in recent times. Everyone wants to have their App running on IOS/Android/Windows Mobile/Blackberry and so on. But with new innovations come new challenges.
A developer who wants to build native apps for IOS has to learn Objective-C. Similarly for Android he has to learn Java. This meant developer communities were totally dependent on language for that platform. In recent times this status quo has changed allowing developers of other programming language to build apps for various mobile platforms without learning new language or new framework.
You can build your mobile app in JavaScript, Html, Java, C# or ActionScript. You can achieve this by below technologies –

PhoneGap/Cordova – Build apps with Html and JavaScript
Flex/Flash Builder – Build apps with Action Script
RubyMotion - Build apps with Ruby
SenchaTouch 2 – Build apps with JavaScript
Appcelerator Titanium – JavaScript
MonoTouch – C#
GWT/Vaadin Touchkit-Java
Trigger.io -JavaScript
Corona -Lua

PhoneGap/Cordova
Introduced in 2009, PhoneGap now called Apache Cordova is an open source mobile development framework. Programmers can build Apps for mobile devices using HTML5, JavaScript and CSS3. Resulting applications are hybrid, meaning that they are neither truly native (because all layout rendering is done via web views instead of the platform’s native UI framework) nor purely web-based (because they are not just web apps, but are packaged as apps for distribution and have access to native device APIs).
As an implementation of Open Standards, developers and firms can use PhoneGap for developments of Apps which are free, commercial or both.
PhoneGap currently supports development for the operating systems Apple iOS, Google Android, HP webOS, Microsoft Windows Phone, Nokia Symbian OS and RIM BlackBerry. Support for recent versions, such as BlackBerry 5 and 6 and Windows Phone 7, is being implemented now. Bada (the operating system used by the some Samsung phones) support is “coming soon”.

Adobe Flex/Adobe Flash Builder
Adobe added the ability to publish apps build with Flex builder 4.5. There are lots of games and app which can be ported to iOS/Android with minimal effort.
Adobe Flex now Apache Flex, is a software development kit (SDK) for the development and deployment of cross-platform rich Internet applications based on the Adobe Flash platform. Adobe Flex is a highly productive framework used for building expressive web applications.
Flash Builder 4.5 makes development simpler with a wizard like experience that is now used to deploy to different mobile platforms with the same codebase. It offers built-in code editors for MXML and ActionScript and a WYSIWYG editor for modifying MXML applications. Adobe Flash Builder includes an interactive debugger, allowing developers to step through code execution while inspecting variables and watching expressions. Flex Builder 3 added support for performance analysis. The profiling view displays statistical information about memory use in addition to function call execution time.

RubyMotion

Introduced in 2008, RubyMotion is a new technology which allows building iOS apps using pure Ruby. It was recently released.
Ruby is a high level programming language. It has concise and flexible syntax. It was designed on the same semantics as Objective-C, it is syntaxically different. Ruby has no Header files, no complicated syntax to define classes, properties or built-in types and does not suffer from single namespace issues.
RubyMotion compiles Ruby and activates a load of performance optimization such as inline methods caching, immediate fixed and floating numeric types, zero cost exceptions, promotion of variables into CPU registers, cached constant lookups, tail call optimization, dead code elimination and many more.
RubyMotion makes Ruby as fast as Objective-C. It is 100% compliant with Apple’s App store policies. Your code is compiled ahead of time, never interpreted and you access the entire set of iOS public APIs.
RubyMotion only works for iOS. However, the Ruboto project, based on the excellent JRuby implementation, is an effort to bring Ruby to the Android platform.
RubyMotion is not Open Source but shares a great deal of code with MacRuby, a popular Open Source project. Third-party Objective-C libraries can be included in a RubyMotion project.

Sencha Touch

Introduced in 2010, Sencha Touch 2 is a high-performance HTML5 mobile application framework which provides an end to end platform for designing, developing and deploying HTML5 applications. Sencha Touch allows you to build apps which nearly look like native apps. Apps can be packed and ported to different platforms using PhoneGap, Trigger.io.
Sencha Touch 2 provides access to a wider set of native device APIs, allowing HTML5 developers to take advantage of hardware features. To broaden the reach of apps created with Sencha Touch 2, a free native packager is now included enabling app distribution to the Apple App Store and the Android Market.
Sencha Touch takes advantage of hardware acceleration to deliver an incredible app experience no matter what browser or mobile device a user is using.

Features
Smoother Scrolling and Animations – Sencha Touch 2 provides a user experience unparalleled in HTML5. Fluid animations and smooth scrolling make Sencha Touch 2 apps come alive, rivaling native technology. Lists, carousels, and other components scroll smoothly and naturally, with a high frame rate across a wide range of devices. The framework automatically uses the best scrolling mechanism for each device, resulting in a great experience everywhere.
Adaptive Layouts – Sencha Touch’s novel layout engine leverages HTML5 in powerful ways to let developers build complex applications that respond, load, and layout in a snap. Switching from landscape to portrait happens nearly instantaneously, and applications load in fractions of a second as Sencha Touch 2’s advanced layout engine ensures pixel perfection.
Native Packaging – Sencha SDK Tools give you the best of Web & native apps, providing a way to seamlessly “wrap” your web app in a native shell. Whether you’re on Mac or Windows, you’re one command away from deploying to the Apple App Store or Android Market.

The SDK Tools work on both Mac and Windows, meaning PC developers can now create iOS applications without needing a Mac. It’s a major step forward for developers since you aren’t limited what app stores you can build for based on your development environment. A set of native device APIs that work on both iOS and Android like Camera, Orientation, Network Connectivity, and native confirmation dialogs are also enabled.

Appcelerator titanium
Introduced in 2008, Appcelerator Titanium is a platform for developing mobile, tablet and desktop applications using web technologies. Support for developing iPhone- and Android-based mobile applications was added in June 2009. Support for developing iPad-based tablet apps was added in April 2010. BlackBerry support was announced on June 2010 but it is still in closed beta.
Appcelerator Titanium Mobile is one of several phone web based application framework solutions allowing web developers to apply existing skills to create native applications for iPhone and Android. Yet, while using the familiar JavaScript syntax, developers will also have to learn the Titanium API, which is quite different from familiar web frameworks such as jQuery.
Appcelerator Titanium is sometimes compared to Adobe Air for developing desktop applications for Windows, Mac and also Linux
All application source code gets deployed to the mobile device where it is interpreted .This means that some errors in the source code will not be caught before the program runs. Program loading takes longer than it does for programs developed with the native SDKs, as the last step, interpreting the source code on the device, needs to be done before the application starts. Some developers have reported that although working with Titanium gives fast results, making Titanium well suited for prototyping, there are issues around differences in behavior of the API cross-platform, stability and memory management, that made them re-write their apps in native code in the end. Many Appcelerator developers cite the speed of development, native UI, and JavaScript skill set needed as reasons why they choose to use Appcelerator.
Features
Support for standard based web technologies Html, CSS and JavaScript on all platforms along with PHP, python and ruby for desktop platforms.
It provides integrated support for popular JavaScript and Ajax frameworks including JQuery, YUI, MooTools, Scriptaculous and others.
Platform independent API to access native UI component including navigation bars, menus, dialog boxes and alerts, and native deice functionality including file system, sound, network and local database.
API access to native mobile functionality like geolocation, accelerometer and maps
It provides extensibility through open interfaces and licenses allowing developers to introduce support for additional scripting language, media codecs and device specific functionality.

MonoTouch
Introduced in 2004, Monotouch lets you build apps with C#. Create C3 and .NET applications for iPhone, iPod Touch and IPad while taking advantage of iPhone API and reusing existing dot net code., libraries and skills. Monotouch is a SDK that contains suite of compilers, libraries and tools for integrating with Apple’s iPhone SDK. Monotouch includes .Net base class libraries along with managed libraries for taking advantage of native iPhone API. Also included is a cross compiler that can be used for taking advantage of native applications for distribution on the apples app store or for deployment to enterprise iPhone users. In addition XCode integration enables application developers to test on the device or in Apple’s iPhone simulator and ship applications to apple app store for distribution.
Features
Mono for iPad, iPhone, iPod touch
C# and .Net on iPhone
Net bindings to native API’s
Distribute on apple app store
Enterprise deployable
Mono develop integration
Xcode integration



Vaadin Touchkit / GWT

Like Sencha allows building native looking app with JavaScript, using Vaadin Touchkit/GWT allows you to build native looking app using java. You would need to compile this to final version using PhoneGap or trigger.
Features
Efficient application mobilization – Take full advantage of the Vaadin framework server-centric model and Java EE API’s for accessing your backend services, securely and efficiently. Since you will be coding only in java, your mobile apps will be simple to create and you can speed up the development by reusing your existing java code and libraries as is. Vaadin touch kit gives java developers a compelling alternative to create beautiful mobile client UIs without using any scripting languages. Stick to pure java and mobilize your enterprise applications with minimal learning curve.
Smooth User experience – Vaadin touch kit visual effect make your mobile app look professional .animated screen transitions and support for touch gestures, such as swipe, give your application a native look and feel. Accessing enterprise resources with UI components specifically designed for mobile touch devices improves your customer satisfaction
Touch kits default theme is designed to reassemble iOS, as with any Vaadin application you can customize your own theme to give your personnel, company or device specific touch.
Customizable offline mode – Vaadin Touch kit application can be started without a connection to the network by utilizing html5 cache manifest feature. Touch kit comes with a default offline mode implementation that displays a notification dialog when the connection is down. Overriding default offline mode functionality can be easily customized by writing plain GWT code that takes care of store application specific data in the browser local storage. Once the connection is back, the data is synchronized. You are in control of when and how data is synchronized to the server.
Easy developments & Updates – Deploy your applications without time consuming approval processes. Maintaining your mobile app is just as easy. Just update your app on server and all users will have access to the latest version of your mobile application.
Benefits-
Write mobile apps in pure java
Animated screen navigation makes your app look like native app.
Produce working app in hours and deploy instantly.
Reuse of main application code to create mobile version.
Enable support for offline mode.
Support for swipe gesture.

Trigger.io

Trigger.io is a competitor to PhoneGap. They can compile web kit apps to native app. Triffer.io forge is a development framework which enables you to create native apps for multiple platforms for a single HTML5 codebase. It consist of common JavaScript api that expose native functionality such as camera, SMS, contacts along with a set of tools and cloud build service to build your app for each platform that you want to support.
The simplest way for web developer to build native apps for iOS, android and windows phone using html5.
Features
Access native features from JavaScript
Distribute in multiple app store
It involves simple development process. No need to setup eclipse/xcode.
Cloud build service, you can even build for iOS on windows.
Real native UI component

Corona

Introduces in 2009, Corona SDK is a software development kit which allows software programmers to build mobile applications for the iPhone, iPad, and Android devices.
Corona lets developers use integrated Lua layered on top of C++/OpenGL, to build graphically rich applications that are also lightweight in size and quick in development time. The SDK does not charge per-app royalty or impose any branding requirement, and has a subscription-based purchase model that allows new features to be rolled out immediately to users
Features
Proprietary OpenGL-ES rendering engine allows for full hardware acceleration of graphics, including sprites that animate at full GPU speed
Transition library enables twining of Corona-powered sprites’ position, rotation, alpha, or any other property.
Supports native iPhone and Android UI. Developers can access the iPhone’s native text features including all fonts, multi-line fields, and keyboard input.
Apps built with Corona start at under 400KB in size.
Subscription-based purchase model allows users to have new updates as soon as they are rolled out.
Full feature integration with device camera, accelerometer, magnetometer, video player, compass, and/or GPS

References

http://en.wikipedia.org/wiki/PhoneGap

http://en.wikipedia.org/wiki/Adobe_Flash_Builder

http://en.wikipedia.org/wiki/Appcelerator_Titanium

http://www.adobe.com/devnet/flash-builder/articles/hello-world.html

http://www.adobe.com/devnet/air/articles/packaging-air-apps-ios.html

http://en.wikipedia.org/wiki/Multiple_phone_web_based_application_framework.

http://agiliq.com/blog/

http://www.developeriq.in

1 Comment

Filed under Mobility

Running Mac on windows 7 using VMware Player


This tutorial is a step-by-step guide
> To install Mac OS x 10.8 on Vmware.
> To install dmg files

Prerequisite:
- You need at least ~10 GB space.
- You need 7-zip
- You need Vmware Player
- You need an Apple ID. Go ahead and create one for development purpose.

Steps -

1. Download Vmware Mac image from here.

http://www.souldevteam.net/blog/downloads/

I used Mac OS 10.8.

2. Extract it using 7-zip which can be downloaded from Google search.
3. Download VMware workstation. I had VMware player 3 which I upgraded to VMware player 5.

4. Click on “Open a Virtual machine” link.

5.Keep the default settings. You can always edit these properties later.

6.Click “Play virtual machine”.

It will start installation. Click Next. It is easy to follow.
Fill in all the details.

7.

8. Login

If you are heavily into development on windows environment , You will feel little uncomfortable because of short cut keys.

Anyway you will get used to it.

Some windows equivalent in Apple

Windows Explorer -> Finder
Start Programs from keyboard -> LaunchPad
Browser IE/Mozilla/Chrome -> Safari
Outlook -> Mail
Control Panel -> System Preference
WM Player -> iTunes
Command Prompt -> Terminal
Recycle Bin – > Trash
Exe -> DMG
VisualStudio/Eclipse -> Xcode

App Store – You can buy Apps and lot of other Apple specific tools from app store. Also you can take a look at development tools.

I downloaded Xcode from AppStore. It is freely available now. XCode is very important IDE just like Visual Studio and Eclipse.

In my next tutorial I will show you how to create a Cordova (phonegap) project in XCode. I am comfortable using Chrome so I downloaded that also.

XCode/Chrome and Mac softwares come in DMG format

To install DMG in Mac you can follow below steps

1). Download the .dmg file; normally it should download to the Desktop or your Downloads folder.
2). Double-click the .dmg file that you have downloaded and a new icon with a similar name will appear.
3). A Finder window may open automatically, if it doesn’t double-click the new icon and it will open the Finder window.
4). Copy (or drag n drop) the new icon (the one that appeared when you opened the dmg) to your Applications directory.

References
http://www.souldevteam.net/blog/downloads/

http://www.sysprobs.com/download-lion-os-x-10-7-3-vmware-image-and-make-it-work-on-windows-7-computer

http://ubuntu4beginners.wordpress.com/2011/04/09/how-to-install-a-dmg-file/

Cheers, we are done installing Mac on Win7 using VMWare.

Leave a Comment

Filed under Mobility

Getting started with Android PhoneGap in Eclipse

Installing the Prerequisite Software

 

Eclipse

Install the Eclipse IDE for Java Developers from http://www.eclipse.org/downloads/. This a ZIP archive file, extract the folder “eclipse”. Most other flavors of Eclipse (like Aptana or platform specific builds) will also work, provided that you install all the necessary Eclipse plug-ins.

Note: Tested on eclipse-jee-indigo-SR2-win32

Java JDK

If you do not already have the java JDK installed on you’re system, install the Java SE Development Kit – JDK 6 from here:
http://java.sun.com/javase/downloads/index.jsp

If you’re running Windows this is a standard installer file, just follow the on screen instructions for installation.

Note: Tested on JDK 6.

Android SDK

Install the Android SDK Package from here

http://developer.android.com/sdk/index.html

Extract the downloaded archive and place it somewhere you’ll remember and add the tools sub directory your PATH. Additional information and instructions for adding the Android SDK to your PATH can be found at:
http://developer.android.com/sdk/installing.html

Be sure to do the following (Windows):

  1. If you install into a folder containing a space (c:\Program Files), you must refer to it by its truncated name in the command program.  In this case “c:\progra~1″.  The truncated name will be the first six characters + ~ + a sequential number starting with 1 for each instance of the same six characters.
  2. Add android SDK to your Path
  3. Add android sdk tools (\android-sdk-windows\tools) to your path. This is necessary for ruby to find the command ”android create project” later on.

Note: PhoneGap 1.0 no longer supports Android 1.x (API levels 3 and 4). Make sure you download and use API level 7 (Android 2.1-u1) or newer.

ADT Plug-in for Eclipse

Install the ADT Plug-in for Eclipse as described here:

http://developer.android.com/sdk/eclipse-adt.html

To verify your installation of Eclipse, Android SDK, ADT, and Java, you can build a sample “Hello World” application using the instructions located here:

http://developer.android.com/guide/tutorials/hello-world.html.

Note: Installed using Eclipse Marketplace.

Image

Image

Note: Make sure you have appropriate revisions installed. Android SDK manager which is installed above takes care of this. Update your API revisions frequently.

Phone Gap Plug-in for Eclipse

Install phonegap plug-in through Eclipse market place. It will take care of dependencies.

Image

Once both plug-ins are installed respective icons with appear on eclipse workbench.

PhoneGap (Cordova)

Download the latest copy of Cordova and extract its contents. We will use this folder in configuring new project below.

Note: Tested on phonegap-1.8.1.0

Reference: http://wiki.phonegap.com/w/page/16494774/Getting%20started%20with%20Android%20PhoneGap%20in%20Eclipse

http://wiki.phonegap.com/w/page/34483744/PhoneGap%20Eclipse%20PlugIn%20for%20Android

Setup New Project

Depending on Android/eclipse version below window may appear little different.

Click on Phone Gap icon.

Include Sencha Touch library (optional) in the pop up window.

Image

Image

Image

Select “Create Activity” checkbox. Click Finish.

Image

Project gets created in workspace. Right click root folder and click on Run as -> Android Application

Image

You will get a prompt to add Virtual Device. Click Yes.

Image

Adding new Android Device

Image

Click New. Enter below details and click “Create AVD”.

Image

Image

Again run the application. You will see Android Emulator.

Image

You can edit index.html like below  snippet.

<body> Hi Apachebite </body>

This is a world famous “Hello World” program which is simulated on Android Emulator.

References

http://developer.android.com/sdk/installing/installing-adt.html

http://www.mkyong.com/android/android-hello-world-example/

http://www.vogella.com/articles/Android/article.html

2 Comments

Filed under Mobility

JavaScript – Parsing ISO 8601 date string to local date time

Problem Statement

Convert ’2012-12-31T23:00:00.0Z’ to local time in javascript.

Solution

var iso=”2012-12-31T23:00:00.0Z’;

var utc = new Date(iso);
var local = new Date(utc.getTime() + utc.getTimezoneOffset());

But above solution works in Chrome/Safari/Firefox but fails in Android emulator. This is because of ISO string not recognized by ECMA 3 supported browser in android. So to fix this we used below fix which worked for us.

Pass your ISO string to below function and you can then retrieve the details from return object as shown below -

/////////////////////////////////////////////////////////////////////////////////

Code Snippet :

var d = new Date(parseISO8601(’2012-12-31T23:00:00.0Z’));
var hr=d.getHours(); ;
var min=d.getMinutes();
var sec=d.getSeconds();
var year=d.getFullYear();
var month=d.getMonth() +1;
var date=d.getDate();

function parseISO8601(str) {
// we assume str is a UTC date ending in ‘Z’

var parts = str.split(‘T’),
dateParts = parts[0].split(‘-’),
timeParts = parts[1].split(‘Z’),
timeSubParts = timeParts[0].split(‘:’),
timeSecParts = timeSubParts[2].split(‘.’),
timeHours = Number(timeSubParts[0]),
_date = new Date;

_date.setUTCFullYear(Number(dateParts[0]));
_date.setUTCMonth(Number(dateParts[1])-1);
_date.setUTCDate(Number(dateParts[2]));
_date.setUTCHours(Number(timeHours));
_date.setUTCMinutes(Number(timeSubParts[1]));
_date.setUTCSeconds(Number(timeSecParts[0]));
if (timeSecParts[1]) _date.setUTCMilliseconds(Number(timeSecParts[1]));

// by using setUTC methods the date has already been converted to local time(?)
return _date;

/////////////////////////////////////////////////////////////////////////////////////////

You can refer below url from where this script is picked up.

Reference

http://anentropic.wordpress.com/2009/06/25/javascript-iso8601-parser-and-pretty-dates/

Leave a Comment

Filed under Mobility

Waterfall–RAD–Agile

 In 1980s most familiar word in software development was Waterfall model. As a developer it was taught and practiced in most of the Web projects.

Project complexity has changed, Customer’s expectation has changed, Technology has changed, Team technical skills have changed and new software development methodologies have evolved which are suitable for current market but we still use the traditional waterfall model.

Below is brief introduction to Waterfall, RAD and Agile.

Waterfall has following phases


Waterfall model recommends that we move to next phase only after previous phase gets completed. Later various modified waterfall models also came into existence.

Brief Description on phases:

Requirement Gathering and analysis

  • Involves meeting the customer to understand the requirements.
  • It is critical that we document the requirements as misinterpretation will give rise to validation errors in later phases.
  • There should not be any open points like maybe or might. Requirement should not be ambiguous. Eg – Integration with external Interfaces or system. This may mean many things, integration with Mainframe, SAP or any 3rd Party vendor which may impact estimates. Try to avoid ambiguous statement as much as possible.
  • Important that we understand customer requirement and expectation so that end product meets his specification.
  • The entire documented requirement must be reviewed with all stakeholders (customers and end users) before moving on.

Design

  • Requirements are broken down into logical modules for easy implementation. Hardware and software requirement are identified and designed accordingly.
  • Relations between various modules are established. Scope and objective of each module is developed.
  • Design focuses more on attributes like Software Architecture, scalability, extensibility etc. Mostly design is depicted using UML notation.

Implementation

  • Design lays the foundation for implementation. Looking at the design documents developers code the modules.
  • Coding is done for logical modules which were identified during design .Code is integrated between this cycle to address integration issues if any.

Verification

  • Individual components as well as overall software is verified to ensure they are error free and met customer specifications. Integration Testing, System Testing, Regression Testing etc. are all included in this phase.

Maintenance

  • This is the final phase. Developed product is handed over to customer for their testing (beta testing).
  • Product is deployed in production and development team will do routine maintenance work to ensure there are no loose points like performance issues or security flaws.
  • Involves Correction of undetected errors if there are any.
  • If there are any major changes requested by customer, then it has to follow all phases again.

Advantages

  • Easy to follow and implement.
  • It is easy to control as everything is put into stages and phases.
  • Schedules can be maintained for easier tracking with deadlines for each stage of development.
  • Good documentation in each phase makes understanding of next phase easier.

Disadvantages

  • Requirement is done initially and it is sometime not possible for a customer to have entire requirement before hand.
  • Customer can see working model only after final phase.
  • Revision is difficult. Once in testing phase it is difficult to backtrack and make code changes.

Generally we follow all these above steps in waterfall model. Various modified version of waterfall model also evolved like spiral, iterative, RAD.

In 90s, concept slightly changed to RAD (Rapid application development). Consumers wanted active participation in the product development. It means end users wanted to see their product at various phases and how it is shaping up. More impatience led to bad documentation and design.


Rapid application development (RAD) is a software development methodology that uses minimal planning in favor of rapid prototyping. The “planning” of software developed using RAD is interleaved with writing the software itself. The lack of extensive pre-planning generally allows software to be written much faster, and makes it easier to change requirements.

More information -  http://en.wikipedia.org/wiki/Rapid_application_development

Brief Description on RAD phases:

  1. Requirements Planning phase – combines elements of the system planning and systems analysis phases of the System Development Life Cycle (SDLC). Users, managers, and IT staff members discuss and agree on business needs, project scope, constraints, and system requirements. It ends when the team agrees on the key issues and obtains management authorization to continue.
  2. User design phase – during this phase, users interact with systems analysts and develop models and prototypes that represent all system processes, inputs, and outputs. The RAD groups or subgroups typically use a combination of Joint Application Development (JAD) techniques and CASE tools to translate user needs into working models. User Design is a continuous interactive process that allows users to understand, modify, and eventually approve a working model of the system that meets their needs.
  3. Construction phase – focuses on program and application development task similar to the SDLC. In RAD, however, users continue to participate and can still suggest changes or improvements as actual screens or reports are developed. Its tasks are programming and application development, coding, unit-integration and system testing.
  4. Cutover phase – resembles the final tasks in the SDLC implementation phase, including data conversion, testing, changeover to the new system, and user training. Compared with traditional methods, the entire process is compressed. As a result, the new system is built, delivered, and placed in operation much sooner. Its tasks are data conversion, full-scale testing, system changeover, user training.

Another version of RAD phases

  1. Business Modeling: The information flow among business functions is defined by answering questions like what information drives the business process, what information is generated, who generates it, where does the information go, who process it and so on.
  2. Data Modeling: The information collected from business modeling is refined into a set of data objects (entities) that are needed to support the business. The attributes (character of each entity) are identified and the relation between these data objects (entities) is defined.
  3. Process Modeling: The data objects defined in the data modeling phase are transformed to achieve the information flow necessary to implement a business function. Processing descriptions are created for adding, modifying, deleting or retrieving a data object.
  4. Application Generation: Automated tools are used to facilitate construction of the software; even they use the 4th GL techniques.
  5. Testing and Turn over: Many of the programming components have already been tested since RAD emphasizes reuse. This reduces overall testing time. But new components must be tested and all interfaces must be fully exercised.

 

Final output – Too much process to too little.

During same time RUP (Rational Unified process) grew into prominence as it provided better sustainable approach to software development. RUP dealt with many shortcomings of both Waterfall and RAD. It was iterative which allowed constant feedback and was heavily weighted towards architecture and risk management.
Final output – we had a standard process now.

Problem – RUP was more of a process which had various elements including documentation and diagrammatic notation UML for different software scenarios. That was the intention. But people started following everything in RUP which in turns resulted in more documentation, more design and less software.

Everyone was exploring some light weight process to take care of everything and this gave way to agile process such as Extreme programming, Scrum, Feature driven development, TDD.

Agile focused on delivering value to end customer that is running software. It also took care of sustainability which was missing from RAD.

Problem – Many people still believe there is no documentation involved or very less documentation in agile and there is no process. People jump to development the moment they get the requirements.


Agile Agile Agile …


Agile Software Development refer to a set of software development methodologies that promote

  • Project management process that encourages frequent inspection and adaptation
  • Philosophy that encourages Team work , self organization and accountability.
  • Set of engineering practices that allows rapid delivery of high quality software.
  • Business approach that aligns development with customer needs and company goals.

MYTH: No Documentation

MYTH: Undisciplined

MYTH: Agile is a process

Principle of Agile

  • Customer Satisfaction by rapid continuous delivery of software.
  • Working software is delivered frequently.
  • Face-to-Face communication is best form of communication
  • Simplicity
  • Self-Organizing team
  • Regular adaptation to changing circumstances.

Agile Methodologies

SCRUM – iterative process of software development. Main actors are scrum Master, Product owner and Team. Sprint is a deliverable product which is given to client in a typically 4-6 weeks depending on complexity and features taken up.. Features which are part of deliverables are taken from product backlog which is maintained by product owner in consultation with various stakeholders. During sprint no one changes sprint backlog.

More information -http://en.wikipedia.org/wiki/Scrum(development)

Test Driven development (TDD) – is a software development process that relies on the repetition of a very short development cycle: first the developer writes a failing automated test case that defines a desired improvement or new function, then produces code to pass that test and finally refactors the new code to acceptable standards.

More information – http://en.wikipedia.org/wiki/Test-driven_development

Extreme Programming (XP) – is a traditional software engineering practices (daily interaction, working software, testing etc.) taken so called extreme level .It leads to a process that is more responsive to customer’s need while creating better software.

More information – http://en.wikipedia.org/wiki/Extreme_programming

Lean – is a process to eliminate waste, amplify learning, male late decisions, fast delivery, product integrity and fully understood system.

More information – http://en.wikipedia.org/wiki/Lean_software_development

Key Terminologies

Backlog – A backlog is master list of functionalities

  • Features
  • Stories
  • Requirements
  • Bugs

Item attributes – Each functionality can be given

  • Description
  • Cost estimate
  • Business value
  • Priority

Product Backlog – Product owners gets all the needed functionalities from all stakeholders.

Sprint Backlog – Scrum Master/Product owner picks up functionalities from Product backlog depending on priority and which can be accommodated in sprint cycle.

Velocity – method for measuring the rate at which team delivers the business value. To calculate, add estimates of the items successfully delivered iteration.

Definition of Done – is a checklist of valuable activities required to produce software. Like unit test written, code review done, functional test written and passed, user documentation, design documentation, release notes etc.

Agile Reports – Product/sprint backlog reports, Release burn-up chart (% complete), Defects (inflow, outflow, open defects), action items, risk etc.

Agile retrospective

What went well?

What could be improved?

Team learning

Sample Agenda – Gather data, prioritize, discuss, action items

Agile Estimation

  • Generally stories are estimated.
  • High level estimate is provided by Team. Iteration estimate over a sprint is also given by team.
  • Story Points – gives difficulty level as in 1,2,3 and so on.
  • Estimates are done often daily during iteration to estimate remaining effort

References

http://en.wikipedia.org/wiki/Waterfall_model

http://www.slideshare.net/srogers74/agile-software-development-overview-presentation

http://www.agileadvice.com/

http://www.implementingscrum.com/

http://jamesshore.com/

http://www.infoq.com/agile/


1 Comment

Filed under Wiki