Start learning with our library of video tutorials taught by experts. Get started

Foundations of Programming: Object-Oriented Design
Illustration by Mark Todd

Reviewing feature support across different object-oriented languages


From:

Foundations of Programming: Object-Oriented Design

with Simon Allardice

Video: Reviewing feature support across different object-oriented languages

In this class, we have been focused on general object-oriented design techniques, patterns, and practices. It is worth talking a little but more about language differences. Now as far as I was able, I made this course as generic as possible, and we've explored a few examples in different languages--a few more using Java as it's a common well-known language with typical implementation of these concepts. But when you're comparing languages, what you will you find as one of the biggest differences is does the language support multiple inheritance. C++ does, Ruby does using a feature called Mixins, but most languages on this list allow and enforce only single class inheritance.
Expand all | Collapse all
  1. 11m 35s
    1. Welcome
      1m 25s
    2. Who this course is for
      1m 15s
    3. What to expect from this course
      3m 6s
    4. Exploring object-oriented analysis, design, and development
      1m 41s
    5. Reviewing software development methodologies
      4m 8s
  2. 26m 14s
    1. Why we use object-orientation
      2m 42s
    2. What is an object?
      5m 22s
    3. What is a class?
      4m 43s
    4. What is abstraction?
      2m 45s
    5. What is encapsulation?
      3m 45s
    6. What is inheritance?
      3m 35s
    7. What is polymorphism?
      3m 22s
  3. 12m 16s
    1. Understanding the object-oriented analysis and design processes
      4m 13s
    2. Defining requirements
      6m 9s
    3. Introduction to the Unified Modeling Language (UML)
      1m 54s
  4. 23m 35s
    1. Understanding use cases
      6m 11s
    2. Identifying the actors
      4m 16s
    3. Identifying the scenarios
      5m 7s
    4. Diagramming use cases
      4m 18s
    5. Employing user stories
      3m 43s
  5. 16m 36s
    1. Creating a conceptual model
      1m 59s
    2. Identifying the classes
      2m 27s
    3. Identifying class relationships
      2m 38s
    4. Identifying class responsibilities
      6m 43s
    5. Using CRC cards
      2m 49s
  6. 22m 25s
    1. Creating class diagrams
      6m 11s
    2. Converting class diagrams to code
      4m 57s
    3. Exploring object lifetime
      5m 55s
    4. Using static or shared members
      5m 22s
  7. 19m 49s
    1. Identifying inheritance situations
      6m 49s
    2. Using inheritance
      2m 43s
    3. Using abstract classes
      2m 2s
    4. Using interfaces
      4m 20s
    5. Using aggregation and composition
      3m 55s
  8. 9m 23s
    1. Creating sequence diagrams
      5m 18s
    2. Working with advanced UML diagrams
      2m 3s
    3. Using UML tools
      2m 2s
  9. 10m 39s
    1. Introduction to design patterns
      2m 40s
    2. Example: the singleton pattern
      4m 53s
    3. Example: the memento pattern
      3m 6s
  10. 21m 47s
    1. Introduction to object-oriented design principles
      2m 50s
    2. Exploring general development principles
      3m 55s
    3. Introduction to SOLID principles
      6m 43s
    4. Introduction to GRASP principles
      8m 19s
  11. 7m 1s
    1. Reviewing feature support across different object-oriented languages
      3m 50s
    2. Additional resources
      2m 27s
    3. Goodbye
      44s

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Foundations of Programming: Object-Oriented Design
3h 1m Intermediate May 22, 2012

Viewers: in countries Watching now:

Most modern programming languages, such as Java, C#, Ruby, and Python, are object-oriented languages, which help group individual bits of code into a complex and coherent application. However, object-orientation itself is not a language; it's simply a set of ideas and concepts.

Let Simon Allardice introduce you to the terms—words like abstraction, inheritance, polymorphism, subclass—and guide you through defining your requirements and identifying use cases for your program. The course also covers creating conceptual models of your program with design patterns, class and sequence diagrams, and unified modeling language (UML) tools, and then shows how to convert the diagrams into code.

Topics include:
  • Why use object-oriented design (OOD)?
  • Pinpointing use cases, actors, and scenarios
  • Identifying class responsibilities and relationships
  • Creating class diagrams
  • Using abstract classes
  • Working with inheritance
  • Creating advanced UML diagrams
  • Understanding object-oriented design principles
Subjects:
Developer Design Patterns Programming Foundations
Software:
Java
Author:
Simon Allardice

Reviewing feature support across different object-oriented languages

In this class, we have been focused on general object-oriented design techniques, patterns, and practices. It is worth talking a little but more about language differences. Now as far as I was able, I made this course as generic as possible, and we've explored a few examples in different languages--a few more using Java as it's a common well-known language with typical implementation of these concepts. But when you're comparing languages, what you will you find as one of the biggest differences is does the language support multiple inheritance. C++ does, Ruby does using a feature called Mixins, but most languages on this list allow and enforce only single class inheritance.

Although they will allow implementation of interfaces for what Objective-C calls protocols, these formal lists of methods to support--which is often recommended as a better practice than implementation of classes. Now there are some programming languages that handle inheritance differently to what we explored here. JavaScript is a language that is object-oriented, but it's not a classic object-oriented language, it's informal. But most importantly, it doesn't have the idea of classes, and instead it uses something called prototypes to handle the idea of inheritance.

Now in case you are watching this with the intention to code nothing else but JavaScript for the rest of your career, and you are wondering whether this material was worthwhile, well, yes. If you decide to get deeper into JavaScript object-oriented programming or using one of the other prototype-based languages like IO, you are going to find that pretty much all the explanations of prototype-based inheritance are going to assume that you already have knowledge of classical class-based object orientation techniques. And they'll all explain it based on what we have done in this course.

Most of these languages are statically typed, meaning all variables are declared with a specific type as opposed to languages like Ruby, which is dynamic. And there are always arguments about which one is better. It tends to be an argument that involves flexibility of a dynamic language versus the compile time error checking of a static language, but it doesn't really affect the material we've explored here that much. Although, as I've mentioned, dynamic languages don't enforce the formality of things like interfaces simply because the point of a dynamic language is to avoid all the explicit checking of what an object will and will not respond to and leave that to runtime.

Now we've seen that when using inheritance the call to the superclass or base class will parent class--depending on what you want to call it--can be different depending on the language. And because JavaScript doesn't use classes, it's not really relevant here, although there is a workaround to achieve the same behavior. Now Objective-C is the only language listed here that doesn't have a direct way of marking a method as private, although again, there are ways to simulate that behavior. While Objective-C supports inheritance, it does not have a way to mark a class as an abstract class, but again, there are workarounds.

And finally, as we've seen, interfaces are supported by multiple languages, the same ideas known as protocols in Objective-C, and it just isn't relevant in Ruby or JavaScript. There is no direct interface concept in C++ because it supports multiple inheritance. You can achieve the same behavior by inheriting multiple abstract classes that just don't contain behavior. So a comparison like this can be interesting, but no one is likely to choose a language based purely on a feature set.

The concepts we've explored here work across many, many languages, not just the one shown here, and I will leave it to you to explore the specifics of implementation in your chosen language.

There are currently no FAQs about Foundations of Programming: Object-Oriented Design.

Share a link to this course
Please wait... Please wait...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.
Upgrade now


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Upgrade now

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Foundations of Programming: Object-Oriented Design.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked