Get solutions to your problems

Identify your problems but give your power and energy to solutions.

Leadership

Let no feeling of discouragement prey upon you, and in the end you are sure to be leader.

Opportunities

Opportunity is missed by most people because it is dressed in overalls and looks like work.

Success

Success is liking yourself, liking what you do, and liking how you do it..

Business

A project is complete when it starts working for you, rather than you working for it.

Friday, October 4, 2013

Setting up Environment and Developing First Sample Android Application

You need to follow below mentioned simple steps to create a basic android application:

1. Before you can start you need the Android SDK and an IDE. Download the android bundle, unzip and start the Eclipse.
2. To run, test and debug your Android Application, create and run a virtual android machine via following step:
   2.1. Click on “Windows” at the navigation toolbar
   2.2. Open “Android Virtual Device Manager”
  2.3. Click on “New” button to create a new Virtual Device.
Type AVD name, select Device and Target, and also make sure that “Use Host GPU” is enabled. This allows the AVD to use the Host GPU and helps to render the AVD much faster. Then click “OK” button.
3. Select newly created AVD and click on “Start” button. You will see following window:
Click on “Launch” button and AVD will be started as:
4. Create a new Project by File->New->Android Application Project. Following screen will open:
Fill in the form as shown in above screen and click “Next”.
5. Configure Project as shown in below screen and click “Next”.
6. Configure Launcher Icon. Here you can choose a Launcher Icon that will be displayed on your mobile phone. Click “Next”.
7. Create new blank Activity and click “Next”.
8. Configure newly created Activity as follows and click “Finish”.
9. Right click the newly created application and select Run As -> 1 Android Application. Unlock the AVD with mouse click and drag and see your default activity view (“Hello World”) in AVD.

Friday, September 13, 2013

What are Android Application Development Tools and how to install them?

Android Development Tools

The following Android development tools are required in developing Android applications:

Android SDK

The Android software development kit (SDK) includes a broad set of development tools. These include a debugger called Android Debug Bridge (adb) (which is a tool that allows you to connect to a virtual or real Android device for the purpose of managing the device or debugging your application), libraries, a handset emulator based on QEMU, documentation, sample code, and tutorials. Currently, supported development platforms include computers running Linux, Mac OS X 10.5.8 or later, Windows XP or later; for the moment one can develop Android software on Android itself by using (Android IDE - Java, C++) app and (Android java editor) app. The officially supported integrated development environment (IDE) is Eclipse using the Android Development Tools (ADT) Plugin, though IntelliJ IDEA IDE fully supports Android development, and NetBeans IDE also supports Android development via a plugin. Additionally, developers may use any text editor to edit Java and XML files, then use command line tools (Java Development Kit and Apache Ant are required) to create, build and debug Android applications as well as control attached Android devices (e.g, triggering a reboot, installing software package(s) remotely). Android applications are packaged in .apk format and stored under /data/app folder on the Android OS (the folder is accessible only to the root user for security reasons). APK package contains .dex files (compiled byte code files called Dalvik executables), resource files, etc.

Android Developer Tools and Android Studio

Google provides graphical development environments based on the Eclipse and IntelliJ IDE to develop new applications. The Android Developer Tools (ADT) are based on the Eclipse IDE and provide additional functionalities to develop Android applications. ADT is a set of components (plug-ins) which extend the Eclipse IDE with Android development capabilities. Google also supports an IDE called the Android Studio for creating Android applications. This IDE is based on the IntelliJ IDE. Both tools contain all required functionalities to create, compile, debug and deploy Android applications from the IDE. They also allow the developer to create and start Android virtual devices for testing and provide dedicated editors for Android specific files. Most of Android configuration files are based on XML. In this case, these editors permit you to switch between the XML representation of the file and a structured user interface for entering the data.

Dalvik Virtual Machine

The Android system uses a special virtual machine called Dalvik Virtual Machine to run Java based applications. Dalvik uses a custom bytecode format which is different from Java bytecode. Therefore, you cannot run Java class files on Android directly. They need to get converted in the Dalvik bytecode format.

Installing Android Developer Tools

Google provides a packaged and configured Android development environment based on the Eclipse IDE called Android Developer Tools. Download the complete SDK ADT bundle for windows from the following url which includes all required tools for Android development:


Extract the zip file and start the Android Developer Tools (Eclipse) which are located in the eclipse folder. You can do this, by double-clicking on the eclipse native launcher (e.g. eclipse.exe under Windows).

Thursday, September 5, 2013

What is Android and what are Android Platform Components?

Android

Android is a Linux-based operating system and the world's most popular, widely used mobile platform designed primarily for touchscreen mobile devices such as smartphones and tablet computers and developed by Android, Inc. Android, Inc. was founded in Palo Alto, California in October 2003 by Andy Rubin ,Rich Miner, Nick Sears and Chris White. The project responsible for developing the Android system is called the Android Open Source Project (AOSP) and is primarily lead by Google.
Android is an open source which allows the software to be freely modified and distributed by the device manufacturers and developers. Additionally, Android has a large community of developers writing applications ("apps") that extend the functionality of devices written primarily in a customized version of the Java programming language. In October 2012, there were approximately 700,000 apps available.

Android Platform Components

The Android system is a powerful development framework which is typically defined into following four areas:

1. Applications: The Android Open Source project contains several default core applications like the email client, sms program, calendar, maps, browser, camera, gallery and music phone which are written in the Java programming language.
2.  Application framework: API allow for high-level collaboration with the Android system from Android applications. Developers have full access to the same framework APIs used by the core applications. The application architecture is designed to simplify the reuse of existing components. Any application can publish its capabilities and other applications can make use of those capabilities.
3. Libraries and Android Runtime: Android contains a set of C/C++ libraries used by various components of the Android system for many functions such as graphic rendering, data storage and web browsing etc. These capabilities are exposed to developers through the Android application framework (API). Some of the core Andoid libraries are listed below:

System C library - a BSD-derived implementation of the standard C system library (libc), tuned for           embedded Linux-based devices.
Media Libraries - based on PacketVideo's OpenCORE; the libraries support playback and recording       of many popular audio and video formats as well as static image files including MPEG4, H.264, MP3,           AAC, AMR, JPG, and PNG.
Surface Manager - manages access to the display subsystem and seamlessly composites 2D and 3D         graphic layers from multiple applications.
LibWebCore - a modern web browser engine which powers both the Android browser and an                   embeddable web viewl.
SGL - the underlying 2D graphics engine.
3D libraries - an implementation based on OpenGL ES 1.0 APIs; the libraries use either hardware 3D         acceleration (where available) or the included, highly optimized 3D software rasterizerl.
FreeType - bitmap and vector font rendering.
SQLite - a powerful and lightweight relational database engine available to all applicationsl.

The Android Dalvik runtime environment consists of a set of core libraries and virtual machine. On conventional computing devices, software runs directly on the operating system kernel but an Android application runs in its own process with its own instance of the Dalvik virtual machine. Dalvik has been written so that a mobile device can run multiple instances of it in an efficient and well-organized manner. Dalvik is very similar to typical JVM. The Dalvik VM executes files in the Dalvik Executable (.dex) format which is enhanced for minimal memory outline. The VM is register-based and runs classes compiled by a Java language compiler that have been transformed into the .dex. The Dalvik VM relies on the Linux kernel for underlying functionality such as threading and low-level memory management.

4. Linux kernel: At the base of Android environment, there is an exposed Linux Kernel that works as a communication layer for the underlying mobile phone’s hardware. The current release of the environment uses Linux kernel version 2.6.

The Android architecture is portrayed in the following diagram:



I hope this article will be very helpful for you. Comments and criticize will be welcome!

Thursday, August 29, 2013

What is ASP.NET? Why ASP.NET is better than classic ASP and what are Directives in ASP.NET?

ASP.NET is not just the successor to Microsoft's Active Server Pages (ASP) technology whereas it is the next era of web development which was first released in January 2002 with version 1.0 of the .NET Framework. Basically, it is a server-side web application development framework designed for Web development to produce dynamic and attractive web pages. It was technologically advanced by Microsoft to allow programmers to construct dynamic web sites, web applications and web services. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to write ASP.NET code using any full featured supported .NET language such as C# or VB.NET to build web applications simply. Microsoft has created a wonderful well designed MSDN library for ASP.NET and all of the other .NET languages. It includes a full class library containing information and examples on every class, function, method, and property accessible through ASP.NET.

Featured ASP.NET is much better than Classic ASP because of following reasons:

1-  Classic ASP will interpret the script for a page on every page request whereas ASP.NET will compile the code for the page once.
2-  In ASP, you have to build a lot of functionality yourself while in ASP.NET many built in things are already there. You can spend fewer developer resources on building a more complex website in ASP.NET.
3-  ASP uses scripting language Jscript or VBscript and .Net uses complied language which makes ASP.NET superior in performance.
4-  ASP have mixed layout because it combines script code and HTML code whereas in .Net, there is a separation of code and HTML where many developers can work on the same page or file. So, ASP.NET is useful for programmers and designers.
5-  ASP.NET provides support for session, application and state management while Classic ASP has no real state management; you need to write additional code to achieve this.

Directives:

A directive is a special instruction or setting used by the page and user control which specifies on how ASP.NET should process the page. The most common directives are <%@ Page %> and <%@ Control %>, which can specify many attributes used by the ASP.NET page and control parsers and compilers. Directives can be located anywhere in an .aspx or .ascx file; however standard practice is to include them at the start of the file. Each directive can hold one or more attributes (paired with values) that are specific to that directive.

Below are examples for directive’s syntax:

<!-- directives -->
<%@ Page Language="C#" CodeFile="Default.aspx.cs" Inherits="Default" %>
<%@ Control Language="VB" EnableViewState="false" %>
<%@ Application Language="C#" %>
<%@ Assembly Name ="myassembly" %>
<%@ Implements  Interface="interface_name" %>
<%@ namespace="System.Drawing" %>
<%@ MasterPage Language="C#"  AutoEventWireup="true" CodeFile="SiteMater.master.cs" Inherits="SiteMaster"  %>
<%@ OutputCache Duration="15" VaryByParam="None"  %>
<%@ Reference Page ="somepage.aspx" %>
<%@ Register Src="~/footer.ascx" TagName="footer"  TagPrefix="Tfooter" %>