Friday, February 15, 2019

Introduction to the Frameworks



Declarative paradigm is a programming paradigm, that expresses the logic of a computation without describing it's control flow.

Logic, functional and domain-specific languages belong under declarative paradigms and they are not always universal programming languages. Examples would be HTML, XML, CSS and SQL.


Imperative paradigm is a programming paradigm that uses statements that change a program’s state.

Procedural and object-oriented programming belong under imperative paradigm that we know from languages like C, C++, C#, PHP and Java.

_________________________________________________________________________________

Procedural programming  paradigm helps to
structure the code using blocks called
procedures, routines, sub-routines, functions,
methods. It provides modularity and code reuse. It is a imparitive programming paradigm.


Functional programming is 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. It is a declarative programming paradigm, which means programming is done with expressions or declarations instead of statements. Functional code is idempotent, the output value of a function depends only on the arguments that are passed to the function.



_____________________________________________________________


Lambda calculus is a framework developed by Alonzo Church in 1930s to study computations with functions.


Function creation

The notation λx.E to denote a function in which ‘x’ is a formal argument and ‘E’ is the functional body. These functions can be of without names and single arguments.


Function application

The notation E1.E2 to denote the application of function E1 to actual argument E2. And all the functions are on single argument.


Lambda calculus includes three different types of expressions, i.e.,

E :: = x(variables)

| E1 E2(function application)

| λx.E(function creation)

Where λx.E is called Lambda abstraction and E is known as λ-expressions.

_____________________________________________________________

No side-effect in Functional programming

The output of a function only depends on the inputs. Similar inputs always provide the same output. Execution of a function does not affect the global state of the system.

_____________________________________________________________

Key features of OOP

Encapsulation

Encapsulation refers to the creation of self-contained modules that bind processing functions to the data. These user-defined data types are called "classes," and one instance of a class is an "object".


Inheritance

Classes are created in hierarchies, and inheritance allows the structure and methods in one class to be passed down the hierarchy.


Polymorphism

Has the ability to process objects differently depending on their data type or class. for example , given a base class shape, polymorphism enables the programmer to define different area methods for any number of derived classes such as circles, rectangles and triangles.

_____________________________________________________________




Event-driven programming

Actions are defined on events which could be occurred by mouse click and moving or keyboard strokes. It is mainly focuses on selecting user interface.


_____________________________________________________________


Compiled languages

- End-results are compiled.
- Some executables can be directly run on the OS.
- Some executables use virtual runtime machines.


Scripting languages

- Source code is not compiled, it is directly executed.
- At the execution time, the code is interpreted by a runtime machine.



Markup languages

- Not compiled.
- No execution process.
- Interpreted at runtime.


_____________________________________________________________



Virtual runtime machine

The virtual machine function is a function for the realization of virtual machine environment. This function enables you to create multiple independent virtual machines on one physical machine by virtualizing resources such as the CPU, memory, network and disk that are installed on a physical machine.







Plugins
provide specific tools for development

• At development time the plugin (source code files, modules, packages,
executables, etc.) is placed in the project.

• Apply some configurations using code

• At runtime the plug-in will be invoked via the configurations

Example :








Libraries
provide an API, the coder can use it to develop some features, when writing code

•At development time
Add the library to the project (source code files,
modules, packages, executables, etc.)

•Call the necessary functions/methods using the
given packages/module/classes

•At runtime the library will be called by the code.




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

At development time
     Create the structure of the application
     Place your code in necessary places
     You may use the given libraries to write your code
     You can include additional libraries and plugins

At runtime
    The framework will call your code (inverse of control).


No comments:

Post a Comment

Client - side Development II - RiWAs

Key features of RiWAs Direct interaction:  In RiWAs, users can interact directly with page elements through editing or drag-and-drop too...