Introducton To Framwork
Different approaches to the development process tend to
establish programming paradigms. By the
paradigm in this case we mean a class of programming languages that is formed
according to the style of programming. A paradigm can be concerned with the way
the code is organized or with the style of syntax and grammar. Some languages
relate to only one paradigm, others – to multiple paradigms.
Ok First We learn About Imperative paradigm.
Imperative paradigm is a programming paradigm uses
statements that change a program's state. It is based on the von Neumann-Eckley
model of a computer.
In
much the same way that the imperative mood in natural languages expresses
commands, an imperative program consists of commands for the computer to
perform. Imperative programming paradigm focuses on describing how a program operates.
Imperative paradigm is the oldest Programming paradigm. Procedural abstraction
And Structured programming Are its design Techniques. It is
one of the oldest programming paradigm.
paradigm Advantage:
1. Simple implement
2. Contains Loops
1. Less
efficient and less productive.
2. Parallel programming is not possible
3. Complex problem cannot be solved
Then we learn about declarative paradigm.
Declarative paradigm Advantage:
1. Increased Performance
2. Reduced Number Of Errors
3. Improved readability of our code
Declarative paradigm Disadvantage:
1. Take a lot of Ram
Now we discuss the procedural programming and functional programming.
procedural programming
is a programming paradigm, derived from structured programming based upon the
concept of the procedure call. Procedures, also known as routines, subroutines,
or functions, simply contain a series of computational steps to be carried out.
Any given procedure might be called at any point during a program's execution,
including by other procedures or itself. The first major procedural programming
languages first appeared circa 1960, including FORTRAN, ALGOL, COBOL and BASIC
Languages.
i.e., changes in state that do not depend on the function
inputs, can make it much easier to understand and predict the behavior of a
program, which is one of the key motivations for the development of functional
programming.
- Often recursive.
- Always returns the same output for a given input.
- Order of evaluation is usually undefined.
- Must be stateless. i.e. :-. No operation can have side effects.
- Good fit for parallel execution
- Tends to emphasize a divide and conquer approach.
Example of Functional Paradigm
Functional programming focuses on expressions
Procedural programming focuses on statements
Ok Geeks Now we are going to look about Lambda calculus and Lambda expressions in functional programming.
Lambda calculus is a prototypical functional programming language.
-
Higher Order
Function
-
No side effect.
Lambda expressions are not only a powerful way to
provide a shorthand notation for anonymous methods, but they are also used in
functional programming. In this section, we will go through the advantages of
using the lambda expression in the context of functional programming.
Let’s we
talk about “no side-effects” and "referential transparency" in functional programming?
Referential transparency and
referential opacity are properties of parts of computer programs. An expressions is called referentially transparent if it
can be replaced with its corresponding value without changing the program's
behavior.
This requires that the expression is pure,
that is to say the expression value must be the same for the same inputs and
its evaluation must have no side effects. An expression that is not
referentially transparent is called referentially opaque.
Now we
discuss the key features of oop.
Object-oriented programming is paradigm based on the concept of "objects", which may contain data, in the form of fields, often known as attributes; and code, in the form of procedures, often known as methods. A feature of objects is that an object's procedures can access and often modify the data fields of the object with which they are associated (objects have a notion of "this" or "self"). In OOP, computer programs are designed by making them out of objects that interact with one another. There is significant diversity of OOP languages
1. Encapsulation -Hide unnecessary details in classes and deliver a simple and clear interface for working.
2. Inheritance - explain how the class hierarchies develop code readability and support to the reuse of functionality.
3. Data Abstraction - to deal with objects since their important features and ignore all other details.
4. Polymorphism - explain how to work with different object in the same manner, which explain the specific implementation of some abstract behavior.
Encapsulation
The process, or mechanism, by which you combine code and the data it manipulates into a single unit, is commonly referred to as encapsulation. Encapsulation provides a layer of security around manipulated data, protecting it from external interference and misuse. In Java, this is supported by classes and objects.
Inheritance
New data types (classes) can be defined as extensions to previously defined types. Parent Class (Super Class) Child Class (Sub Class) Subclass inherits properties from the parent class. Parent Child
Polymorphism
Polymorphic which means 'many forms' has Greek roots. Poly ' Many, Morphos ' forms in object oriented programming Polymorphism means that it has many forms.
Polymorphism allows an object to be processed differently by data types and/or data classes. More precisely, it is the ability for different objects to respond to the same message in different ways. It allows a single name or operator to be associated with different operations, depending on the type of data it has passed, and gives the ability to rede'ne a method within a derived class.
In the above figure 4, it is shown that a simple thread could be transformed into different shapes same way polymorphism means that it could change to many different types.
Data abstraction
Abstraction is a concept which facilitates to extract out the essential information of an object. In OOP (Object orients programming), Abstraction Facilitates the easy conceptualization of real world objects into the software program.
Abstraction facilitates the easy conceptualization of real world objects, by eliminating the unnecessary details of the object. Unnecessary details? Yes, all the similar objects when you generalize, you will drop the uncommon details about the objects.
Event-driven
programming is a programming paradigm in which the flow of the program is
determined by events such as user actions (mouse clicks, key presses), sensor
outputs, or messages from other programs or threads. Event-driven programming
is the dominant paradigm used in graphical user interfaces and other
applications (e.g., JavaScript web applications) that are centered on
performing certain actions in response to user input. This is also true of
programming for device drivers.
Event-driven
programming contain some elements of object-oriented programming. But not all !.
Programming
languages are those that their end results are compiled. You most certainly use
IDEs (Integrated Development Environments) to make use of these languages. If u
think about it their examples are as follows : Java, visual basic, C, C++, C#,
etc.Markup languages are languages that are not in any way executed or used to
perform actions but they are used to structure data, identify data or present
data as the case may be. Examples are HTML(defines web content), XHTML(same
with html but with some differences) , XML(for structuring data, in some cases
for defining UI structure as its used in Android app development),
etc.Scripting languages are languages that are not compiled, more like
interpreted at run-time. It's like a file containing instructions for a
computer to follow to carry out a task. Think of it like this. If you were to
feature in a movie, u will definitely be given a script to read, memorize and
follow. Hence the script becomes your guide to perform your roles in that
movie.It's as simple as that. Example of scripting languages are javascript, VB
script, Perl, python, php, she'll script, etc.




Comments
Post a Comment