資源描述:
《angular 2 dart transformer》由會(huì)員上傳分享,免費(fèi)在線閱讀,更多相關(guān)內(nèi)容在學(xué)術(shù)論文-天天文庫。
1、Angular?2?Dart?TransformerAuthor:?tjblasi@google.comSummaryThe?purpose?of?this?doc?is?to?explain?the?goals?and?design?of?the?Angular?2?Dart’s?code?generation?step.?The?mechanism?used?will?be?a?Pub?Transformer,?which?is?not?related?to?the?Traceur?transformations?whi
2、ch?generate?the?Dart?and?Js?flavors?of?Angular?2.SummaryLinksGoalSubgoalsDesignPhase?1??DirectiveProcessorImplementation?OverviewPhase?2??Directive?LinkerImplementation?OverviewPhase?3??BindGeneratorExampleImplementation?OverviewPhase?4??Template?CompilerImplementa
3、tion?OverviewPhase?5??ReflectionRemoverImplementation?OverviewOmissionsGenerate?Change?Detection?classes?instead?of?getters?&?settersProposed?SolutionTree?Shake?Transformed?Angular?2?AppsProposed?SolutionsGenerate?.ng_deps.dart?files?perclass?instead?of?perfileDiff
4、icultiesAdd?a?resolved?step?that?walks?from?bootstrap?callsDifficultiesDebug?Transformation?FailuresProposed?SolutionAdditional?ConsiderationsLinks●Current?implementation?(incomplete)●Angular?2?Dart?Transform?ExampleGoalAngular?2?uses?reflection?under?the?covers?to
5、?provide?dependency?injection?(DI)?and?change?detection.?While?reflective?access?is?very?convenient,?it?can?be?slow?and?defeats?Dart’s?tree?shaking?ability,?so?we?plan?to?create?a?Pub?Transformer1?to?generate?code?removing?the?need?for?reflection.Subgoals●Make?the?
6、generated?code?easy?to?understand?and?reason?about.●Allow?effective?code?splitting?(ensure?this?scheme?works?with?the?routingbased?code?splitting?proposal).●Good?developer?experience??quick?transformations??Avoid?resolving?the?Angular?2?app?where?possible.●Allow?us
7、e?of?the?DI?system?independent?of?the?rest?of?Angular?2.DesignThe?Angular?2?Dart?transformer?will?operate?in?several?phases?and?in?a?few?different?modes?to?generate?clean,?understandable,?treeshakable?code.This?is?still?under?development?and?may?change?in?the?futur
8、e.?All?“Implementation?Details”?are?as?of?069bbf3.Phase?1??DirectiveProcessorThis?phase?parses?all?.dart?files?in?a?package?and?generates?a?.ng_d