Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
jvx:reference [2020/06/10 13:02] cduncan [The special case of containers] |
jvx:reference [2020/06/10 13:05] cduncan [Following the chain] |
||
---|---|---|---|
Line 413: | Line 413: | ||
Because of the way the [[https://sourceforge.net/projects/jvx/|JVx]] framework is designed, it is easy to access all layers of the GUI framework and also facilitate the usage of these layers to create custom components and allow easy access to the wrapped components, no matter on what layer or of what kind they are. | Because of the way the [[https://sourceforge.net/projects/jvx/|JVx]] framework is designed, it is easy to access all layers of the GUI framework and also facilitate the usage of these layers to create custom components and allow easy access to the wrapped components, no matter on what layer or of what kind they are. | ||
- | ====== Launchers and Applications ====== | + | ====== Launchers and applications ====== |
Let’s talk about Launchers, and how they are used to start [[https://sourceforge.net/projects/jvx/|JVx]] applications. | Let’s talk about Launchers, and how they are used to start [[https://sourceforge.net/projects/jvx/|JVx]] applications. | ||
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 is, obviously, the JVM. Without it, we won’t have much luck starting anything! |
- | * The launcher must be created and it must start the Technology. | + | * The launcher must be created, and it must start the technology. |
- | * The launcher than creates the application which the user is seeing. | + | * The launcher then creates the application, which 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 ===== |