Design Ideas
This is not a real project, instead it contains design ideas for Angular v2.
How to contribute
- Leave a
TODO
with a comment or a question - Suggest new API through a PR.
Place to discuss design ideas for Angular v2.0
License: MIT License
This is not a real project, instead it contains design ideas for Angular v2.
TODO
with a comment or a questionThis solution should allow to optimize (or even skip) dirty checking by analyzing effects in the GlobalState of the IntentExecution . In other words - the application would be able to analyze itself - and deduce changes Intent makes to the GlobalState. In the ideal implementation, we would need no dirty checking at all, and the Intent should perform as fast as vanilla js implementation.
In case of Angluar 2.0 Components, we would be interested only in
Intents dealing (also indirectly) with the Components - Intents that would change the GlobalState (in terms of Angular 1.0: everything what is being $watched).
Knowing what is going to change requires analyzing the
IntentExecution. Basically this means analyzing the part of the
source code that is about to run the context of current state, and
deducing what the IntentExecution may be changing in the Global
State. Analyzing the data flow should be sufficient and fast. We would be able to mark what may be changed by the IntentExecution and perform dirty checking only on those objects.
Provided Angular could include a simplistic version of the Runtime and Application - performing only data flow and marking only changes made in the Global State. This implementation could yield higher performance as it should allow to be highly optimized by the JIT since it only would represent a data flow.
In case of very complex Intents or "ambiguous" Intents Angular could back-off to dirty checking implementation.
Implementation is based on CFG analysis. IntentExecutionAnalyzer would parse the AST of
the Intent and perform a data flow analysis AST 2 CFG (IntentExecution) looking for parts that could mutate the Global State.
It could do something similar to escope
, cfg.js
This solution might be used in build time (there would be little chance of optimizing dynamic code) or build into angular (runtime).
At this point this is only a foggy idea, more details could be provided after trying to build first prototype.
I have to little idea about AST, CFG, DFA, NFA etc. to provide more help at this point.
why @mhevery don't just fork @ahejlsberg 's TypeScript project
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.