Ndu06 typesof language
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Ndu06 typesof language

on

  • 3,990 views

 

Statistics

Views

Total Views
3,990
Views on SlideShare
238
Embed Views
3,752

Actions

Likes
0
Downloads
4
Comments
0

2 Embeds 3,752

http://moodle.wortech.ac.uk 3732
http://beta.moodle.wortech.ac.uk 20

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Ndu06 typesof language Presentation Transcript

  • 1. Types of Programming LanguageSoftware Design and Development 1
  • 2. Programming LanguagesProcedural languagesObject-orientated programmingEvent Driven ProgrammingMark-up languagesScripting languages 2
  • 3. Procedural LanguagesEarly programs used these inc. Windows DOSThe program controls what happens not theuser although they will accept inputProcedural languages work on the basis ofexplicitly telling the computer ‘how to dosomething’ by using a sequence of commandscalled imperatives e.g. do this, then do that etc Examples are C, Fortran, Pascal, and Basic 3
  • 4. Procedural Languages Tasks are broken into a number of stages known as procedures or subroutines Each procedure carries out a specific taskAn example procedure (using Pascal) which calculates the average of two numbers inputted by the user and displays the result readln(Num1) read first number from keyboard and put value in variable Num1 readln(Num2) read second number from keyboard and put value in variable Num2 Average:=(Num1+Num2)/2 calculate average of Num1 and Num2 and place the result in variable Average writln(Average) Display the value of variable Average on the screen 4
  • 5. Object-orientated programming (OOP) Is relatively new and not used until the 1990’s when programs got more complex The program is broken down into objects, not lists of instructions Each object can perform tasks and communicate with other objects An object contains related data and procedures (or methods) which together define the behaviour of that object (i.e. how it respond to events) 5
  • 6. Object-orientated programming (OOP) The object can be thought of as a small machine with a set job An objects provides services in response to messages (events) triggered by other objects or end-users who request these services Event Method request Method Method Object Data Client service Method Method Messages Encapsulation / information hiding 6
  • 7. Object-orientated programming (OOP) Unlike procedural programming, the programmer does not need to know the code which is ‘behind’ each object making it work They only need to know the attributes and methods of each object and how to make it interact with other objects They then use the objects as ‘building blocks’ to make the program do what they want it to Example OO languages are Java, C# and VB.NET 7
  • 8. Event Driven ProgrammingThese are used to create software which has agraphical user interface (GUI), such asWindows programsED languages have procedural features butalso have OO capabilities Examples of Event Driven languages are VB.NET, C# and C++ 8
  • 9. Event Driven ProgrammingEvent driven design has 2stagesFirst the programmer designsthe GUI, placing objects suchas textboxes, buttons andlabels onto a formThen they write the codewhich gives the functionalityto the program 9
  • 10. Markup LanguagesA markup language is not a true programminglanguage as they do not contain instructions tocontrol the flow of the program.markup languages give instructions to controlthe format and layout of a fileThis information is in the form of tags forstructure or presentationThe programmer can insert tables forstructure, images, hyperlinks and text usingtags 10
  • 11. Markup LanguagesThe best-known markup example is HypertextMarkup Language (HTML), used on the WorldWide Web Example: <title>Home Page</title> <style type="text/css" media="screen"> @import "stylesheets/public.css"; body { background-color: white }; </style>Another example is XML (Extensible MarkupLanguage) which allows users to write theirown tags 11
  • 12. Scripting languagesWhere web pages need to carry outprogramming functions the code for this hasto be included within the HTML using ascripting language. An example of this is JavaScript or vbscriptScripting languages can be typed in directlyfrom a keyboard and the language used willbe specific to each application 12
  • 13. Scripting languagesSome are used to execute a series ofcommands that would otherwise have to betyped in via a keyboard / mouseThese can be used to control the operatingsystem and are known as a shell scriptlanguage e.g. Windows PowershellOthers allow users to writeshort, simple, programs or add functionality toapplications e.g. macros in Access or Excel 13
  • 14. Which language to use depends on: Organisational policy – your company may be ‘tied’ to Microsoft or Macintosh Will it work on the hardware already used? Does it do what we need it to? Are current staff trained in its use? Is it reliable? Important for safety-critical systems! Costs of developing and maintaining programs Will it be expandable in future? 14