Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 11 total
Thread Load Animation
Sun, Mar 1 2015 11:36 AMPermanent Link

Eivind

Hi

I would like some thoughts on how to display an animation when the EWB app loads. The app I'm making will be run over satellite internet on offshore vessels with speed as low as 64 kb/sec. With those speeds an EWB app can take several minutes to load. That's ok, but I would like to let the user know that something is happening. Did anyone else do something similar before? Would it be possible to plug some CSS / gif animations into the generated html file?

Thanks for any help

Br

Eivind
Sun, Mar 1 2015 3:59 PMPermanent Link

Walter Matte

Tactical Business Corporation

Eivind:

I used this site create a GIF.

http://www.ajaxload.info/

I put the GIF on a form (frmWait)  and to frmWait.Show at the beginning of a potential long process and frmWait,Hide when it is done.

Walter
Sun, Mar 1 2015 8:51 PMPermanent Link

Eivind

Walter. Thanks for your answer. In my app, I use this method as well when I load data to datasets.

As the generated java script file is is 600 kb and growing, it can take long time for the browser to load it on slow satellite internet that they use on offshore vessels. My problem is that I only see a white screen for a long time before the actual main form pops up for the first time. The second time they log in its ok as cashing takes care of this. Many of my users is confused because they think nothing is happening when in fact the browser is loading the java script file. That's where I need to plug in some kind of temporary background image or gif animation telling the users that the web app is actually loading.

Thanks

Eivind
Sun, Mar 1 2015 8:55 PMPermanent Link

Eivind

My bad for not being specific enough in my original post. I was targeting a solution when the browser is initially loading the java script file and not when I call Database.Load() in the EWB app.
Sun, Mar 1 2015 10:02 PMPermanent Link

Raul

Globestar Systems

Team Elevate Team Elevate

On 3/1/2015 11:36 AM, Eivind wrote:
> I would like some thoughts on how to display an animation when the EWB app loads. The app I'm making will be run over satellite internet on offshore vessels with speed as low as 64 kb/sec. With those speeds an EWB app can take several minutes to load. That's ok, but I would like to let the user know that something is happening. Did anyone else do something similar before? Would it be possible to plug some CSS / gif animations into the generated html file?


Have not tried this myself but it is possible to load javascript
dynamically from another javascript. You'd have to craft the initial
html and loader javascript  manually but idea would be something like this :

1. html includes an appropriate "App loading ..." message and maybe the
spinning gif Walter referred to

2. this html also includes very small loader javascript that executes
either on page load or better yet on timer maybe little after  (this is
to ensure web page text and gif are showing in browser).

3. the loader js would now load the actual EWB app javascript and then
call the appropriate "<app>_load()" function in it.

I know jquery includes couple of ways to load script dynamically
*getScript or ajax call) but i'm sure googling should point you to a
version that does not require entire jquery to be included and just does
the script load.

Raul
Sun, Mar 1 2015 10:33 PMPermanent Link

Rick

On 02/03/15 03:36, Eivind wrote:
>
> I would like some thoughts on how to display an animation when the EWB app loads.
>

Make sure that you have Project->Options->Compilation->Compress Output
checked to minimize the size of the application JS file. This will
reduce load times.

Project-Options also includes an External Code tab which allows you to
specify an external JS file to include with the application. This gets
loaded in the head section of the html file so maybe it can be used to
display something whilst the main JS is downloading. The body tag hasn't
been processed at that point so appendChild may not do anything useful.

--
Rick
Mon, Mar 2 2015 4:02 AMPermanent Link

Matthew Jones

Eivind wrote:

> Would it be possible to plug some CSS / gif animations into the
> generated html file?

The simple answer is yes. I post-process my HTML file at the moment,
using FinalBuilder to to the compiling of the EWB application, and then
a little Delphi application that looks for set strings and inserts
appropriate content. You can easily add ordinary HTML content to have
it show a waiting GIF.


--

Matthew Jones
Mon, Mar 2 2015 4:04 AMPermanent Link

Matthew Jones

Rick wrote:

> minimize the size of the application JS file

Good point, but also ensure that the server and browsers support
compression so that will reduce it further.

--

Matthew Jones
Mon, Mar 2 2015 9:18 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Eivind,

<< I would like some thoughts on how to display an animation when the EWB
app loads. The app I'm making will be run over satellite internet on
offshore vessels with speed as low as 64 kb/sec. With those speeds an EWB
app can take several minutes to load. That's ok, but I would like to let the
user know that something is happening. Did anyone else do something similar
before? Would it be possible to plug some CSS / gif animations into the
generated html file? >>

Are you referring to showing progress while the application is being
downloaded to the browser, or while the application is creating the forms ?

If the former, then there really isn't much one can show, other than what
the browser is showing as progress.  But, keep in mind that, absent any
further changes to your application, this process will only occur *once* and
then the EWB application will be cached locally on the device/computer that
the browser is running on.

EWB 2 will have a simple TApplication property for this (LoadProgress) for
the latter, and unfortunately the technique isn't a simple one that can be
implemented easily in EWB 1.x because you have to do some weird stuff to
"pump" the main UI thread and get it to process the UI events *while* the
forms are being created in JS code.  This has to be done in this manner
because most browsers won't repaint the UI while JS code is still executing.

Tim Young
Elevate Software
www.elevatesoft.com


Mon, Mar 2 2015 10:17 PMPermanent Link

Eivind

Tim

Thanks for your update!

I was referring to when the application was downloading to the browser the first time. As this app will run over slow satellite internet, I was in need of telling the user that something is actually happening. As for the second time, its loaded from the cache so that's no problem.

I experimented a bit with inserting som gif animation and css spinners in the main html file with no success. I also removed the onload from the body and moved the javascript reference to the bottom of the file. The java script apeared to start loading before all the DOM event got loaded. Anyhow, ended up creating a index.html file with a CSS spinner that is called when the user clicks the app link. The index.html file shows the spinner and some info and redirects to the EWB html file. Works perfect so far

Eivind


Page 1 of 2Next Page
Jump to Page:  1 2
Image