Loading presentation...

Present Remotely

Send the link below via email or IM


Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.


Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Programming Paradigms & Languages

No description

Jai Evora

on 6 May 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Programming Paradigms & Languages

Event Driven
Event driven programming obviously only limits to how many events you want. Since it is an approach, the more event you put in, the more triggers the event loop does and perform. As long as you encode the correct event, the event loop will continue to detect these and on the process, executes the proper action.
Procedural language is a type of language that follows a set of logical instructions or steps that are needed to be followed. These steps would expectantly result to a solution. Procedural programming is commonly used in problem solving that could use statements such as ‘If, Then, Else’, for example, in Visual Basic (a type of programming software) and would produce an answer, to put it simply.
They can also be generally used in any complex equations or any situation that requires a step by step procedures in order to get results.

Object Oriented
Object Oriented paradigm consists of, instead of one-shot block of codes, objects. These objects are made from a
or the codes which are the attributes and methods.
as in what they look like or what are their similarities to other objects. Basically, their descriptive elements. And
mean what these objects are going to do or perform in the relation with the program.
This attributes and methods will help you perform your desired functionality for an object if done properly.

In baking, a recipe is the 'class'. To bake a cake (the object) you have to depend on the recipe. Objects are made from classes just like a cake made from a recipe!

Programming Paradigms
Programming Paradigms are patterns that is used in the creation of a program. There are three common types of programming paradigms used in the present time: Procedural, Object Oriented and Event Driven.
Programming Paradigms & Languages
The main limitation of this paradigm is the infamous
'spaghetti code'
for programs that requires large scale of procedures. One may use thousands of lines of codes but once you found corrections regarding the codes you are writing, it would be very risky to change those because along the line, you would alter few more codes since all codes are in a series, they are all connected. You mess up with one, you will mess up with the others.
Advantages and Disadvantages
The advantage of this paradigm is that its very structure. It follows a series of logical step by step procedure which makes identifying a certain part of a code easy. The flow of the program can be easily identified and it only requires less memory! It is very easy to use also.

The main disadvantage is that creating a program using this paradigm could take a very long time. The first steps actually is to think of what will happen to the program and if you can't figure that out first, it will be difficult to produce codes. Even professionals could only write 10 lines a day (!!!) in the primary days of creating of a program.
It could also be very difficult to maintain once the lines reach a real LOT of numbers! OH NOOOO!
This paradigm applies to Java and C++ programming software. Once you have created objects with their respective attributes and methods, you can now
them to make things easier. An object can contain complex codes, what more of a number of them? So to hide this "face of complexity", you can encapsulate them as one. It's like summarising 10-paragraphed essay.

One class's (called
parent class)
attributes and methods can be


by other types of class calling it a
'child class'
but it won't necessarily mean that the subclass's own codes will be altered. It would still have and perform its own functionality but only just applying what has been inherited from the superclass.
This program is harder than what has described here. The codes are not as easily produced and you might not be able to grasp what you want an object to do right away. Testings of these objects could take a long time.
One wouldn't usually use object-oriented programming paradigm in solving problems because of its complexity. It is best to depend on a methodical approach such as procedural.
Advantages and Disadvantages
Once you have created your objects, you can just easily reuse them effectively in other programs! Encapsulation also is its one of the advantages as this method hides the complexity of the codes giving you easier to understand instructions. Modifying codes would be much easier because of the inheritance, a small correction can be easily identified because of the differences.

On the other hand, compared to procedural, this paradigm takes up a lot of memory space due to the large number of lines it consists which could slow down your computer. Also, given that the paradigm is complex, it takes a lot of effort to create a program. Although all paradigms requires an effort, this paradigm takes it to another level. Also, not user-friendly.
Event driven programming is a paradigm that uses 'events' to perform a functionality. These events, once triggered, could be in a form of GUI or even sensors which are set by either the programmer or a system.
Examples of event driven situations that you may have encountered are: when a window for update of a certain program appears abruptly in your desktop; an error message appearing on the screen once a rule was broken along the way.
Event driven paradigms can be done to any kind of programming software because it is not exactly a language but only an approach. This is the "when-you-scroll-over-this-this-advert-appears" kind of situation. They can be used when you want to display a certain message for users once a rule (event) is triggered or you want something to happen when a certain function is performed.
Event loop detects any events, which are triggered by mouse clicks, hovering over a certain image, entering a data which breaks a certain rule and such, that will occur and then perform an appropriate action according to the code inputted in regards to the specific event.

The performance of the appropriate action is done by the

event handler.
Event Loop
Advantages and Disadvantages
It is very easy to use an event driven paradigm and the concept behind it is also easy to understand. Each event are separated from one another so correcting a mistake would be easy once identified. Most programs today uses event driven programming as it is more visually appealing than any other types of paradigms. It is also easier and quicker to create compared to other types of programming pattern.

The disadvantage is that event driven programming is too complex for a simple event driven situations. It is only as useful in GUI programming. It is less logical compared to procedural programming so identifying where the mistake is could take a long time. Also, one of the main disadvantages of using Event Driven programming is that it takes up a lot of memory so it slows down your PC.
Factors Influencing the Choice of Programming Language
When creating a program, there are a lot of factors that needs consideration when selecting a language before starting anything. These are:

Cost - The main factor of creating a new project. The number of people working on a project must always be considered. An estimation of everything, primary idea of how long it the creation will take and giving an estimated cost to the client must be done.

Time - Along with cost, the duration of how long the creation of the project will take must also be estimated, at least. This will help what language must be used as there are languages that consumes so much time than other languages. Visual Basic can fasten the work but if the time is not an issue for the customer then C++ can be a better choice as it provides the same features as Visual Basic but more advance and professional.
Procedural programming languages such as C/C++, Java, and PASCAL are best suited for more logical applications such as graphical apps that follows instructions while least suited for complex programming because the paradigm is easy and for beginners.

Object-Oriented programming languages such as Python and Ruby are best suited for more complex programming that could also require problem solving, viewing elements in a object-oriented perspective. It is less suitable for easy programming because the paradigm is too complex and it's best to resort to use other programming paradigm.

Event Driven programming are best used when creating software and apps, although generally, this paradigm is more of an approach than a language, it could be easily applied to other types of paradigm. It is less useful to programs that do not require GUIs as it mainly uses graphical interface as a means of interaction with the users.
Which is more suited to what?
Other Important Factors...
Maintenance Cost - This is how much the organisation would spend in creating and maintaining the program. There are languages that could cost so much maintenance than other languages such as C++ and Java. The complexer the program using these languages, the higher the maintenance cost.

Suitability – What paradigm does the project might be best suited for? Does the language that would be used will best suit the program?

Availability – Where can this new project run? In which platform? Who can perform in creating the new project? Who are capable? The programmers in-charge must all be competent enough to write the language asked.
Expandability – Customers may want you to add more features in the program so your program must be ready for those changes. There are languages that could take time to modify especially those languages that are object-oriented such as C++, Java and Ruby.

Reliability - The language that you will choose must be easy to modify for your programmers. It shouldn't be necessarily the easiest language to use in general but should be what the programmers are best at. This way, modifying the corrections wouldn't be as hard.
Organisational Policy - This is also needs to be considered because you could be asked to use a specific hardware or software and that could affect the language you would use because these clients must be maintaining the consistency of the program and language they use. It is best to have staff that have variety of knowledge regarding programming language which also makes your organisation flexible.
LOL. There is no more here....
Full transcript