I’m quite new to Servoy NG, so this may be a stupid question. However, I try to achieve that a specific external .js-file is loaded after the page has loaded. In HTML I would do that like this:
Or you have to have your own servoy ngclient service that injects that script tag with that defer when your service is loaded
Then i guess it will really be lazy.
I’d like to ‘pimp’ my interface. The lazy loading is needed for extra functionality (more as in ‘visual effects’). I use a library for this: https://getmdl.io
In the first place I am a webdesigner, forced to use Servoy. I still have difficulties to fully understand how Servoy renders the webpage, and how to adapt the interface to my wishes. I’m still thinking as a webdesigner…
i don’t get why you use lazy loading for?
Is that just to depend on a the visual affect that happens when it is lazy loaded? (so it is completely depending on the browsers and fast speed of the internet connection of the user?)
That looks very weird to me to depend on that
i think that defer is just a speed up. If you know that library is not used right away but only later on (and the creating of the dom doesn’t depend on it) then you can do defer so the browser doesn’t block on the load.
So for me it is a performances thing not something useful for anything else, but i could be wrong
tom:
I’d like to ‘pimp’ my interface. The lazy loading is needed for extra functionality (more as in ‘visual effects’). I use a library for this: https://getmdl.io
In the first place I am a webdesigner, forced to use Servoy. I still have difficulties to fully understand how Servoy renders the webpage, and how to adapt the interface to my wishes. I’m still thinking as a webdesigner…
Yes. That package wouldn’t work for you anyway. Its really meant for static sites. See their note about “Use MDL on dynamic websites”. Servoy updates content dynamically, so that would be a nightmare.
You should still think like a webdesigner, but it needs a bit of tweaking. Servoy has Bootstrap components available (labeled as the 12grid package). So as you place your elements on the interface, you can assign multiple CSS classes and use what comes in Bootstrap, and of course add your own CSS style sheet. Personally, I sometimes start with this site: http://bootstrap-live-customizer.com/ . You can generate your Booststrap theme or choose from some defaults. Click download and get the .css version and paste that into your CSS your using for your solution. That gets a base theme started for you.
I’m teaching a training in CA in a couple of weeks mostly on building nice interfaces in Servoy 8, so I’ll try to put together something I can share.