Trace:
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
jvx:reference [2020/06/10 13:05] cduncan [Following the chain] |
jvx:reference [2020/06/10 13:05] cduncan [Entry point] |
||
---|---|---|---|
Line 438: | Line 438: | ||
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. | 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 ===== |
- | The ''%%Main%%'' class that we will use as example is very straightforward: | + | The ''%%main%%'' class that we will use as example is very straightforward: |
<code java> | <code java> | ||
Line 457: | Line 457: | ||
} | } | ||
</code> | </code> | ||
- | All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, it is all we need to do. Of course we could also directly embed this little function into the launcher implementation itself, to save us one class. | + | All we have to do there is start the launcher itself. As the comment suggests, there might be work required for a “real” application startup. For this example, it is all we need to do. Of course, we could also directly embed this little function into the launcher implementation itself to save us one class. |
===== The launcher ===== | ===== The launcher ===== |