load incrementally

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

load incrementally

sebastianconcept
Hi guys,

working with Amber is very exciting!

What you guys think on the subject of loading incrementally your amber app code?

The problem to address would be:
You have a web app that is going to be a big guy and you don't want the penalty of a slow response on the first hit (nor any other page load).

The first hit has to load jquery and say bootstrap and maybe some additional plugin beside amber and then your app. 

All of that is quite costly.

Wouldn't be nice to design your app to run a very minimal first "page" and from there load incrementally more and more amber code (via ajax or websockets) as the user clicks on things?

All efficiently lazy :D

How would you make an additional load of your amber app code on demand? 

sebastian

PD: a working example of this design should sound like this: you have a subwidget that should go in an instance variable that it's initialized the lazy way. Only you don't have the code (yet) to initialize it. So your app loads the code of the "new" widget (only because is the first time the user requested the feature) and initializes it and renders it, etc

cool?

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.
 
 
Reply | Threaded
Open this post in threaded view
|

Re: load incrementally

Herby Vojčík


Sebastian Sastre wrote:
> Hi guys,
>
> working with Amber is very exciting!
>
> What you guys think on the subject of loading incrementally your amber
> app code?

Well, you can, already (though not directly supported by an API).
Loading a package is means only loading the <script> tag, and then
initialize the classes in the package.

This is also the main problem - there can be a race condition where
between loading a package and initializing their classes those classes
got used.

But I agree there should probably be the API (fixing the previous thing
as well).

Herby

--
You received this message because you are subscribed to the Google Groups "amber-lang" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/groups/opt_out.