Documentation

Trace:

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
jvx:reference [2020/06/10 13:02]
cduncan [Launchers and Applications]
jvx:reference [2020/06/10 13:05]
cduncan [Following the chain]
Line 426: Line 426:
 Then, and only then, the [[https://​sourceforge.net/​projects/​jvx/​|JVx]] application can run. Depending on the implementation that is used, that can be as easily as instancing the factory (Swing, JavaFX), but can also mean that a servlet server has to start (Vaadin). Because we do not wish to encumber our applications with technology specific code, we have to entrust all this to an encapsulated entity, meaning the implementations of ''​%%ILauncher%%''​ and ''​%%IApplication%%''​. Then, and only then, the [[https://​sourceforge.net/​projects/​jvx/​|JVx]] application can run. Depending on the implementation that is used, that can be as easily as instancing the factory (Swing, JavaFX), but can also mean that a servlet server has to start (Vaadin). Because we do not wish to encumber our applications with technology specific code, we have to entrust all this to an encapsulated entity, meaning the implementations of ''​%%ILauncher%%''​ and ''​%%IApplication%%''​.
  
-===== Following the chain =====+===== Following the Chain =====
  
 The steps for getting an application to start are as follows: The steps for getting an application to start are as follows:
  
-  * The first thing that must run is obviously the JVM, without ​it we won’t have much luck starting anything. +  * The first thing that must run isobviouslythe JVM. Without ​itwe won’t have much luck starting anything! 
-  * The launcher must be created and it must start the Technology+  * The launcher must be createdand it must start the technology
-  * The launcher ​than creates the application which the user is seeing.+  * The launcher ​then creates the applicationwhich the user is seeing.
  
 {{:​jvx:​reference:​launcher.png?​nolink|First the JVM starts, then the ILauncher (the window) and finally the IApplication (the content).}} {{:​jvx:​reference:​launcher.png?​nolink|First the JVM starts, then the ILauncher (the window) and finally the IApplication (the content).}}
  
-So we need two classes, the ''​%%ILauncher%%''​ implementation ​which knows how to start the Technology ​and the ''​%%IApplication%%''​ implementation. That we already knew, so let’s try to put this into code. For simplicity reasons (and because I don’t want to write a complete factory from scratch for this example) we will reuse the Swing implementation and write a new launcher and application for it.+So we need two classes, the ''​%%ILauncher%%''​ implementation ​that knows how to start the technology ​and the ''​%%IApplication%%''​ implementation. That we already knew, so let’s try to put this into code. For simplicity reasons (and because I don’t want to write a complete factory from scratch for this example)we will reuse the Swing implementation and write a new launcher and application for it.
  
 ===== Entry point ===== ===== Entry point =====
This website uses cookies for visitor traffic analysis. By using the website, you agree with storing the cookies on your computer.More information