I was considering using Dart for the Framework that I was going to write. One of the problems I discovered was that I couldnβt lazily load my classes or perform an alternative method of loading more code. I want to dynamically load more code when a user views different areas of the site without reloading the page ((ab) using the history API), but from what I could say, I would have to download all the code up. It just wouldn't work, because it would give terrible first load times, and every time I change any code, users will have to re-download all the code for the website.
An example program that does this in javascript is SyntaxHighlighter . It is possible to load brushes only when they are needed.
In dart, you can load the isolate and forward some serialized version forward to perform syntax highlighting, but for my application I need listeners and event handlers, as well as a lot of manipulations with the DOM and CSS, I just canβt write a custom API to do all this with primitive types.
I was wondering if there is a way to do this in Dart, or if there is something in the work that would allow us to implement this technique. (otherwise it will return to JavaScript).
Thanks Kevin
source share