Skip to main content



      Home
Home » Eclipse Projects » e(fx)clipse » Best practices for a dynamic splash screen using E4?(What's the best way to show a dynamic splash screen quickly?)
icon5.gif  Best practices for a dynamic splash screen using E4? [message #1276388] Mon, 24 March 2014 09:45 Go to next message
Eclipse UserFriend
Hi,

problems involving the splash screen issue were discussed here and here already, but I'd like to address the issue again, since I'm looking for the best way for showing a dynamic splash screen (containing a login form) as early as possible in the lifecycle of our E4 application.

We have the following requirements:


  1. A splash screen (static OR dynamic) should be shown as quickly as possible during the application startup. As a reference, we consider the startup time of the native splash screen which is very fast.
  2. The splash screen should show a login form. This does not need to happen immediately after the splash appeared on screen, but the form should be visible after a few seconds at the latest.
  3. The splash screen should show a progress indicator as long as the application is starting up. This indicator should appear next to and not later than the login form.
  4. The splash screen should disappear when (i) the E4 application has been loaded completely and (ii) the user has clicked the "login" button.


Our options for implementing this include:


  • Writing a custom splash screen using an E4 lifecycle hook (might be too slow)
  • Using a combination of a static native splash and a dynamic E4 splash (may be hard to manage?)
  • Using a javafx.application.Preloader class (if supported by efxclipse?)
  • [put your idea here Smile]


Any recommendations?

Thanks,
Uwe
Re: Best practices for a dynamic splash screen using E4? [message #1276511 is a reply to message #1276388] Mon, 24 March 2014 13:14 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

a) preloader
I doubt that our launching would support a preloader because this would
require our OSGi-Application to be a subclass Application so that the
native launcher picks it up (at least this is how i read LauncherImpl).

In 1.0.0 we could see if we flip the launching process so that we first
launch fx and then java but that might be a major effort including
duplication on what equinox.launcher.jar does for us (we can simply copy
their launching code) and I doubt a can do this as part of my OSS time
on e(fx)clipse.

b) native equinox
On native equinox launcher front i had a short chat with Tom Watson at
EclipseCon where I confirm that this is a problem but he does not have
knowledge to fix it and all people who could have left for other jobs in
and outside IBM.

c) fx native
What I don't understand is why on hell the Oracle packager does not
support this very feature they are create the executable why can they
not show a splash through this exe, should be a very trivial thing - at
least all other native apps do show such a guy so why can't we?

d) native java
Finally java itself can since the early days show a splash using
http://docs.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html
but I never managed to get that working inconjunction with JavaFX but
maybe I was too dumb to get such a dumb thing working!

Tom

On 24.03.14 06:45, Uwe San wrote:
> Hi,
>
> problems involving the splash screen issue were discussed
> http://www.eclipse.org/forums/index.php/mv/msg/535635/1121381/#msg_1121381
> and
> http://www.eclipse.org/forums/index.php/mv/msg/541879/1128245/#msg_1128245
> already, but I'd like to address the issue again, since I'm looking for
> the best way for showing a dynamic splash screen (containing a login
> form) as early as possible in the lifecycle of our E4 application.
>
> We have the following requirements:
>
>
> A splash screen (static OR dynamic) should be shown as quickly as
> possible during the application startup. As a reference, we consider the
> startup time of the native splash screen which is very fast.
> The splash screen should show a login form. This does not need to happen
> immediately after the splash appeared on screen, but the form should be
> visible after a few seconds at the latest.
> The splash screen should show a progress indicator as long as the
> application is starting up. This indicator should appear next to and not
> later than the login form.
> The splash screen should disappear when (i) the E4 application has been
> loaded completely and (ii) the user has clicked the "login" button.
>
>
> Our options for implementing this include:
>
>
> Writing a custom splash screen using an E4 lifecycle hook (might be too
> slow)
> Using a combination of a static native splash and a dynamic E4 splash
> (may be hard to manage?)
> Using a javafx.application.Preloader class (if supported by efxclipse?)
> [put your idea here :)]
>
>
> Any recommendations?
>
> Thanks,
> Uwe
Re: Best practices for a dynamic splash screen using E4? [message #1276978 is a reply to message #1276511] Tue, 25 March 2014 05:52 Go to previous messageGo to next message
Eclipse UserFriend
Thanks for your reply, Tom.

It seems like there is no out-of-the-box approach that covers all of our requirements. Sad All options you listed have room for improvement (community contributions, that is).
Re: Best practices for a dynamic splash screen using E4? [message #1277027 is a reply to message #1276978] Tue, 25 March 2014 07:29 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

I also started looking into this problem and I have one more idea how we could try to resolve this problem.

In general, my concept involves creating a separate bundle which will start a JavaFX application (javafx.application.Application.launch()) that shows a login form. This bundle can be started on the 1st bundle start level. As a direct result, the UI would be displayed after starting the OSGi framework but before initializing the E4 platform. The second part of my concept assumes that starting of a JavaFX-RCP application will be:
1. Postponed until the login form is closed.
2. Instead of launching a new JavaFX application an existing one will be reused to show the JavaFX-RCP application (note: we cannot call javafx.application.Application.launch method more than once per VM).

What do you think about it?

I also manage to create a working proof-of-concept implementation. In order to create my implementation I had to introduce a bunch of changes to the org.eclipse.fx.ui.workbench.fx.E4Application, for instance:
1. Moving the Application.launch(JFXApp.class); to a separate method (which can be overridden).
2. Making the JFXApp a regular class (not a static nested class).

Those two changes don't break the e(fx)clipse functionality but they allow to create a custom implementation that can be used for declaring the "org.eclipse.core.runtime.applications" extension point (a custom application class can extend the org.eclipse.fx.ui.workbench.fx.E4Application class and override the (1) method).
On top of those changes I created my own E4Application class where I implemented showing JavaFX-RCP application using the javafx.application.Application which was launched by the bundle that started on the 1st bundle start level (I also added there checking whether the login form is closed or not).
Re: Best practices for a dynamic splash screen using E4? [message #1277107 is a reply to message #1277027] Tue, 25 March 2014 10:08 Go to previous message
Eclipse UserFriend
I'd say file a bug and provide a patch - as long as the default
bootstrapping is not broken I'm all for allowing you to access it in
whatever way you want!

Tom

On 25.03.14 12:29, Pawel Zalejko wrote:
> Hi,
>
> I also started looking into this problem and I have one more idea how we
> could try to resolve this problem.
> In general, my concept involves creating a separate bundle which will
> start a JavaFX application (javafx.application.Application.launch())
> that shows a login form. This bundle can be started on the 1st bundle
> start level. As a direct result, the UI would be displayed after
> starting the OSGi framework but before initializing the E4 platform. The
> second part of my concept assumes that starting of a JavaFX-RCP
> application will be:
> 1. Postponed until the login form is closed.
> 2. Instead of launching a new JavaFX application an existing one
> will be reused to show the JavaFX-RCP application (note: we cannot call
> javafx.application.Application.launch method more than once per VM).
>
> What do you think about it?
>
> I also manage to create a working proof-of-concept implementation. In
> order to create my implementation I had to introduce a bunch of changes
> to the org.eclipse.fx.ui.workbench.fx.E4Application, for instance:
> 1. Moving the Application.launch(JFXApp.class); to a separate method
> (which can be overridden).
> 2. Making the JFXApp a regular class (not a static nested class).
>
> Those two changes don't break the e(fx)clipse functionality but they
> allow to create a custom implementation that can be used for declaring
> the "org.eclipse.core.runtime.applications" extension point (a custom
> application class can extend the
> org.eclipse.fx.ui.workbench.fx.E4Application class and override the (1)
> method). On top of those changes I created my own E4Application class
> where I implemented showing JavaFX-RCP application using the
> javafx.application.Application which was launched by the bundle that
> started on the 1st bundle start level (I also added there checking
> whether the login form is closed or not).
Previous Topic:e(fx)clipse Javafx Debugging Exception
Next Topic:Eclipse Kepler & JavaFX tooling on MacOSX
Goto Forum:
  


Current Time: Tue May 13 10:00:27 EDT 2025

Powered by FUDForum. Page generated in 0.03521 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top