Pages

Thursday, March 12, 2009

PHP - an Introduction

PHP right now is the most popular
and mainstream opensource web programming
language in the internet.

Many internet hosting companies provides PHP support capabilities.
Usually PHP is considered as a part of LAMP stack,
a full application development architecture, that comprises
of open source products as it's components.
L: Linux, for the OS.
A: Apache, for the web server.
M: MySQL for the database server
P: PHP for development languange.

PHP's roots comes from the need to make
a CGI web programming languange that is
simple, flexible, structured, and understandable,
comparable to other CGI solution on that time
(mainly Perl, C binaries, shell script)

Features of PHP language:

Flexible type system
Only 3 data type exist, this makes creating and using
data structures flexible and fast:

-Scalar/primitives: holds int, float, string, boolean values,
can be forced to cast if needed.
-Dynamic array for collections, can be used as
array, list, hashmap.
-Class/object: object type, for further abstractions (OOP)

Interpreted
-Like it's predecessor perl, PHP is an interpreted languange, with
it's interpreter run on the web server.

Wide development support
-Many official, third party, or user submitted libraries,
that freely available.

PHP Versions

PHP 4:
-Early OOP support:
Class, Constructor, attribute, method, inheritance

PHP 5:
-Full OOP support:
Exception, Interface, visibility scoping (public, private, protected)

Noted PHP Libraries:

PEAR: repository of many useful classes

Application Frameworks:
Library that provides framework and support libraries that
enables a fast application development.
Commonly supports MVC (Model, View, Controller) paradigm.

Example:
-CodeIgniter
-CakePHP
-Zend Framework

Templating Libraries:
Library that focuses on separation of code and presentation,
or simply templating. (the View component of MVC)

Example:
-TinyButStrong
-Smarty

Database access libraries:
Library that provides access to many DBMS systems.

Example:
-PEAR DB
-ADODB
-Propel (an ORM library)

Editors
-Mainly developers use plain text editor for
their development. But there are also professional
solutions that provide powerful IDE functionalities.

Example:
-UltraEdit
-Notepad++
-Zend Studio: professional PHP IDE from Zend, based on eclipse platform,
provides code completion, syntax highlighting,
and other basic eclipse IDE features.

Besides libraries, there are application development
software package that combines full stack of web application
for PHP, with its components: PHP, Apache web server,
MySQL database server, PEAR libraries.

This package can be run in a windows systems, so there's
no need to installing and configuring multiple components before
you can start development. The package already manages it for you.

Example:
-XAMPP
-Uniform Server

There are many popular application software that was built using PHP,
and widely deployed on the internet as internet sites.

Example:
-CMS Systems: for making simple to complex websites. Eg: Joomla, Mambo
-Blogging: Wordpress
-Community Forum: phpBB, IPB (Invision Power Board)

--oo00oo--

No comments:

Post a Comment