Software Design Patterns in ThingWorx
Hi All,
i did a few quick searches in Google and here and didnt find anything that quite worked or explained how to use common design patterns, such as factory design pattern, within thingworx. i understand that not all concepts from software dev and OOP translate perfectly or are possible in thingworx, but i do believe such a platform should have something similar that would allow developers to create something a littble bit more dynamic. i tried cloneThing and createThing methods but these create actual instantiations of things (i.e. concrete instatiated/permanent things), but what i am trying to do is more like having a generic Thing, with all the properties and services and creat a "copy" of the thing by calling a service and passing the params. however, this should not create an actual thing but rather, inn OOP terms, create an instance of the thing that lives in memory until it is discarded. an example of how this could be used is to allow the user/application instance to pass the arguments/parameters to connect to a database, without having to store them as values in the properties of the thing. i know you can do this by leaving the values undefined and creatiung a service, however, from a behavior stand point, it was difficult to understand if the thing was more of a Singleton and i was simply changing the property values by calling a set property method or if i infact instantiated two distinct objects (i.e. different addresses in memory) like in the Factory Design Pattern. if there is some documentation or tutorial or if anyone has successfully applied the factory design pattern in thingworx i would appreciate some guidance. now for the reason. there are some things that where we will need 300+ instantiations, and others where we will need 300 * 5000 instantiations, etc, and creating and maintaing individual actual things is not desireable, even if we could use a script or routine that would create them. i would rather instantiate my things using database records and data models

