Wednesday 16 November 2016

What is Platform, Platform Dependent Applications and Platform Independent Applications?

Platform:

  1. It is an environment under which an application executes.
  2. A platform is a combination of operating system and microprocessor.
Fig: Platform

Platform Dependent Applications:

Applications that are developed by using languages that are existing in the market before 1995 are platform dependent applications only i.e. these applications when developed targeting in operating system cannot execute on other operating system.
Example: C++ Language (Windows Operating System

Source Code –> Compiler –> Machine Code (.exe)

In the above case, whenever we compile the source code, the machine code will be generated and the machine code will be executed by the operating system.

So, machine code is prepared for one operating system will not execute on other operating system which is known as platform dependency.

Note: Any application that directly sits on operating system is dependent on the operating system. 


Platform Independent Applications:

  1. Applications that are developed by using Java and .NET languages are platform independent languages i.e. any application developed by using this language can execute on multiple operating system.
  2. In case of these languages, the source code when compiled will first convert into intermediate code (semi-finished) and this intermediate code when installed on any machine with any operating system will convert into machine code according to the platform of that machine with the help of a special software.

    Java Language (Windows)


     Source Code –> Compile –> Byte Code

     Byte Code –> JVM (Java Virtual Machine) –> Machine Code

     In the case of Java, semi-finished code is known as Byte Code and the software which converts     byte code into machine code is known as JVM (Java Virtual Machine).

Fig: Platform Independent(In case of Java)

      .NET Languages (Windows):

      Source Code –> Compiler –> CIL Code or MSIL Code

      CIL Code –> CLR –>Machine Code

      Where: CIL is Common Intermediate Language, MSIL is Microsoft Intermediate Language and        CLR is Common Language Runtime.

    .NET is a collection of programming language (i.e. 30 + languages) which gives a chance for the         programmer to choose the language according to their taste but whatever .NET language we use        for developing the applications will first convert into the same type of output code known as CIL or    MSIL and this CIL code when installed on the client machine will be converting into machine code    with the help of CLR.

Fig: Platform Independent Applications (In case of .NET)
Note: Java’s JVM and .NET CLR are platform dependent i.e. we require to install them separately for each operating system.







No comments:

Post a Comment