<@UBMKY46Q4> Singleton is a widely-used term to re...
# tornadofx
c
@S Singleton is a widely-used term to refer to there being one and only one instance of a particular object in a program. For example, when the framework creates a View object based on your class definition, there is one and only one View object. When you call find() from anywhere in your program, TornadoFX will return that object. Prototype is a term I've pulled from the Spring framework (not related to TornadoFX) that describes there being more than one object in a program. Calling find() on a Fragment will return a fresh object every time. "Scopes" let's you refine the instance creation to be something in between. In that case, find() will return a specific instance and there may be more than one of these specific instances in the program. It's a more advanced use and IMHO one should stick to just Singletons and Prototypes.