PHP and OOP

Bookmark on del.icio.us

PHP is mainly a procedural programming language. Procedural programming is so called because the program code gives a set of instructions (i.e. an algorithm) for processing a particular task or set of tasks.

When programming in a procedural manner, the programmer usually breaks down the task/tasks in a top-down manner; this means the program will end up being made of a number of function calls, which can in turn call further functions or tasks.

In procedural programming data is of secondary importance and is normally placed into structures (data structures). As we would expect this data is global to the whole program, allowing us to see and access every function or procedure in the program, each of which will be able to change that data.

This is a very important concept; it means that whenever we change the format of any data structure in our program, all the other procedures and functions that operate on that data will also have to be changed. This can lead us to have to make numerous changes, something we really wouldn’t like to happen when developing software of any type.

PHP is mainly a procedural programming language. Procedural programming is so called because the program code gives a set of instructions (i.e. an algorithm) for processing a particular task or set of tasks.

When programming in a procedural manner, the programmer usually breaks down the task/tasks in a top-down manner; this means the program will end up being made of a number of function calls, which can in turn call further functions or tasks.

In procedural programming data is of secondary importance and is normally placed into structures (data structures). As we would expect this data is global to the whole program, allowing us to see and access every function or procedure in the program, each of which will be able to change that data.

This is a very important concept; it means that whenever we change the format of any data structure in our program, all the other procedures and functions that operate on that data will also have to be changed. This can lead us to have to make numerous changes, something we really wouldn’t like to happen when developing software of any type.

  1. No comments yet.

  1. No trackbacks yet.