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 12:11] cduncan [Why is the UI layer necessary?] |
jvx:reference [2020/06/10 12:19] cduncan [Adding a new Technology] |
||
---|---|---|---|
Line 138: | Line 138: | ||
===== The Factory ===== | ===== The Factory ===== | ||
- | The heart piece of the UI layer is the Factory, which is creating the implemented classes. It’s a rather simple system, a singleton which is set to the Technology specific implementation and can be retrieved later: | + | The heart piece of the UI layer is the factory that is creating the implemented classes. It’s a rather simple system, a singleton which is set to the Technology specific implementation and can be retrieved later: |
<code java> | <code java> | ||
Line 166: | Line 166: | ||
It “just returns new objects” from the implementation layer. That’s about it when it comes to the factory, it is as simple as that. | It “just returns new objects” from the implementation layer. That’s about it when it comes to the factory, it is as simple as that. | ||
- | ===== Piecing it together ===== | + | ===== Piecing It Together ===== |
- | With all this in mind, we know now that [[https://sourceforge.net/projects/jvx/|JVx]] has swappable implementations underneath its UI layer for each technology it utilizes: | + | With all this in mind, we know now that [[https://sourceforge.net/projects/jvx/|JVx]] has swapable implementations underneath its UI layer for each technology it utilizes: |
{{:jvx:reference:multi-layers.png?nolink|Multiple Extensions/Implementations/Technologies can be used}} | {{:jvx:reference:multi-layers.png?nolink|Multiple Extensions/Implementations/Technologies can be used}} | ||
- | Changing between them can be as easy as setting a different factory. I say “can”, because that is only true for Swing, JavaFX and similar technologies, Vaadin, obviously, requires some more setup work. I mean, theoretically one could embed a complete application server and launch it when the factory for Vaadin is created, allowing the application to be basically stand-alone and be started as easily as a Swing application. That is possible. | + | Changing between them can be as easy as setting a different factory. I say “can” because that is only true for Swing, JavaFX, and similar technologies. Vaadin, obviously, requires some more setup work. Theoretically, one could embed a complete application server and launch it when the factory for Vaadin is created, allowing the application to be basically stand-alone and be started as easily as a Swing application. That is possible. |
===== What else? ===== | ===== What else? ===== | ||
- | That is how [[https://sourceforge.net/projects/jvx/|JVx]] works in regards to the UI layer. It depends on “technology specific stacks” which can be swapped out and implemented for pretty much every GUI framework out there. We currently provide support for Swing, JavaFX and Vaadin, but we also had implementations for GWT and Qt. Additionally we do support a “headless” implementation which uses lightweight objects which can be serialized and send over the wire without much effort. | + | That is how [[https://sourceforge.net/projects/jvx/|JVx]] works in regards to the UI layer. It depends on “technology specific stacks” which can be swapped out and implemented for pretty much every GUI framework out there. We currently provide support for Swing, JavaFX, and Vaadin, but we also had implementations for GWT and Qt. Additionally, we do support a “headless” implementation which uses lightweight objects which can be serialized and send over the wire without much effort. |
- | ===== Adding a new Technology ===== | + | ===== Adding a New Technology ===== |
- | Adding support for a new Technology is as straightforward as one can imagine, simply creating the Extensions/Implementations layers and implementing the factory for that Technology. Giving a complete manual would be out for scope for this document, but the most simple approach to adding a new stack to [[https://sourceforge.net/projects/jvx/|JVx]] is to start with stubbing out the ''%%IFactory%%'' and implementing ''%%IWindow%%''. Once that one window shows up, it’s just implementing one interface after another in a quite straightforward manner. And in the end, your application can switch to yet another GUI framework without the need to change your code. | + | Adding support for a new technology is as straightforward as one can imagine: simply creating the extensions/implementations layers and implementing the factory for that technology. Giving a complete manual would be out for scope for this document, but the most simple approach to adding a new stack to [[https://sourceforge.net/projects/jvx/|JVx]] is to start with stubbing out the ''%%IFactory%%'' and implementing ''%%IWindow%%''. Once that one window shows up, it’s just implementing one interface after another in a quite straightforward manner. In the end, your application can switch to yet another GUI framework without the need to change your code. |
===== Conclusion ===== | ===== Conclusion ===== |