Software engineering aims to provide the same rigour to the development of software that is applied to other objects of engineering such as bridges and aircraft. The widespread use of computer programs in controlling things like aircraft, health services and transportation makes it imperative that software systems are as robust and free of bugs as possible: anything less and people's lives may be at risk.
In the 1970s and early 1980s the prevailing methodology in software development was structured or modular programming, the kind of approach found in languages such as Pascal, C and early versions of Visual Basic. The strategy when programming in these languages is to break a large problem down into smaller sub-problems until a level is reached where code can be produced. This approach also came to be known as 'top-down design', as opposed to the 'bottom-up' approach where small problems are solved without reference to a wider picture. The top-down approach has weaknesses such as:
The top-down approach is still around in the form of systems analysis, big projects are tackled by specifying their aims and objectives and working towards a solution, but its prime position has been eroded by the growth of object-oriented programming languages. The kind of tools now available for programming, often constructed along OOP principles, allow much faster development of code and for this reason they are often called 'Rapid Application Development' (RAD) tools. Using these tools it is possible to produce prototype solutions to problems very quickly (sometimes called 'extreme programming'). Also, the life-cycle of products in the market place has shortened (think mobile phones!) so that it is no longer possible to go patiently through all the stages of the systems design process to produce software.
In the object-oriented approach the most basic methods and data structures are established first and new objects are built up from them. RAD tools, built in object-oriented fashion from the ground up, include many objects and controls that have been thoroughly tested and need no further development. On the other hand third party developers provide extensions to the existing framework and the tools themselves are designed to be extended. This has led to the combination of bottom-up methods with the long-established top-down methods so modern software development is a hybrid of the two.
A key feature of the object-oriented approach is that modules can be 'plugged in' to the existing code in such a way that the module does its job correctly without creating any problems. The details of the module, how it does its job, are unimportant and are hidden from users and possibly from other programmers as well. This is called 'information hiding' and it is an important part of modern programming methodologies (it is central, for example, to the Ada programming language, which is much used by the military). Only the interfaces of modules are available for use by programmers who want to incorporate the code in their own systems.
This is a considerable advantage over older languages that lack these features because it promotes the safe reuse of existing code. When you use components in a programming language system like Delphi you are doing just this, reusing code that has been written by professional developers to provide you with the tools to build end-user applications.
The three principles on which OOP is based are encapsulation, inheritance and polymorphism.
| Encapsulation | Inheritance | Polymorphism |
| TList | TStringList | Questions |
To complete your understanding of OOP read the five sections under 'Object Orientation Basics' on the DelphiBasics web site and then answer these questions.
There are also some video titles listed on the A2 list. Check out OOP on Wikipedia. Then you can progress to a whole book (actually a web page on About.com). If you want to learn Objective C for iPhone or iPad look here.