From: Bill Erickson Date: Wed, 18 Apr 2018 21:33:52 +0000 (-0400) Subject: ang2 preso X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=0aa209436df483b9cc779f2c539395dd572a10bc;p=working%2Frandom.git ang2 preso Signed-off-by: Bill Erickson --- diff --git a/ang2-preso.adoc b/ang2-preso.adoc index 87a60d692..afba002da 100644 --- a/ang2-preso.adoc +++ b/ang2-preso.adoc @@ -41,18 +41,56 @@ A complete rewrite of AngularJS. * Nested Routing and Lazy Loading * Integrated i18n * Use of TypeScript -* Service Workers Module +* Native Service Workers Module +* Expressive component interactions / data binding +* Route-reuse for components. * Integrated ReactiveX library for JavaScript (RxJS). -* Template Reference Variables -* Expressive component interactions * ng-cli Command line tool for compiling, testing, building. == Nested Routing and Lazy Loading -* ng5 code operates a single application -* App-specific modules and templates are loaded on demand. -* No longer need startup.js and env.js +* Routers and resolvers all the way down. +* Code for lazy-loaded modules is retrieved by the browser on demand. +* Apps can have many modules and still load quickly. == Integrated I18N + +[source,html] +---------------------------------------------------------------------- +

Hello i18n!

+

Hello i18n!

+

Hello i18n!

+ + + +---------------------------------------------------------------------- + +== Integrated I18N + +* ng xi18n +* https://en.wikipedia.org/wiki/XLIFF -- default format +* PO files not supported, but XLIFF +** http://docs.translatehouse.org/projects/translate-toolkit/en/latest/commands/xliff2po.html + +== I18N XLIFF Sample +[source,xml] +---------------------------------------------------------------------- + + + Welcome to Webby, + + + app/welcome.component.ts + 2 + + Home page welcome message + welcome + +---------------------------------------------------------------------- + == More I18N On the Horizon [quote,ocombe,https://github.com/angular/angular/issues/11405] @@ -60,7 +98,7 @@ In v6 we will release runtime i18n: one bundle for all locale, translations resolved at runtime, and maybe *code translations* if we have the time (otherwise it'll come soon after). -== Skipping Template Toolkit +== Template Toolkit? * Mixing ng5 i18n and TT no-go. * Lets us return to standard ng5 structure. @@ -68,6 +106,11 @@ resolved at runtime, and maybe *code translations* if we have the time * Org unit template overlays possible using ModRewrite == RxJS +* Promises are now supported by default in major browsers. +** No "notify" support +* rxjs.Observabbles handle data streams +* Observables not observered are not executed!! + == TypeScript == TypeScript Fun: Interfaces @@ -90,7 +133,6 @@ pcrud.search('aou', {parent_ou:null}, {}, {anonymous:true}).subscribe(... * https://getbootstrap.com/ * New ng-bootstrap supports Bootstrap v4 only. -* Bootstrap v4 is a "reboot" of v3. * Panels, Thumbnails, and Wells replaced with "Cards" * Expanded utility classes! * No more glyphicons -- licensing issues. @@ -102,7 +144,7 @@ pcrud.search('aou', {parent_ou:null}, {}, {anonymous:true}).subscribe(... * https://angular.io/tutorial * Build a plain ng5 app * Option for expanding beyond staff UI's -* Using ng5 services in the ng1 browser client. +* Test using ng5 services in the ng1 browser client. == Intermission: New App Demo @@ -141,7 +183,7 @@ ng5 first, which then bootstraps ng1 * Mixing ng5 and EGWeb problematic ** Path resolution issues (TT2 vs. html) -* Mixing Bootstrap 3/4 problematic +* New Ang5 components must be Bootstrap-3 comatible. * Ties new project to /eg/staff * Documentation assumes a single-app upgrade. @@ -176,7 +218,6 @@ ng5 first, which then bootstraps ng1 * ng5 shell requires global adoption before we benefit from shared code. * Shared components have to be BS3 compatible * ng1 client must also load and run ng5 -* Running 3 types of apps at once: ng1, ng1+ng5, and ng5 == Shared Parallel Schematic @@ -186,6 +227,7 @@ image:images/ng1_plus_ng5_shared.png[ng1 sharing with ng5] * /eg/staff remains pure ng1 * Code and interfaces migrate wholesale to /eg2/ over time. ** Starting with core services & components +* No services are downgraded * Conceptually simple == Unshared Parallel: Challenges @@ -203,7 +245,7 @@ https://35.186.179.218/eg2/staff/splash == IMHO -* Use Parallel migration without sharing code +* Use Parallel migration without downgrading services * Start by migrating Dojo / iframe interfaces * Follow the Angular style guide.