I'm trying to find a good break down of the differences (advantages/disadvantages) between using a singleton object and an action engine.
Also, is it possible to have multiple instances of a singleton (I know, sounds silly) with a different Checkout/Checkin for each. If this is not possible then to me it seems like a singleton is basically the same as an AE just created using a OOP point of view.
In a very basic sense they're similar, but when adding inheritance, the possibility to add functionality with different connector panes and similar the differences starts to be noticable. 🙂
Yamaeda is correct that they are very similar. One thing to be careful of when using functional globals is to make sure they remain nonreentrant (the default). If they become reentrant, then multiple instances could be created in memory defeating their purpose.
Check out this link for a thorough explanation of the singelton architecture: http://decibel.ni.com/content/docs/DOC-13462 (Singelton Pattern)
If you would like to have a class similar to the singleton but with mutliple instances the recommendation is that you use the Extensible Session Framework.
Have a great day,
Another thing the LVOOP provides is some levels of protection for your data. You define the API supported via your public methods and can limit access to the data. In addition, you have much more flexibility in how each method is defined with respect to it's inputs and outputs. You are limited to a single connector pane like Yamaeda stated. Inheritance and dynamic dispatch are very powerful tools. Unlike AEs you can create multiple instances of your singletons which again provides more flexibility.