CSC 202 Chapter 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

FEDERAL UNIVERSITY OF TECHNOLOGY, AKURE (FUTA)

CSC 202

COMPARATIVE PROGRAMMING
LANGUAGES

Department of Computer Science


LECTURE 1

INTRODUCTION TO PYTHON AND PHP

JOMO CARES
PREAMBLE
⊡ There has been an upsurge in the number and varieties of programming languages
over the years. This is due mainly to some reasons which include but not limited to
the following:
i. Advancement in electronic technology which in turn leads to increased
miniaturization of computer hardware. This phenomenal growth has also made
computing devices to be more portable and affordable.
ii. Advent of mobile computing devices has also led to change is programming
paradigm
iii. Computer network and the internet have made computing to be applied beyond the
limit of traditional area of scientific and engineering applications.
iv. Growth in multimedia applications
v. Growth of e-commerce and m-commerce
vi. Every aspect of human endeavor is becoming more knowledge-based and
knowledge-driven
vii. Increased digitization of human activities
PREAMBLE CONTD.

• Thousands of programming languages have evolved, each trying to


provide solution to address particular needs of the computing world
and the society at large.
• In developing computing application for solving a problem,
programmers are faced with decision to choose the appropriate
programming language to adopt.
• There is therefore, the need to study the features of alternative
programming languages available in solving a particular problem.
• In this course, a comparative study of Python and PHP is presented.
Background Information to Python

Developed by Guido van Rossum in the Netherlands in the late ‘80s .


Python 2.0 was released on 16 October 2000. However, even though Python 3 has been released since
3rd of December 2008, Python 2.7 still remains the most stable version and will be used throughout this
class.
It is an open-source, general-purpose, and high level programming language with remarkable power.
Simple, clean, readable and yet compact syntax.
Easy to learn and very well suitable for learning to program.
Due to its large user community, Python is experience continuous development .
Highly compatible with many leading programming languages and frameworks such as Java, C/C++,
C#.NET etc.
See www.python.org for more information on the Python language.
Features of Python
Python possesses many interesting technical and aesthetic features.
Support multiple programming paradigms e.g. structured, object-oriented, and functional
programming
Open Source
Interactive: provides interactive command line interface for instantaneous scripting
Easily extensible: third-party codes/library can easily be integrated
Interpreted language
Dynamic language: supports dynamic typing of variables, and objects and doesn’t require static
declaration of variables to be of particular types.
Platform independent i.e. Python can run on Windows, Apple Mac, Solaris, Linux etc.
Large library of codes: many special purpose third-party libraries are available
Support varieties of data structures and built-in types e.g. tuples, list, dictionaries, decorators, iterators
etc.
Large user support community
Background information to PHP
 Started as a Perl hack in 1994 by Rasmus Lerdorf, developed to PHP/FI (Personal Homepage/Form
Interpreter) 2.0
 Version PHP 3.0 was developed in 1997 with a new parser engine by Zeev Suraski and Andi Gutmans
changing the language’s name to recursive acronym PHP: Hypertext Preprocessor.
 New versions are being developed with improvements on previous versions including new features.
The latest version is PHP 7.2 released on 30 November, 2017
 PHP (Hypertext Preprocessor) is a widely-used open source general-purpose scripting language (i.e
gets interpreted) suited for web development and can be embedded into HTML.
 PHP scripts are executed on the server, makes the server generate dynamic output that is different
each time a browser requests a page. PHP is compatible with almost all servers used today (Apache,
IIS, etc.)
 PHP is free to download and use.
 PHP supports a wide range of databases and runs on various platforms (Windows, Linux, Unix, Mac
OS X, etc.)
Features of PHP
 PHP files can contain text, HTML, CSS, JavaScript, and PHP code
 PHP code are executed on the server, and the result is returned to the browser as plain HTML
 PHP files have extension ".php"
 Can be downloaded from the official PHP resource: www.php.net
 The Five important characteristics that make PHP’s practical nature possible are:
Simplicity, Efficiency, Security, Flexibility, and Familiarity.

USES OF PHP
 PHP can generate dynamic page content
 PHP can create, open, read, write, delete, and close files on the server
 PHP can collect form data
 PHP can send and receive cookies
 PHP can add, delete, modify data in your database
 PHP can be used to control user-access
 PHP can encrypt data
Development Tools

PYTHON PHP
Text Editor  Text Editor
Notepad, Notepad++, Sublime Text 2, EditPad etc  Notepad, Notepad++, Sublime Text 2,
Integrated Development Environment EditPad etc
Python IDLE, Eclipse, EditPadPro, GEdit, JEdit, Komodo  Integrated Development Environment
IDE, Netbeans, PythonToolKit etc.  Eclipse PDT, phpDesigner, PHPEclipse,
Python Interpreter : www.python.org/download/ PhpED, PHPEdit, Komodo IDE, Netbeans,
etc.
 Web Server
 Database e.g MySQL

JOMO

You might also like