Programming Paradigms

Get Started. It's Free
or sign up with your email address
Rocket clouds
Programming Paradigms by Mind Map: Programming Paradigms

1. **A programming paradigm refers to a way of conceptualizing and structuring the tasks a computer performs

2. Event-Driven Paradigm

2.1. Description: -Visual development enviornments have spawned an approach to programming that is sometimes referred to as the event-driven paradigm -A programmer develops a program by selecting user interface elements and specifying event-handling routines -This event-driven paradigm can significantly reduce development time and simplify the entire programming process -Focuses on selecting user interface elements and defining event-handling routines that are triggered by various mouse or keyboard activities

2.2. Languages: -Visual Basic: Windows-based software development kit created by Microsoft in the early 1990s designed for developing Windows-based applications -C#: language derived from C that provide object-oriented capabilities

2.3. Problems Suited for the Paradigm: -A computer program must be tested to ensure that it works correctly -Testing often consists of running the program and entering test data to see whether the program produces correct results -When a program doesn't work correctly, is it usually the result of an error made by the programmer

2.4. Advantages/Disadvantages: -When a program doesn't work correctly, it must be fixed and then the program must be tested again and again until it runs error-free

3. Procedural Paradigm

3.1. Description: -Traditional approach to programming to conceptualize the solution to a problem as a sequence of steps -Also called imperative paradigm -Programs detail how to solve a problem -A program written in a procedural language typically consists of self-contained instructions in a sequence that indicates how a task is to be performed or a problem is to be solved

3.2. Languages: -A programming language that supports the procedural paradigm is called a procedural language -Machine languages, assembly languages, COBOL, Fortran, C, and many other third-generation languages are classified as procedural languages -Well suited for problems that can be easily solved with linear, or step-by-step, algorithm

3.3. Problems Suited for the Paradigm: -The procedural approach is best used for problems that can be solved following a step-by-step algorithm -One of the original problems tackled by computers was computing missile trajectories -The procedural approach has been widely used for transaction processing, which is characterized by the use if a single algorithm applied to many different sets of data -The procedural approach is also widely used for problems in math and science

3.4. Advantages/Disadvantages: -The procedural approach and procedural languages tend to produce programs that run quickly and use system resources efficiently -Very efficient for number-crunching tasks -It is a classic approach understood by many programmers, software engineers, and systems analysts -Flexible and powerful which allows programmers to apply it to many types of problems -It does not fit gracefully with certain types of problems--those that are unstructured or those with very complex algorithms -It has be criticized because it forces programmers to view problems as a series of steps

4. Object-Oriented Paradigm

4.1. Description: -Based on the idea that the solution for a problem can be visualized in terms of objects that interact with each other -In the context of this paradigm, an object is a unit of data that represents an abstract or a real-world entity, such as a person, place, or thing -Formulates programs as a series of objects and methods that interact to perform a specific task -Programs define objects, classes, and methods -An OO program can use objects in a variety of ways, a basic way is to manipulate them with methods -A method can perform a variety of tasks, such as collecting input, performing calculations, making comparisons, executing decisions, and producing output

4.2. Languages: -Smalltalk: developed by Xerox researchers in 1980 -C++: language that derived from C that provide object-oriented capabilities -Java: a C++ derivative developed by Sun Microsystems used extensively for Web-based programming -Scratch: a simple, visual programming language based on Smalltalk/Squeak and used for teaching -Computer historians believe that SIMULA (SIMUlation LAnguage) was the first computer language to work with objects, classes, inheritance, and methods -SIMULA laid the foundation for the object-oriented paradigm, which was later incorporated into other programming languages such as Eiffel, Smalltalk, C++, and Java -Hybrid languages such as Ada95, C++, Visual Basic, and C#, give programmers the option of using procedural and object-oriented techniques

4.3. Types of Problems Suited for the Paradigm: -The object-orientated paradigm can be applied to a wide range of programming problems -If you can envision a problem as a set of objects that pass messages back and forth, the problem is suitable for the OO approach

4.4. Advantages/Disadvantages: -The object-oriented paradigm is cognitavely similiar to the way human beings perceive the real world -Using the object-oriented approach, programmers might be able to visualize the solutions to problems more easily -Can also increase a programmers efficiency because encapsulation allows to be adapted and reused in a variety of different programs -Runtime efficiency could be a possible disadvantage -Efficient for problems that involve real-world objects -Object-oriented programs tend to require more memory and processing resources than procedural programs

5. Declarative Paradigm

5.1. Description: -Attempts to describe a problem without specifying exactly how to arrive at a solution -Describes aspects of a problem that lead to a solution -Focuses on the problem -The core of most declarative programs is a set of facts and rules that describe a problem

5.2. Languages: -Prolog: (PROgramming in LOGic) developed in 1972 and used for artificial intelligence applications -Many declarative languages, such as Prolog, use a collection of facts and rules to describe a problem

5.3. Types of Problems Suited for the Paradigm: -It is possible to use a declarative language to solve a problem that involves calculations -Problems that require intensive computation are not usually best suited for the declarative paradigm -Declarative programming languages are most suitable for problems that pertain to words and concepts rather than to number

5.4. Advantages/Disadvantages: -Offer a highly effective programming enviornment for problems that involve words, concepts, and complex log -Declarative languages offer a great deal of flexibilty for querying a set of facts and rules -Allow you to describe problems using words rather than the abstract structures procedural and object-oriented languages require -Not commonly used for production applications -Have a reputation for providing minimal input and output capabilities -Their relatively poor performance on today's personal computer architecture, which is optimized for sequential processing

6. Functional Paradigm

6.1. Description: -Emphasizes the evaluation of expressions, called functions, rather than the execution of commands

6.2. Language: -LISP: (LISt Processing) developed in 1959 by famed artificial intelligence researcher John McCarthy, LISP is used for artificial intelligence applications -Scheme: a dialect of LISP, used for computer research and teaching -Haskell: named for the mathematician Haskell Brooks Curry