Thursday 19 September 2013

Unit 6P1


P1 - describe the application limits of procedural, object oriented and event driven programming paradigms

Procedural Programming language

Procedural programming languages are used to solve a lot of different problems.
 This style of programming was brought as a result of lines of code being too complex and time confusingly long; thousands of lines of code were needed for one program. The procedural approach of programming was brought in so that users would break down these lines of code into block of around 10 lines of code; these blocks were used to carry out specific actions for the final release of programs. These are procedures acquiring to the name of this style of programming it is called Procedural Programming. In procedural programming a program would be built by writing these functions/procedures and calling upon them when you need them to perform a function within the program.

Object Oriented Languages

Object – orientated programming (OOP) – OPP takes a different approach to the stricture of a complex program. OPP was developed in a format to help with the difficulties that were troubling in the creation of highly complex system using the procedural approach. With OPP, a program is broken down into objects rather than procedures.

Event Driven Programming

The first programming language limitations that I will discuss will be EDP language. This language will be hard to get to grips with because it is complicating; also it is only really easy to use with a GUI, graphical user interface, and framework such as frames per second (FPS). If you made a program with a calculation using a few textboxes and a button you will only get those values calculated once the button is clicked. This is fine but where the limitation stands if you wanted to get rid of the GUI you would need to recode all over again as the previous code would be bases on a GUI system and wouldn’t be able to be put somewhere else.

Object Oriented Programming

OOP will be the second language that I will look at; some of the limitations for this programming language are that a lot of tasks must be done manually; they are difficult to modify or extend within an application that has been made.

Procedural programming

Procedural programming is extremely advanced in performance, however like everything it does have limitations; one of the more serious limits is “spaghetti-code”. Spaghetti code is a form of code that would have had to have been written too many times so that the flow will become unusable to new programming coming onto the project. The new programmer will then have to take a preoperational-course which will enable to begin to understand the software. This is caused because the code will constantly have to be changed and adapted in order to meet the user demand which means introducing things like sub loops and new methods altogether is a hard to adapt. However there is no good tool which is for abstraction, which is something that only exists as an idea, and modularization in procedural languages. This means that it’s hard to add new functionality or change the work flow without going back and modifying all other parts of the program.

List of six programming languages most commonly used:

PHP-PHP is an open source web development language through HTML and supports cross platforms.


C#-C# is a general object orientated programming source this was developed by Microsoft as part of .NET.

JavaScript-JavaScript is not Java sounds confusing now doesn’t it but really its simple JavaScript is an object orientated scripting program. Also this program is easier to code and is smaller than Java itself.

VB.NET (Visual Basic.NET)-VB.NET is an object orientated implemented program designed by Microsoft’s.NET framework and is a lot easier to use than other scripting programs.
Python-Python is basically python would be classed as object orientated but is open source language based program it also utilizes memory management.

Java-Java is an object orientated based program developed by James Gosling in Sun Microsystems in the early 1990s. Developers describe this programming language to be “beautiful” because it is not part of the .NET framework or developed by Microsoft.

Why are there so many languages?
There are so many languages simply because new languages are designed and built to update existing languages such as C-C++ making improvements for a better user experience also there are so many languages because some languages are specially designed to do certain jobs or to create light weight applications Java is a good example to use for light weight applications.


References: 

U14 P1

Describe the key features of event driven programs.

1) What an event driven language is?
     2) A description of one event driven language
     3) Typical ‘events’ in your chosen language
     4) What features of the language are available?
     5) What are the advantages of your language?
     6) What are the disadvantages of the language?





Moving the mouse and clicking the windows icon brings up the start menu.
1) Modern programming languages are event driven this means that it works well with graphical user interface (GUI) example of an operating systems a common example is Microsoft’s Windows®. This type of programming is event drives example of this. This is an operation caused by the user clicking the icon which is the event, this then activates a line of code where then the code handler reads it and activates the code.

2) One example of an event driven language would be Microsoft’s visual studio (MVS) a program that allows users to write coding in VB.NET (Visual Basic.NET) this is very popular programming language.VB.NET is an object-oriented language, with a robust integrated development environment. VB.NET employs classes and objects as part of its object-oriented implementation, providing programmers with the ability to quickly create new objects from existing classes. This can your programming time and help you develop a better application.


3) Typical events that occur are clicking on a button, or entering some text in a text box, or clicking on a menu item all are examples of events. An event is an action that calls a function or may cause another event.




Here I have made a simple text window with two buttons to bring out two different messages “Good message” and “Bad message”. 







4) Inheritance, polymorphism, interfaces, and overloading these are just some of the language features in VB.NET (Visual Basic.NET). Here is a brief description of each feature that I have listed.
5) What are the advantages of your language?
Inheritance, the ability to define classes that serve as the basis for derived classes. Derived classes inherit, and can extend, the properties, methods, and events of the base class. Derived classes can also override inherited methods with new implementations. By default, all classes created with Visual Basic are inheritable.
Polymorphism provides the ability to vary the implementation of a method or property. With polymorphism, the same method or property can perform different actions depending on the run-time type of the instance that invokes it.


Interfaces define the properties, methods, and events that classes can implement. Interfaces allow you to define features as small groups, using interfaces you have a very small chance of any compatibility problems, this means that you will not run the risk of jeopardising your work. There is more flexibility with interfaces such as giving the user the ability to define single implementation that can then implement onto more complex multiple interfaces.

Overloading happens when more than one procedure takes place in coding, when multiple codes with the same name operate within a program. Advantages of this are shorter codes can be created with the same effect, several data types can have the same display types that look like this example below:








6) What are the disadvantages of the language?
Some disadvantages of this language VB.NET (Visual Basic.NET) are as follows:

The language can be slow this is to the fault that the program running the language requires a lot of processing power for the event loops to continuously check in the GUI (Graphical User Interface) yet to find out if anything has occurred i.e. syntax errors, general errors and faults. More power is being taken up when triggered to match functionality with the events of the event handler.