MATLAB and Simulink Training

Object-Oriented Design with MATLAB

View schedule and enroll

Course Details

A code base is difficult to manage over time due to evolving requirements and increasing complexity. Learn how to improve the maintainability and extensibility of your object-oriented code by restructuring it into a set of classes with clear responsibilities and minimized inter-dependency. Understand the root causes of hard-to-manage code projects and how to prevent this by following generic design principles. Solve common design problems and avoid pitfalls by employing specific design patterns. Throughout the training, concepts are explained through use-cases, practical examples, and hands-on exercises. UML class diagrams are employed to visualize the newly introduced concepts and design ideas.
 
Topics include:
 
  • Writing maintainable and extensible software by applying object-oriented design principles.
  • Addressing recurring software design problems efficiently by using time-tested design patterns.

Day 1 of 2


Object-Oriented Design Principles

Objective: Follow proven guidlenies to make your applications maintainable, flexible, and easy to extend.

  • Learn to encapsulate what varies by extracting code that is likely to change into a separate class
  • Experience why it's better to favour composition over inheritance, as well as over adding more methods to the class
  • Determine whether to use handle or value classes to store data
  • Single Responsibility Principle, or why to avoid having a single God Object
  • Open-Closed Principle, or how to use hierarchies in order to make your code open for extension, but closed for modification 
  • Liskov Substitution Principle, or why you should use subclasses to add new functionality, but not to remove unnecessary one 
  • Interface Segregation Principle, or how several small abstract classes can help you reuse code
  • Dependency Inversion Principle, or how depending on abstract instead of concrete methods or properties can make the code more flexible

Day 2 of 2


Design Patterns

Objective: Efficiently solve common software design problems by using an established set of classes and class relationships defined by design patterns.

  • Public Private Property Pair – a pattern that helps ensure two properties always have the same length
  • Observer – a pattern enabling a class to automatically react to modifications in another class, ideal for real-time data display in apps
  • Template Method – a pattern that ensures different versions of an algorithm always follow the same set of steps, where the steps themselves can differ
  • Strategy – a pattern that helps you plug in different versions of an algorithm into another algorithm
  • Simple Factory – a pattern for creating an object of a specific subclass, based on a set of rules
  • Singleton – a pattern that guarantees there is only one object of a specific class, ideal for ensuring that only one instance of an app is open
  • Adapter – a pattern for modifying the user interface of an algorithm, to enable, for example, using legacy code
  • Facade – a patter that encapsulates a complicated algorithm requiring several objects and steps

Level: Advanced

Prerequisites:

Object-Oriented Programming with MATLAB or existing knowledge of object-oriented programming in MATLAB.

Duration: 2 day

Languages: English

View schedule and enroll