describe the application and limits of procedural, object orientated and event driven programming

7
Describe the application and limits of procedural, object orientated and event driven programming.

Upload: donna-mccoy

Post on 24-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Describe the application and limits of procedural, object orientated and event driven programming

Describe the application and limits of procedural, object orientated and event driven programming.

Page 2: Describe the application and limits of procedural, object orientated and event driven programming

The applications of procedural programming.

Procedural programming languages breaks up the programming task into a number of procedures (also sub-routines or functions). Each procedure carries out a specific task and is called from the main program.

The procedural approach is relatively easy to understand and is therefore often used when first learning programming. It is also suitable for systems that are fairly straightforward and don’t involve many different interacting sub-systems.

Procedural programming is specific to calculating scientific and engineering uses. It is used for calculations. It consists of a fluid movement throughout the program as it runs.

This is great for straightforward systems which don’t involve many different interacting sub-systems.

An example of a procedural programming language is C, Pascal and PHP.

Page 3: Describe the application and limits of procedural, object orientated and event driven programming

The limitations of procedural programming

There are limitations to what you can do with procedural programming. When you are using procedural programming you do not have much flexibility with it. It has to be one straight programming with calculations done precisely.

Another limitation is that procedural programming will eventually become lots of lines of code that can be confusing to go through. If there is a bug in the program it will take awhile to go through the lines of code to find the problem.

Procedural programming is tightly packed. What I mean is without one line of code the program will not work. If you are to change part of the program you will need to change other parts in order for it to work correctly.

Page 4: Describe the application and limits of procedural, object orientated and event driven programming

Object-orientated programming.The applications of ,

Object-orientated programming takes a different approach to the structure of a complex program. This type of programming was created in response to the difficulties to creating highly complex systems.

In object-orientated programming, the programmer uses objects rather than procedures.

This helps to make complex programs more easy to program.

An example of object-orientated programming is Ruby, smalltalk and python.

What object-orientated is mainly used for is user interface design, real time systems and object orientated database.

Page 5: Describe the application and limits of procedural, object orientated and event driven programming

Limitations to object-orientated programming.

With object-orientated programming, it has a steep learning curve. It can take time to get use to. It is also complex to create programs based on interaction of objects.

Object orientated programming typically involves more lines of code than procedural.

As well as this , it makes the program become slower , as they require more instructions to be executed

Object-orientated programming limits the programs you can write , this is be cause not all programs can be modelled accurately by the objects model.

Page 6: Describe the application and limits of procedural, object orientated and event driven programming

Applications of event-driven programming.

One key upside of using event-driven programming is that it can be written in almost any programming language as it is a style of programming which splits the program into handles which are triggered when an input is made.

Another application of event-driven programming is that it is useful for GUI programs

Event driven programming is widely used in almost all windows programs. This is because windows programs will wait for your input in order to do something.

Event- driven is also used in operating systems and internet browser software. This is because event driven works with inputs and objects , using event driven for these will be the best type of programming to use.

The flow of event-driven programming can be seen as random. What I mean by this is that it is usually less logical

Page 7: Describe the application and limits of procedural, object orientated and event driven programming

Disadvantages of event-driven programming.

A disadvantage of using event driven can also be seen as an advantage. Using event-driven for GUI programs. The reason this could be a disadvantage is because it is only useful for GUI programming. If a company trained their employees in event driven but they are not using GUI programs, This would not allow the employees to work as the programming type they are using is not compatible with the programs they are making

Event driven is not useful for commercial programs as they require data processing which event driven programming isn't used for.

Event-driven programming is a hard to understand and master how it works. Unlike procedural programming where calculations are used to make it work, event driven is less obvious in how it works.