Programming paradigm and web programming

29
Programming Paradigm & Web Programming Group No. 03

Transcript of Programming paradigm and web programming

Page 1: Programming paradigm and web programming

Programming Paradigm &

Web ProgrammingGroup No. 03

Page 2: Programming paradigm and web programming

Special Thanks Md. Sharif Hossen

Lecturer, Dept. of ICTComilla University

Page 3: Programming paradigm and web programming

GROUP MEMBERS

Serial Name

Identification Number

01. Md Tanvir Ul Haque 1109017

02. Pradip Karmakar 1109021

03. Zakir Hossen 1109022

04. Murshida Jahan 1109023

05 Habibur Rahman 1109024

Page 4: Programming paradigm and web programming

Outline: • What is Programming Paradigm• Types of Programming Paradigm• What is web programming• How does it work• What are web programming languages• Module of Web Programming• HTML• CSS• JAVASCRIPT• PHP• ASP .NET• RUBY ON RAILS• JAVA• PYTHON

Page 5: Programming paradigm and web programming

Paradigm: A theory or a group of ideas about how something should be done, made, or thought about.

Programming Paradigm: Is a way to classify programming languages according to the style of computer programming .Features of various programming languages determine which programming paradigms they belong to; as a result, some languages fall into only one paradigm, while others fall into multiple paradigms.

Page 6: Programming paradigm and web programming

A paradigm is a way of doing something (like programming), and not a concrete thing (like a language). Now, it’s true that if a programming language L happens to may a particular programming paradigm P easy to express, then we often say “L is a P language”.

Example:

Page 7: Programming paradigm and web programming

TYPES

Page 8: Programming paradigm and web programming

Imperative ProgrammingControl flow in imperative programming is explicit: commands show how the computation takes place, step by step. Each step affects the global state of the computation.C,COBOL are imperative programming languages.

Sample code of c(addittion two number):

#include<stdio.h>int main(){ int a,b,sum; scanf("%d %d",&a,&b); sum=a+b; printf("sum is %d\n",sum);}

Page 9: Programming paradigm and web programming

Declarative ProgrammingControl flow in declarative programming is implicit: the programmer states only what the result should look like, not how to obtain it.SQL is one kind of declarative programming language.

Declarative programming is when we say what we want, and imperative language is when we say how to get what we want.

Declarative: small_nums = [x for x in range(20) if x < 5]

Imperative: small_nums = [] for i in range(20): if i < 5: small_nums.append(i)

Page 10: Programming paradigm and web programming

Functional Programming: In functional programming control flow is expressed by combining function calls, rather than by assigning values to variables.With functional programming•There are no commands.•Code is much shorter, less error-prone, and much easier to prove correct •There is more inherent parallelism, so good compilers can produce faster code

Page 11: Programming paradigm and web programming

Logic and Constraint Programming: Logic and constraint programming are two paradigms in which programs are built by setting up relations that specify facts and inference rules, and asking whether or not something is true (i.e. specifying a goal.) Unification and backtracking to find solutions (i.e. satisfy goals) takes place automatically.Languages that emphasize this paradigm: Prolog, GHC, Prolog, Vulcan, Polka, Mercury, Fnil.

Prolog code:grandparent(X, Y) :- parent(X, Z),parent(Z, Y).

Page 12: Programming paradigm and web programming

Object Oriented Programming:

OOP is based on the sending of messages to objects. Objects respond to messages by performing operations. Messages can have arguments, so "sending messages" looks a lot like calling subroutines. A society of objects, each with their own "local memory" and own set of operations has a different feel than the feel of non object oriented languages.java is one kind object oriented programming.

Page 13: Programming paradigm and web programming

What is web programming?

Web programming refers to the writing, markup and coding involved in Web development, which includes Web content, Web client and server scripting and network security. The most common languages used for Web programming are JavaScript, Asp.Net, PHP etc. Web programming is different from just programming, which requires interdisciplinary knowledge on the application area, client and server scripting, and database technology.

Page 14: Programming paradigm and web programming

How does web site programming work?

• Basically, we embed code within our normal HTML pages. Something like this:

Page 15: Programming paradigm and web programming

When we access web page with a browser, the web server will parse, or read through, the HTML page line by line and when it comes across a programming language, it will execute the code. In this case, it writes out the current date on the page and then sends the page back to web browser. The web browser just sees a normal web page with a date but the server will generate a different web page when it is loaded on a different date.

How does web site programming work?

Page 16: Programming paradigm and web programming

What are web programming languages?

All web programming is done with web programming languages. These languages can include static technologies like HTML, XHTML, CSS, JavaScript, and XML. However, most web site programming is done using server-side web programming languages. This code runs on the server and then gives static information back to the web browser. The most popular web programming languages are: PHP, ASP.NET, Ruby on Rails, Perl, ASP classic, Python, and JSP.

Page 17: Programming paradigm and web programming

Module of Web Programming

Front-End: 1.HTML2.CSS3.JavaScript

Back-End:1.PHP2.Java3.Asp.net4.Ruby on Rails5.Perl6.Python

Page 18: Programming paradigm and web programming

Hyper Text Markup Language(HTML)

HTML stands for Hyper Text Markup Language

A markup language is a set of markup tags

HTML tags are keywords surrounded by angle brackets like <html>

Page 19: Programming paradigm and web programming

CSS

CSS stands for Cascading Style SheetsCSS describes how HTML elements are to be displayed on screen, paper, or in other mediaCSS saves a lot of work. It can control the layout of multiple web pages all at onceExternal style sheets are stored in CSS files

Page 20: Programming paradigm and web programming

CSS Syntax

A CSS rule-set consists of a selector and a declaration block:

Page 21: Programming paradigm and web programming

JavaScript is a programming language used to make web pages interactive.

It is a scripting language. It runs on visitor's computer and doesn't

require constant downloads from website.

Are JavaScript and Java the Same?No, they are two completely different computer languages. Only their names are similar.

Java Script

Page 22: Programming paradigm and web programming

PHP is the coolest web programming language ever. PHP is a server-side, scripting language. It can be embedded within HTML and it is used to

create dynamic web pages or web applications. PHP code is interpreted by the web server which then

outputs a web page to the browsers that access on it

PHP's CapabilitiesPHP can be used on almost any platformIt can run Windows or Linux and many types of web servers including Apache and IIS. PHP can be used for managing email, connecting to other web sites or servers

PHP

Page 23: Programming paradigm and web programming

How PHP works with web server

Page 24: Programming paradigm and web programming

ASP.NET is the brainchild of Microsoft. It is a server-side web programming language that allows you to build dynamic web site, web applications, and web services. ASP.NET can be embedded within HTML or contained in a separate file. ASP.NET code is compiled and interpreted by the web server which then outputs the HTML code to the browser.

ASP.NET's capabilities: ASP.NET must be used on a Windows IIS server that has the .NET libraries installed. ASP.NET can be used for managing email, connecting to other web sites or servers, processing form information, storing information in a database, creating cookies in a web browser, and much more. It can connect to many types of databases but is most commonly used with a Microsoft SQL database.

ASP.NET

Page 25: Programming paradigm and web programming

It is the hippest web programming language of the decade. It is a free, server-side, web application framework that allows you to create dynamic web pages and web applications very rapidly. Ruby on Rails code is interpreted by the web server which then outputs a web page to the browsers that access it. It is becoming more and more popular as people begin to recognize its power to quickly design and implement web applications. The fundamental Ruby on Rails principles include Convention over Configuration (CoC) and Don't repeat yourself (DRY).

Capabilities:Ruby on Rails uses the Ruby programming language, and can be used on Windows or Linux variant servers but is particularly loved on Mac OS machines. Ruby on Rails can be used for any typical web programming function such as managing email, connecting to other web sites or servers, processing form information, storing information in a database, creating cookies in a web browser, and much more. It can connect to almost any type of database in the world but most commonly is used in conjunction with MySQL.

Ruby on Rails

Page 26: Programming paradigm and web programming

Python is the web programming language that the Google search engine was made with! Python is used to create dynamic web pages or web applications. Python code is interpreted by the web server which then outputs a web page to the browsers that access it.

Python is available on multiple platforms. It can be used for managing email, connecting to other web sites, processing form information, storing information in a database, creating cookies in a web browser, and much more. It can connect to almost any type of database but it has a strong relationship with its free database buddy, MySQL. Python supports object oriented, imperative, and functional programming models.

Python's Capabilities:

Python

Page 27: Programming paradigm and web programming

Conclusion:This is the end From this presentation we learn about the programming paradigmand Web programming languages.

Page 28: Programming paradigm and web programming

Any questions?

Page 29: Programming paradigm and web programming

Thank You all