Friday, February 15, 2019

Compare and contrast declarative and imperative paradigms.

Declarative programming:

is a programming paradigm that expresses the logic of a computation without describing its  control flow.

Imperative programming:

is a programming paradigm that describes computation in terms of statements that change a program state.

Difference between procedural programming and functional programming.  


Functional programming :

is a programming paradigm  a style of building the structure and elements of computer programs that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data.



Procedural programming :

  is a programming paradigm, derived from structured programming, based upon the concept of the procedure callThis paradigm helps to structure the code using blocks called procedures,routines,sub-routines,functions, methods.

  •A procedure can implement a single algorithm using the control structures.


 Lambda calculus and Lambda expressions in functional programming.


The lambda calculus is a prototypical functional programming language

  • Higher order function
  • No side effect


Mathematical logic for expressing computation based on   function abstraction and application using variable binding and substitution.

functional language achieve effect by applying functions.


“no side-effects” and “referential transparency” in functional programming.

no side-effects:
In computer science,a function or expression is said to have side effect,if it modifies some state outside its local environment.
In functional programming side effects are rarely used.


  Referential transparency:

Absence of side effects is a necessary, but not sufficient, condition for referential transparencyReferential transparency means that an expression can be replaced with its value.

The importance of referential transparency is that it allows the programmer and the compiler to reason about program behavior as a rewrite system . This can help in proving correctness, simplifying an algorithm, assisting in modifying code without breaking it, or optimizing code by means of memorization,common subexpression elimination.

 key features of Object Oriented Programming



Abstraction : It is the act of representing the essential features without including the background details.

Encapsulation : It is the wrapping of data and associated functions in one single unit.

Inheritance : It is the capability of one class to inherit properties from other class.

Polymorphism : It is the ability for data to be processed in more than one form.

event-driven programming is different from other programming paradigms


Event-driven programming is a program control flow is determined by events, such as sensor inputs or user actions or messages from other programs or threads.


Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications(JavaScript web application)that are centered on performing certain action in response to user input.This is also true of programming for device drivers.


In an event-driven application ,there is generally a main loop that listens for events,and then triggers a callback function when one of those events is detected.In embedded systems,the same may be achieved using hardware interrupts instead of a constantly running main loop.




 Different between compiled languages, Scripting languages, and Markup languages


  • Compiled language : is a programming language whose implementations are typically compilers and not interpreters .

  •  Scripting language : is a programming language that supports scripts—programs written for a special run-time environment that automates the execution of tasks that could alternatively be executed one-by-one by a human operator.

  • Markup language :is a computer language that uses tags to define elements within a document. It is human-readable, meaning markup files contain standard words, rather than typical programming syntax. 

virtual runtime machines


It is an emulation of a computer system. Virtual machines are based on computer architectures and provide functionality of a physical computer. Their implementations may involve specialized hardware, software, or a combination.

 How the JS code is executed 

Single threaded languages make use of only one CPU at a time, meaning only one thing can happen at a time.

Order of execution in JavaScript is dependent on the following components working together to pass and order information.
  • The Callstack
  • The Event Loop
  • The Task Queue
  • WebAPIs/External Resources

 How the output of an HTML document is rendered, indicating the tools  used to display the output.

example :

html file
<html>
<body>
<h1>Heading </h1>
<p>Hello world</p>
</body>
</html>

Print in webpage
Hello world

Different types of CASE tools


  • Workbenches  :    multiple tools are combined, focusing on specific part of SDLC

  • Environments : combines many tools to support many activities throughout the SDLC


                        framework




framework is a real or conceptual structure intended to serve as a support or guide for the building of something that expands the structure into something useful.

Framework is a collection of libraries, tools, rules, structures, and control, to build software systems


Difference between Framework Library and Plugins



The main difference between plugin and library is that a plugin is an extension that improves the capabilities of an application while a library is a collection of classes and functions that helps to develop a software.


plugin :

A plugin extends the capabilities of a larger application.


A plugin is a software that adds additional features to an application. 

Library :

 A library is a collection of subroutines or classes used to develop software. I think any component that instantiates its own database falls outside the scope of a library.

(set of classes and functions that are used by a computer program. )


 Difference between JDK and JRE

JDK : 
is the Java Development Kit, the full-featured SDK for Java. It has everything the JRE has, but also the compiler .
JRE :
is the Java Runtime Environment. It is a package of everything necessary to run a compiled Java program, including the Java Virtual Machine (JVM), the Java Class Library, the java command, and other infrastructure.




    No comments:

    Post a Comment