Thursday 13 December 2012

Android LifeCycle


    In android, an application doesn't have any control over its lifecycle.

        Life Cycle of an Android Application could be managed by Android Run-time Environment which provide some callback methods to notify the different change of state of an application.

As an application developer, our responsibility would be just to override these callback methods to handle the change of state of an application.

Activity LifeCycle
Different states are:-
  • Active State
  • Visible State
  • Inactive/Invisible State
These states can be managed using following methods:-
  • onCreate()
  • onDestroy()
  • onStart()
  • onStop()
  • onPause()
  • onResume()
To be continued........

PHP Introduction

PHP ( Hypertext Preprocessor)PHP is a language that has been growned so fastly. It was originally conceived as a set or collection of macros to provide help to the coders to maintain their personal home pages, and its name given from this purpose i.e. Personal(P) Home(H) Page(P). Since then, The capabilities of PHP have been extended, taking it beyond a set of utilities to a full-featured programming language, capable of managing huge database-driven online environments or say complete WEBSITE can be managed using PHP. As PHP's capabilities have grown, so its popularity is also increased. PHP was running on around 1 million hosts in Nov. 1999. And in Feb. 2000, that figure had already risen to 1.4 million hosts. According to  E-Soft, PHP is the only module which is most popular on Apache, beating even ModPerl.
Now, PHP is officially known as PHP - "HyperText Preprocessor". It is an server-side scripting language basically written in an HTML context or HTML tag. Unlike an ordinary HTML page, a PHP script is not sent directly to a client by the server. Instead, it is parsed by the PHP binary or module or PHP interpreter. HTML elements in the script are left alone, but PHP code is interpreted and executed. PHP code in a script can be used to query databases, create images, read and write files, talk to remote servers. The possibilities in PHP are endless.
PHP is one of the easiest Web Development Language in which a complete full functioning website can be Developed in a day or two days.
As it provides the simplest Keywords to manage database, to get User Input or to respond user back.

Now-a-days this is most required language in the web development market.

Sunday 9 December 2012

DVM(Dalvik Virtual Machine)

As we are familiar with the two major problems in mobiles,given as:-
i) Less Memory
i) Limited Battery Backup

Keeping these tow limitations in mind, we use Register Based Process Virtual Machine in Mobiles.
DVM is also an Register Based  Process Virtual Machine whereas JVM is an Stack Based Process Virtual Machine.

As in JVM, after compilation it gives BYTE Code which is platform-independant Intermidiate Code.

 Java File
(Compiled by java Compiler)
↓ 
Byte Code
(.class File)
↓ 
Dalvik Executable Code
(.dex File)

Just Like JVM, after compilation it generates DEX code i.e. Dalvik Executable Code which is also an platform independant Intermediate Code.

DVM Uses less memory for the execution of an instruction so that it is efficient in case of less memory as in mobiles.

Process Virtual Machine

Process Virtual Machine Continued.....

As you know, Process Virtual Machines are used to support an O.S. in the execution of an application.
e.g.
     JVM(Java Virtual Machine), CLR, DVM(Dalvik Virtual Machine), etc.
On the basis of its architecture, we have two types of Process Virtual Machine:-
  1.  Stack Based Process Virtual Machine
  2. Register Based Process Virtual Machine
 1) Stack Based VM :-  Stack based Process Virtual machines are faster and use Reduced Instruction Set (RISC Architecture).
e.g.
       JVM (Java Virtual Machine)
Main disvantage of this type of machines is that they require more memory.

2) Register Based VM :-  Register based process virtual machines are little bit slower than Stack Based Virtual Machine but take less memory to execute instruction.in comparison to Stack Based Virtual Machine.
e.g.
      DVM( Dalvik Virtual Machine)