Fork me on GitHub
Jacob Emcken16:07:00

I'm finding myself wanting to initialize a part of the app-db before navigating to specific page in my "single page app". I know how to do this as part of the app initialization, but right now it just feels better to avoid calculating these things before they are needed (if ever). Can it be done?... should it be done?... and if so any pointers?


> Can it be done? Yes. > should it be done? Depends. No objective reasons why it should be avoided. > any pointers? deals with that stuff in a simple to grasp and use manner.

Jacob Emcken16:07:04

thanks, going to read about it


Reasons I would consider initializing beforehand; When the user can interact with a half-initialized app and create unfortunate states (this can be hard to spot) When showing a fully loaded page is more important than shortening pageloading times (or when load is fast enough) When there's a technical reason that something can't be shown with only partial state

Jacob Emcken15:07:24

I have a dynamic data specification which I assume will changes very rarely, but when it does it will affect the entire application. My gut feeling tells me I should avoid re-calculating how a form that I'm not currently "looking at" (in the browser) should look when (if ever) the form is shown. I might have quite a few of these forms that would all need "re-calculation". But I guess that is a problem for when (if) that actually becomes a problem.