Val Brown Posted March 11, 2007 Report Share Posted March 11, 2007 QUOTE(Donald @ Oct 5 2006, 02:50 AM) I can confirm that one of the answers on the NI LabVIEW certification exam is "Functional Global"... Lv Punk thx also for the shortcut to the mails of Stephen Mercer. Very good explanation why they changed the Obtain Queue primitive. FWIW, I prefer Funtional Global partly because it's sort of the only Global that is really "functional" instead of dysfunctional... LV2 is historically correct but not very helpful and the others, well, I guess I just don't like them, again FWIW. Quote Link to comment
Deon Posted November 24, 2007 Report Share Posted November 24, 2007 QUOTE(Jim Kring @ Jan 11 2006, 08:44 AM) I have created a poll. Let's find out what the consensus is. At SALT we called them Object Data Managers - I think a term that came from the C world. Quote Link to comment
Deon Posted November 24, 2007 Report Share Posted November 24, 2007 QUOTE(Jim Kring @ Jan 11 2006, 08:44 AM) I have created a poll. Let's find out what the consensus is. At SALT we called them Object Data Managers - I think a term that came from the C world. Quote Link to comment
LAVA 1.0 Content Posted November 24, 2007 Report Share Posted November 24, 2007 QUOTE(pbrooks100 @ Jan 10 2006, 09:12 AM) Intelligent Globals = Action Engine? Does anyone else like the term "Action Engine"? I've always called them Functional Globals. I've read somewhere (might be Ben's post) that FG's are actually a sub-class of Action Engines. Where AE actually have functions within the loop / case structur; thus, when coding, I have my FG folder and my AE folder. The trash folder is also handy Quote Link to comment
LAVA 1.0 Content Posted November 24, 2007 Report Share Posted November 24, 2007 QUOTE(pbrooks100 @ Jan 10 2006, 09:12 AM) Intelligent Globals = Action Engine? Does anyone else like the term "Action Engine"? I've always called them Functional Globals. I've read somewhere (might be Ben's post) that FG's are actually a sub-class of Action Engines. Where AE actually have functions within the loop / case structur; thus, when coding, I have my FG folder and my AE folder. The trash folder is also handy Quote Link to comment
oosterwal Posted July 26, 2008 Report Share Posted July 26, 2008 When the concept was first introduced to me it was presented as a "Functional Global Variable" and I've added my vote to the poll under that category. I must admit, though, that the term "Action Engine" was more appealing to me since it seems much more descriptive of the broader subject (of which Functional Globals are only a subset.) The term "Functional Global Variable" may be unappealing to some because it seems to emphasize the noun Variable and tack on Global and Functional as adjectives to classify Variable, and the concept really isn't a variable at all. If this describes your view of the term consider this explanation: A "Functional Global Variable" isn't a variable, it's a Function--a Function that can be used as a Global Variable. In this sense the noun is "Function" and "Global Variable" describes the type of function. Perhaps I can convince all of you to start calling these things "Global Variable Functions". Quote Link to comment
LAVA 1.0 Content Posted July 27, 2008 Report Share Posted July 27, 2008 QUOTE (oosterwal @ Jul 25 2008, 01:25 PM) The term "Functional Global Variable" may be unappealing to some because it seems to emphasize the noun Variable and tack on Global and Functional as adjectives to classify Variable, and the concept really isn't a variable at all. If this describes your view of the term consider this explanation: A "Functional Global Variable" isn't a variable, it's a Function--a Function that can be used as a Global Variable. In this sense the noun is "Function" and "Global Variable" describes the type of function.Perhaps I can convince all of you to start calling these things "Global Variable Functions". Very good point. Earlier this week I asked a coworker of mine what I should be calling the design pattern employed by Functional Global Variables, but used for another purpose. So are these Global Functions, or what do we call them? (Different methods implemented in a Case structure, acting on a set of variables stored in uninitialized shift registers of a While loop) I guess they're precursors to very simple LV classes. Quote Link to comment
Jeffrey Habets Posted July 27, 2008 Report Share Posted July 27, 2008 QUOTE (LV_FPGA_SE @ Jul 26 2008, 12:54 AM) Very good point. Earlier this week I asked a coworker of mine what I should be calling the design pattern employed by Functional Global Variables, but used for another purpose. So are these Global Functions, or what do we call them? (Different methods implemented in a Case structure, acting on a set of variables stored in uninitialized shift registers of a While loop)I guess they're precursors to very simple LV classes. In OO terminology they would classify as a singleton design pattern. Because that's basically what they are: a class of which only one object can be instantiated. An advantage of this particular singleton implementation is that we don't have to pass a class reference around. Disadvantage ofcourse is that reads are always serialized and we have to wire and set the method selector everywhere we call a 'method' of the class. Quote Link to comment
LAVA 1.0 Content Posted July 29, 2008 Report Share Posted July 29, 2008 QUOTE (Jeffrey Habets @ Jul 26 2008, 12:43 PM) In OO terminology they would classify as a singleton design pattern. Because that's basically what they are: a class of which only one object can be instantiated.An advantage of this particular singleton implementation is that we don't have to pass a class reference around. Disadvantage ofcourse is that reads are always serialized and we have to wire and set the method selector everywhere we call a 'method' of the class. Thanks for the OO terminology lesson. To get around setting the method, I normally create a separate wrapper VI for each of the methods, that only expose the necessary inputs and outputs for the method. This becomes my API/function palette. The singleton VI is normally not exposed to the user. Quote Link to comment
Aristos Queue Posted July 30, 2008 Report Share Posted July 30, 2008 QUOTE (Jeffrey Habets @ Jul 26 2008, 12:43 PM) In OO terminology they would classify as a singleton design pattern. Because that's basically what they are: a class of which only one object can be instantiated.An advantage of this particular singleton implementation is that we don't have to pass a class reference around. Disadvantage ofcourse is that reads are always serialized and we have to wire and set the method selector everywhere we call a 'method' of the class. Not quite. I can instantiate only one instance of the class *with that VI*. I could easily write another VI with its own uninitialized shift register that gives me a second instance of the class. Or I could have the class out on a wire and fork it off to many locations. A singleton guarantees that there is one and only one in memory *ever*. There's a shipping example that shows how to enforce that -- see examples\lvoop\singleton. The closest approximation of this to C++ code is function static data -- a variable declared inside a function using keyword "static". I think that the best name for these remains "functional globals". They are global variables implemented using a function. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.