6 Steps on How to Learn or Teach LabVIEW OOP - Part 1

You are here

6 Steps on How to Learn or Teach LabVIEW OOP - Part 1

14 July 0   0

If you follow the NI training then you learn how to build a class on Thursday morning and by Friday afternoon you are introduced to design patterns. Similarly when I speak to people they seem keen to quickly get people on to learning design patterns – certainly, in the earlier days of adoption this topic always came up very early.
I think this is too fast. It adds additional complexity to learning OOP and personally I got very confused about where to begin.

Step 1 – The Basics
Learn how to make a class and the practical elements like how the private scope works. Use them instead of whatever you used before for modules. e.g. action engines or libraries. Don’t worry about inheritance or design patterns at this stage, that will come.

Step 2 – Practice!
Work with the encapsulation you now have and refine your design skills to make objects that are highly cohesive and easy to read. Does each class do one job? Great you have learned the single responsibility principle, the first of the SOLID principles of OO design. Personally, I feel this is the most important one.

If your classes are large then make them smaller until they do just one job. Also, pay attention to coupling. Try to design code that doesn’t couple too many classes together – this can be difficult at first but small, specific classes help.

Step 3 – Learn inheritance
Use dynamic dispatch methods to implement basic abstract classes when you need functionality that can be changed e.g. a simulated hardware class or support for two types of data logs. I’d look at the channeling pattern at this point too. Its a very simple pattern that uses inheritance and I have found helpful in a number of situations. But no peeking at the others!

Latest From Blog

Semiconductor Testing
12 December 2017 | 0 comments

Automated test equipment (ATE) is computer-controlled test and measurement equipment that allows for testing with minimal human interaction. The tested devices are referred to as a device under test (DUT).

[Read more]
SUBSCRIBE TO OUR NEWSLETTER

About

“ReadyDAQ provides a customizable LabVIEW solution which is both time saving and affordable”. 

 

The team – ReadyDAQ has a dedicated team of physicists, electrical engineers, and programmers who work to provide a data acquisition solution for any project in different difficulty levels.

CONTACT INFO

  • Address: Matam - Scientific Industrial park, Building 23      Haifa, Israel
  • Phone: +972 72 250 5555
  • Mail: info@ReadyDAQ.com