0
OO Languages                                   Chapter 9Object-Oriented Software Systems Engineering – Chapter 9   Slide 1
Objectives In this chapter we will:  Introduce some Object Oriented Programming   Languages  Compare some aspects of the...
Major OOPL  Four of the major Object Oriented Programming    languages are: C++ Smalltalk Eiffel JavaObject-Oriented ...
Smalltalk  Smalltalk was for most purposes the first object-    oriented language, although it was based on ideas    firs...
Smalltalk environment  Then Smalltalk was synonymous with GUIs - now    they are commonplace  Smalltalk’s environment is...
Environment...  The development environment is an integral part    of Smalltalk, and all aspects of it are available for ...
...Environment  Smalltalk has several classes of interactive code    writing and debugging tools. They are:       Class ...
Environment Classes  System Transcript:     reports events in the system as they occur  Class Hierarchy Browser     al...
Debugging  Whenever an error occurs Smalltalk displays a   window containing a “walkback” (=backtrace)   which shows the ...
Smalltalk Summary  Designed for interactive and extensible use,    therefore:       environment is available for modific...
Smalltalk Summary  everything is an object  conceptually consistent  run-time error recovery  well-integrated debuggin...
C++  C++ is not tightly integrated with its development   environment and aspects of the environment are   not usually av...
C++  C++ was designed as a production software    language, so much of it is designed to be fast at    the expense of sim...
C++ Programming  C++ is a hybrid of two languages, C and an object-   oriented extension - so it can also accept existing...
C++ Error Handling  C++ can handle run-time errors by writing    exception handlers which trap and deal with the    error...
C++ Environment  A typical C++ environment contains program   editing, debugging (tracing and breakpointing)   and librar...
C++ Environment  Libraries are also non-standard, although many    libraries conform closely to a de-facto standardObject...
C++ Summary  C++ was designed for production programming    and to be compatible with C:       compiled for speed of exe...
C++ Summary continued       choice of static / dynamic binding for speed => confusion       debugging less well integrat...
Comparison  C++:     edit-compile-execute     compiled (interpreters exist)     language separate from environment    ...
...Comparison  Smalltalk:     interactive     interpreted (compilers exist)     language integrated with environment  ...
...Comparison  C++:     statically typed     static or dynamic binding (user chooses)     environment is not part of p...
...Comparison  Smalltalk:     dynamically typed (“doesNotUnderstand” message)     dynamic binding always     environme...
Strengths  C++: Systems Engineering     portable     quick     large libraries     C compatibleObject-Oriented Softwa...
...Strengths  Smalltalk - Rapid Prototyping & Development     interactive     interpreted     easy to understand     ...
Eiffel Eiffel was designed by Bertrand Meyer as a systems   engineering language  It has a clean, efficient design with m...
...Eiffel  Eiffel has automatic garbage collection which can   be programmer-controlled  It was designed to be compatibl...
...Eiffel  Eiffel has failed to make a major impact because:     compatibility with C syntax is low     it’s proprietar...
Eiffel Summary  Eiffel was designed as a clean systems    engineering language, so:       automatic garbage collection  ...
...Eiffel Summary       checkable assertions       documentation tools       “new” design with no old compatibility fea...
Java  Java is the most trendy computer programming   language ever  Also the only programming language ever to make   th...
Background  Java comes form the Oak project at Sun    Microsystems to develop embedded applications    and set top boxes ...
Language features  Syntax is based on C and C++    “C++ without the guns, knives and clubs”: James Gosling  However it h...
Immediate Future  Long range predictions are futile  Java will have significant impact  It is still fairly new  Its po...
Web  universally employed  first use of Web was relatively static, lacking    component-based infrastructure  could be ...
Web object-based developments  IIOP (Internet Inter-ORB Protocol) - a CORBA   standard that defines network interfaces fo...
Interoperability among diverse platforms  Microsoft is member of OMG in name only so far  never supported their standard...
Benefits through Web  support modularity, reusability and integration  together objects plus infrastructure =   improvem...
Summary In this chapter we have:  Introduced some Object Oriented Programming   Languages  Compared some aspects of thes...
Upcoming SlideShare
Loading in...5
×

9. oo languages

178

Published on

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
178
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
7
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • 1
  • Transcript of "9. oo languages"

    1. 1. OO Languages Chapter 9Object-Oriented Software Systems Engineering – Chapter 9 Slide 1
    2. 2. Objectives In this chapter we will:  Introduce some Object Oriented Programming Languages  Compare some aspects of these languagesObject-Oriented Software Systems Engineering – Chapter 9 Slide 2
    3. 3. Major OOPL  Four of the major Object Oriented Programming languages are: C++ Smalltalk Eiffel JavaObject-Oriented Software Systems Engineering – Chapter 9 Slide 3
    4. 4. Smalltalk  Smalltalk was for most purposes the first object- oriented language, although it was based on ideas first developed in a simulation language called Simula in the 1960s  Smalltalk was designed to support a (then) radically new type of user interface - the graphical user interfaceObject-Oriented Software Systems Engineering – Chapter 9 Slide 4
    5. 5. Smalltalk environment  Then Smalltalk was synonymous with GUIs - now they are commonplace  Smalltalk’s environment is graphical, based on windows and browsers, and is controlled by a pointing deviceObject-Oriented Software Systems Engineering – Chapter 9 Slide 5
    6. 6. Environment...  The development environment is an integral part of Smalltalk, and all aspects of it are available for inspection and change within a running Smalltalk system, conversely a Smalltalk system can be extended by writing new classes which are then available in the environment for immediate use, so it is possible to add your own code-writing or debugging tools, although these are already present in SmalltalkObject-Oriented Software Systems Engineering – Chapter 9 Slide 6
    7. 7. ...Environment  Smalltalk has several classes of interactive code writing and debugging tools. They are:  Class Hierarchy Browser  Class Browser  Workspace  System Transcript  Disk Browser  Walkback; DebuggerObject-Oriented Software Systems Engineering – Chapter 9 Slide 7
    8. 8. Environment Classes  System Transcript:  reports events in the system as they occur  Class Hierarchy Browser  allows users to browse, edit, and add new classes to the running system  Workspace  allows users to edit and evaluate expressions and displays the resultsObject-Oriented Software Systems Engineering – Chapter 9 Slide 8
    9. 9. Debugging  Whenever an error occurs Smalltalk displays a window containing a “walkback” (=backtrace) which shows the messages that led to the error  It is possible to resume or to start an interactive debugging tool to trace messages through the objects leading up to the error  Objects can also initiate error recovery whenever a message they send is not understood by the receiverObject-Oriented Software Systems Engineering – Chapter 9 Slide 9
    10. 10. Smalltalk Summary  Designed for interactive and extensible use, therefore:  environment is available for modification and extension  language is semi-compiled then interpreted  has dynamic binding and  dynamic typingObject-Oriented Software Systems Engineering – Chapter 9 Slide 10
    11. 11. Smalltalk Summary  everything is an object  conceptually consistent  run-time error recovery  well-integrated debugging facilities  “clean” design to support quick learning  automatic garbage collection for ease of useObject-Oriented Software Systems Engineering – Chapter 9 Slide 11
    12. 12. C++  C++ is not tightly integrated with its development environment and aspects of the environment are not usually available to the programmer  Unlike Smalltalk it is compiled, and so is much less interactive, all changes and evaluations being made in the traditional edit-compile-execute cycleObject-Oriented Software Systems Engineering – Chapter 9 Slide 12
    13. 13. C++  C++ was designed as a production software language, so much of it is designed to be fast at the expense of simplicityObject-Oriented Software Systems Engineering – Chapter 9 Slide 13
    14. 14. C++ Programming  C++ is a hybrid of two languages, C and an object- oriented extension - so it can also accept existing C programs  C++ has been used to “object-orientize” existing C programs, a major factor in its popularity  But this means that it is harder to use than Smalltalk because the language is much more complexObject-Oriented Software Systems Engineering – Chapter 9 Slide 14
    15. 15. C++ Error Handling  C++ can handle run-time errors by writing exception handlers which trap and deal with the error  They fulfill a role similar to that of the “doesNotUnderstand” message in Smalltalk, although in C++ an object can never fail to understand a message because C++ is statically typedObject-Oriented Software Systems Engineering – Chapter 9 Slide 15
    16. 16. C++ Environment  A typical C++ environment contains program editing, debugging (tracing and breakpointing) and library facilities  Debugging tools depend on what the vendor can supply - there is no standard - but many good debugging and single-stepping tools are available (e.g. Borland C++)Object-Oriented Software Systems Engineering – Chapter 9 Slide 16
    17. 17. C++ Environment  Libraries are also non-standard, although many libraries conform closely to a de-facto standardObject-Oriented Software Systems Engineering – Chapter 9 Slide 17
    18. 18. C++ Summary  C++ was designed for production programming and to be compatible with C:  compiled for speed of execution  not very interactive  strong static typing to catch programming errors before executionObject-Oriented Software Systems Engineering – Chapter 9 Slide 18
    19. 19. C++ Summary continued  choice of static / dynamic binding for speed => confusion  debugging less well integrated, though often good  special run-time error recovery mechanism = exceptions  “dirty” design to support existing C code + OO extensions  constructor and destructor functions to speed up object creation and deletionObject-Oriented Software Systems Engineering – Chapter 9 Slide 19
    20. 20. Comparison  C++:  edit-compile-execute  compiled (interpreters exist)  language separate from environment  many variations of environment from different vendors  widely ported to different platformsObject-Oriented Software Systems Engineering – Chapter 9 Slide 20
    21. 21. ...Comparison  Smalltalk:  interactive  interpreted (compilers exist)  language integrated with environment  only one vendor  limited number of hardware platformsObject-Oriented Software Systems Engineering – Chapter 9 Slide 21
    22. 22. ...Comparison  C++:  statically typed  static or dynamic binding (user chooses)  environment is not part of programs  standardised syntax and semantics  constructor / destructor functions - no garbage collectionObject-Oriented Software Systems Engineering – Chapter 9 Slide 22
    23. 23. ...Comparison  Smalltalk:  dynamically typed (“doesNotUnderstand” message)  dynamic binding always  environment can confuse - part of all programs  standardisation not really a major problem yet (ParcPlace and Digitalk have produced different versions)  automatic garbage collectionObject-Oriented Software Systems Engineering – Chapter 9 Slide 23
    24. 24. Strengths  C++: Systems Engineering  portable  quick  large libraries  C compatibleObject-Oriented Software Systems Engineering – Chapter 9 Slide 24
    25. 25. ...Strengths  Smalltalk - Rapid Prototyping & Development  interactive  interpreted  easy to understand  easy to learn  highly integratedObject-Oriented Software Systems Engineering – Chapter 9 Slide 25
    26. 26. Eiffel Eiffel was designed by Bertrand Meyer as a systems engineering language  It has a clean, efficient design with many features to ensure the correctness of code:  pre-conditions  post-conditions  assertions  invariantsObject-Oriented Software Systems Engineering – Chapter 9 Slide 26
    27. 27. ...Eiffel  Eiffel has automatic garbage collection which can be programmer-controlled  It was designed to be compatible with C library code, but this feature is never emphasized  Eiffel is a proprietary language and has never had a good programming environment  Like C++ there is provision for exception handlersObject-Oriented Software Systems Engineering – Chapter 9 Slide 27
    28. 28. ...Eiffel  Eiffel has failed to make a major impact because:  compatibility with C syntax is low  it’s proprietary  there were to few good environmentsObject-Oriented Software Systems Engineering – Chapter 9 Slide 28
    29. 29. Eiffel Summary  Eiffel was designed as a clean systems engineering language, so:  automatic garbage collection  static typing  dynamic binding (but compiler can optimize to static)Object-Oriented Software Systems Engineering – Chapter 9 Slide 29
    30. 30. ...Eiffel Summary  checkable assertions  documentation tools  “new” design with no old compatibility features  poor backward compatibility with CObject-Oriented Software Systems Engineering – Chapter 9 Slide 30
    31. 31. Java  Java is the most trendy computer programming language ever  Also the only programming language ever to make the front cover of Time magazine  Likely to become the major WWW programming language  Could achieve a critical mass for OOP in the as yet non converted industryObject-Oriented Software Systems Engineering – Chapter 9 Slide 31
    32. 32. Background  Java comes form the Oak project at Sun Microsystems to develop embedded applications and set top boxes for telecommunications services  Java is a clean OO language designed for wide scale distribution  Java compiles to ByteCodes which then interpreted by a Virtual Machine on a host computer (like Smalltalk 20 years ago)Object-Oriented Software Systems Engineering – Chapter 9 Slide 32
    33. 33. Language features  Syntax is based on C and C++ “C++ without the guns, knives and clubs”: James Gosling  However it has single inheritance, dynamic linking and is fully OO, more like Smalltalk than C++  Strongly typed like C++ and Eiffel  No (visible) pointers unlike C++ and like SmalltalkObject-Oriented Software Systems Engineering – Chapter 9 Slide 33
    34. 34. Immediate Future  Long range predictions are futile  Java will have significant impact  It is still fairly new  Its popularity could cause problems if expectations can’t be met  Object thinking is more important than language  Look out for C# and .NETObject-Oriented Software Systems Engineering – Chapter 9 Slide 34
    35. 35. Web  universally employed  first use of Web was relatively static, lacking component-based infrastructure  could be standards-based infrastructure  diverse object application models that conform to a core set of standards  ActiveX components, Java and CORBA objects, AgentsObject-Oriented Software Systems Engineering – Chapter 9 Slide 35
    36. 36. Web object-based developments  IIOP (Internet Inter-ORB Protocol) - a CORBA standard that defines network interfaces for OO applications over the Internet  will serve as basis for Netscape ONE (Open Network Environment)  will provide developers with an open standards- based framework for building interoperable Internet applicationsObject-Oriented Software Systems Engineering – Chapter 9 Slide 36
    37. 37. Interoperability among diverse platforms  Microsoft is member of OMG in name only so far  never supported their standards  Microsoft now shifting more towards Internet  DCOM (distributed common object model) of Microsoft  .NET comingObject-Oriented Software Systems Engineering – Chapter 9 Slide 37
    38. 38. Benefits through Web  support modularity, reusability and integration  together objects plus infrastructure = improvements  people are becoming object developers  object marketplace has started up quickly  financial services, telecommunications industries need: rapid deployment, reliability, modularity and flexibility of OTObject-Oriented Software Systems Engineering – Chapter 9 Slide 38
    39. 39. Summary In this chapter we have:  Introduced some Object Oriented Programming Languages  Compared some aspects of these languagesObject-Oriented Software Systems Engineering – Chapter 9 Slide 39
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×