Jump to content

NI forum post asking about LVOOP design pattern


Recommended Posts

Posted

Seen here.

Can someone point me to a LabVIEW example of this OOP design? I am learning OOP in LabVIEW and my task is to create an example program using the facade design pattern. I can't find an example to study.

This is something I'm interested in as well...

Posted

Heh, I'm even interested in an intelligible example of the facade pattern in *any* language. I find the chapter in Gamma et a less than enlightening.

Posted

Excuse my ignorance, but isn't this an extremely common pattern, outside of OOP as much as in it? It's just a simplifying "wrapper" API about a more complex lower-level API. Many "LabVIEW drivers" are facades of other APIs such as ActiveX, VISA, or some dll or other.

-- James

Posted

That's my interpretation, which left me wondering why it even is a pattern. To me it's no different than creating a sub VI that manages several calls to other VIs, whether we are talking about objects or not.

I always figured there was some magical subtlety I was missing that made the pattern worthy of a special name. I guess not?

Posted

> I always figured there was some magical subtlety I was missing that made the pattern worthy of a special name.

Nope. Patterns are patterns, even the very common ones. Having said that, it is amazing how often in software design that people go to great lengths to solve problem XYZ, and someone else pipes up with, "Why don't you just do MNO?" where MNO is some common action. That's often the case with the facade pattern... rather than trying to call an api directly, create a facade that you call through.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.