Thursday 19 September 2013

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.

No comments:

Post a Comment