Friday, February 15, 2019

contrast declarative and imperative paradigms

what is the declarative and imperative paradigms👦👦👦👦


   Declarative programming languages do not attempt to control the flow of a program.They establish desired results i.e. specifying what they want to happen but not how it should happen.

  HTML is an example of declarative programming because it does not attempt to control the flow of a program.It simply states what it would like to appear but not how it is done. 
Imperative programming languages,on the other hand,do attempt to control the flow of a program.They establish commands that will tell the compiler how they wish the code to run but not explicitly what they want to happen.


Difference between procedural programming and functional programming

What's that👦👦👦👦

Procedural programming uses a list of instructions to tell the computer what to do step by step. Procedural programming relies on procedures, also known as routines. A procedure contains a series of computational steps to be carried out. Procedural programming is also referred to as  imperative orstructured programming.A common technique in procedural programming is to repeat a series of steps using iteration.This means you write a series of steps and then tell the program to repeat these steps a certain number of times.This makes it possible to automate repetitive tasks.

Functional programming is an approach to problem solving that treats every computation as a mathematical function. The outputs of a function rely only on the values that are provided as input to the function and don't depend on a particular series of steps that precede the function.This is similar to the use of iteration in procedural programming, but now applied to a single function as opposed to a series of steps.
Programming Languages that support functional programming: Haskell, JavaScript, Scala, Erlang, Lisp, ML, Clojure, OCaml, Common Lisp, Racket

       Advantages:
     


  1. Testing and debugging is easier. Since pure functions take only arguments and produce output, they don’t produce any changes don’t take input or produce some hidden output. They use immutable values, so it becomes easier to check some problems in programs written uses pure functions.
  2. It is used to implement concurrency/parallelism because pure functions don’t change variables or any other data outside of it.

Disadvantages:
1. It is used in mathematical computations.
2. It is needed where concurrency or parallelism is required.



You can follow this link to easy to understand




 Lambda calculus and Lambda expressions in functional programming


 Lambda calculus
              Lambda calculus is important in programming language theory, and the symbol λ has even been adopted as an unofficial symbol for the field. It can be considered the smallest universal programming language: any computable function can be evaluated in the context of λ-calculus and evaluating programs in the language consists of a single transformation rule: variable substitution.
Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions.

Lambda expressions


        Lambda expressions are essentially blocks of code that can be assigned to variables, passed as an argument,or returned from a function call,in languages that support high order functions.They have been part of programming languages for quite some time.
Lambda expressions are also called closures because they access state from its surrounding lexical scope and lambdas simply as anonymous functions, but when you study them closer,lambda expressions carry a lot more meaning and are a lot more powerful than you think.

  • The body of the function should contain an expression, rather than a statement.
  • May contain a call to a function procedure but cannot contain a call to a subprocedure.
examples:- Lisp,Ruby,Scala,Python,Java and JavaScript.


 What is meant by “no side-effects” and “referential transparency” in functional programming

What's No Side-Effect👦👦👦👦


What's referential transparency👦👦👦👦


       Referential transparency is a property of a specific part of a program or a programming language, especially functional programming languages like Haskell and R. An expression in a program is said to be referentially transparent if it can be replaced with its value and the resulting behavior is the same as before the change.Referential transparency requires that functions be free of anything that can modify the behaviour of the program outside of the function.This means that the program's behavior is not changed whether the input used is a reference or an actual value that the reference is pointing to get.


key features of Object Oriented Programming

4 major principles that make alanguage object-oriented: Encapsulation, Data Abstraction,
Polymorphism and Inheritence.

Data abstraction

Simple idea behind this OOP concept is like information hiding.
Data abstraction means presenting the essential information and features in a secure way. Which means the programmer hides all but the relevant data about an object in order to reduce complexity and increase efficiency.
This is used to define a data type available in the programming language,called as abstract data type(ADT).It consists of a set of values and a set of operations.

Encapsulation

Encapsulation is one of the main concept which is used in OOP. 
It is common to all its objects.
It describes the idea of bundling data and methods that work on that data within one unit.This            concept is also used in OOP to hide the internal information.The data can’t access the outside world.

Inheritance

Simply it gives the idea about the parent and child relationship.Which means everything that the 
parent has, will be inherited by the child. So in java, each class can only be derived from one other class and it is called superclass or parent class.
The new class will possess features of both the classes.
The derived class is called subclass, or child class. By using the keyword “extends” we can inherit 
from one class to another.

Polymorphism

The simple idea behind this concept is the ability to ability of an object to take on many forms.
It holds an ability to take more than one form.
Commonly in oopoccurs when a parent class reference is used to refer to a child class object.


How the event-driven programming is different from other programming paradigms

What's event-driven programming👦👦👦👦

A computer programming paradigm in which control flow of the program is determined by the occurrence of events. These events are monitored by code known as an event listener.Extension of interrupt-driven programming of the kind found in early command-line environments such as DOS, and in embedded systems .If it detects that an assigned event has occurred, it runs an event handler.Event-driven programming is the dominant paradigm used in graphical user interfaces and other applications that are centered around performing certain actions in response to user input



Compare and contrast the Compiled languages, Scripting languages, and Markup languages

Compiled languages


       programming language whose implementations are typically compilers (translators that generate machine code from source code), and not interpreter.
Low-level programming languages are typically compiled, especially when efficiency is the main concern, rather than cross-platform support.
Before the execution, the compilation process will happen and then the execution will continue. Some executable files run on directly on the OS or virtual run time machine.


Scripting languages



A programming language that employs a high-level construct to interpret and execute one command at a time.A generally, scripting languages are easier to learn and faster to code in than more structured and compiled languages such as C and C++.
It is directly executed. At the execution time, the code is interpreted by the run time machine and do not convert the language into machine code.
 Some of the most widely used scripting languages are JavaScript, VBScript, PHP, Perl, Python, Ruby, ASP and Tcl.


Markup languages




A markup language is a type of language used to annotate text and embed tags in accurately styled electronic documents, irrespective of computer platform, operating system, application or program.
These files are saved in plain text. So they can be viewed in a standard text editor.
example:-HTML,XML


Discuss the role of the virtual runtime machines




 Virtual machines are often created to perform certain tasks that are different than tasks performed in a host environment.The virtual machine is sandboxed from whatever remains of the framework, implying that the product inside a virtual machine can't escape or mess with the PC itself.A virtual machine is a PC document, commonly called a picture, that carries on like a genuine PC. As it were, making a PC inside a PC. It keeps running in a window, much like some other program, giving the end client indistinguishable experience on a virtual machine from they would have on the host working framework itself.This delivers a perfect domain for testing other working frameworks including beta discharges, getting to infection tainted information, making working framework reinforcements, and running programming or applications on working frameworks they weren't initially expected for.

some of the advantages of a virtual machine include:
  • Allows multiple operating system environments on a single physical computer without any intervention
  • Virtual machines are widely available and are easy to manage and maintain.
  • Offers application provisioning and disaster recovery options
 Each virtual machine gives its very own virtual equipment, including CPUs, memory, hard drives, arrange interfaces, and different gadgets. 



Find how the JS code is executed (What is the runtime? where do you find the interpreter?) 





Explain how the output of an HTML document is rendered, indicating the tools used to display the output





 Identify different types of CASE tools, Workbenches, and Environments for different types of software systems 


What's CASE tools👦👦👦

The software system is developed by the engineers and analysts by using the set of the software program tools known as CASE tools.The software product is developed and maintained by using different automated tools referred as software CASE tools. CASE refers to Computer Aided Software Engineering.In the process of software development, further proceeding to the next level of development, the gaps and errors if any are identified and recovered in order to come up with the product that best suits the user requirements.


  • Upper Case Tools – These tools are used in the planning, analysis and design stages of SDLC.
  • Lower Case Tools – These tools are used in implementation, testing and maintenance stages of SDLC.
  • Integrated Case Tools – These tools are used in all the stages of SDLC.
What's Environments of software systems 👦👦👦👦

The Systems Development Life Cycle (SDLC) is a software engineering framework that is used to describe the various phases used to develop an information system. These phases include planninganalysisdesigndevelopmenttesting and implementation. SDLC environments describe the activities and tools required to perform a particular process within the SDLC. They are also defined as controlled points where software engineers can carry out activities related to development, testing, installation, and configuration.

The main SDLC environments include:
  • The Analysis and Design Environment
  • The Development Environment
  • The Common Build Environment
  • The Testing Environment: This has two components:
    • The Systems Integration Testing Environment
    • The User Acceptance Testing Environment
  • The Production Environment


The difference between framework, library, and plugin



What's framework😃😃😃😃

A collection of libraries, tools, rules structures and control to build a system.
The main  difference between framework and library is, Inversion of control. When you call a function/ method from a library, you are the one who in control. But when in the frameworks, when we call a method/ function, the one who in control is the  framework.
 A framework is normally more complex. It defines a skeleton where the application defines its own features to fill out the skeleton

What's library

A library is just a collection of class definitions and functions that helps to develop a software. that can be used in a program. Moreover, the programmer can use a library in his program without knowing the internal implementation of that library.The classes and methods normally define specific operations in a domain specific area.Libraries provide an API. The coder can use libraries to develop some features.
w

What's plugin


The main difference between plugin and library is that a plugin is an extension that improves the capabilities of an application.we have to apply some configurations using our code. Then at the run time, the plugins will be invokedPlugins provides specific tools for development.A plugin is an add-on for a software program that adds new functionality to it.


Follow that link to easy to unserstand this

















  



No comments:

Post a Comment