Skip to content
This repository was archived by the owner on Nov 22, 2024. It is now read-only.
This repository was archived by the owner on Nov 22, 2024. It is now read-only.

update to rc5/rc6/rc7 #511

Closed
Closed

Description

@PatrickJS

rc6/rc7 update

  • create NodeDomEventsPlugin from DomEventsPlugin
  • create NodeEventManager from NodeEventManager
  • recreate DomRenderer for NodeDomRenderer
  • recreate SharedStylesHost for NodeSharedStylesHost
  • recreate Parse5DomAdapter with parse5 2.x.x
  • fix the events that were coupled to Parse5DomAdapter and one document
  • making sure the pipeline is as fast as possible outside of the angular's internal bootstrap
  • decouple the universal rendering pipeline for scheduling
  • inject latest version of preboot
  • create a way to dehydrate data from server to client via UNIVERSAL_CACHE
  • allow APP_ID to be passed to client to reuse styles
  • include lifecycle hooks for NodePlatform
    • universalOnInit
    • universalDoCheck
    • universalOnStable
    • universalDoDehydrate
    • universalAfterDehydrate
    • universalOnRendered
  • move most NodePlatform logic to UniversalPlatform
  • reuse NodeModule as UniversalModule
  • create initial UniversalPlatform
  • initial UniversalModule for browser
  • UniversalModule for Browser
    • create lifecycle hooks
    • link APP_ID to reuse styles
    • link preboot
    • link http resources made from the server to the client for prime cache mode
    • link hydrate resources
  • recreate integrations
    • angular2-express-engine
    • angular2-hapi-engine
    • angular2-webpack-prerender
    • angular2-gulp-prerender
    • angular2-grunt-prerender
  • fix publishing packages
  • use Zone.js for context config

after initial release

  • allow canceling requests
  • include fixed preboot version
    • auto include appRoots
    • inject at last entryComponent
  • perf tests
  • recreate Bootloader as Universal to manage concurrent apps and app lifecycles with middleware
  • move most serialize logic from NodePlatform to Universal
  • update integrations with full app with routes prerendering support
  • write about auth management
  • write about state/resource/cache management server/client/both
  • write about pm2 and cluster management
  • write about best practices
  • get AoT compiler working
  • patch zone.js for http/https WIP feat(node): patch outgoing http requests to capture the zone zone.js#430
  • patch zone.js for fs feat(node): patch most fs methods zone.js#438
  • update universal services design

experimental

  • include a webpack universal-loader for prerendering
  • create new universal prerender solution
  • section off pages for prerender and rerender for fastest server rendering solution

Activity

  1. added this to the One day sprint milestone on Aug 8, 2016
  2. self-assigned this
    on Aug 8, 2016
  3. maciejtreder commented on Aug 11, 2016

    @maciejtreder

    Any forecast when you are going to implement this?

  4. lmantis commented on Aug 11, 2016

    @lmantis

    Hi, I would like to know too. Thanks in advance.

  5. PatrickJS commented on Aug 11, 2016

    @PatrickJS
    ContributorAuthor

    here's a preview of what I have so far which is sticking to the angular API as much as possible

    import { NgModule } from '@angular/core';
    import {
      NodeModule,
      NodeHttpModule,
      NodeJsonpModule,
      platformDynamicNode,
    } from '@angular/universal';
    
    import { App } from './app';
    
    
    export const platform = platformDynamicUniversal();
    
    export function main(document) {
    
      @NgModule({
        bootstrap: [ App ],
        declarations: [ App ],
        imports: [
          UniversalModule.forRoot(document, {
            originUrl: 'http://localhost:3000',
            baseUrl: '/',
            requestUrl: '/'
          }),
          NodeHttpModule,
          NodeJsonpModule
        ],
        providers: [ ]
      })
      class MainModule {}
    
      return platform
        .serializeModule(MainModule)
        .then((html) => {
          console.log('done')
          return html
        });
    };
  6. GrandSchtroumpf commented on Aug 11, 2016

    @GrandSchtroumpf

    Is '@angular/universal' released yet ? I can't get my hand on it with npm.

  7. maciejtreder commented on Aug 11, 2016

    @maciejtreder

    @GrandSchtroumpf
    On my end it's working:

    npm install angular2-universal@0.104.5
    

    This is latest version. But it is not working with latest angular (rc.5).

    I believe that if you want to use it with rc.5 solution provided by @gdi2290 is working correctly (I did not check it no my end).

  8. PatrickJS commented on Aug 11, 2016

    @PatrickJS
    ContributorAuthor

    rc.5 is not released yet for universal

  9. maciejtreder commented on Aug 11, 2016

    @maciejtreder

    @gdi2290

    So code which you provided is not compatible with angular rc5? Do I understand correctly?

  10. PatrickJS commented on Aug 11, 2016

    @PatrickJS
    ContributorAuthor

    the current API is compatible but will be depreciated since I was essentially doing what NgModule now allows me to do. The rc5 release of universal will recommend users to follow the Angular API conventions.

    The old Bootloader API will still be supported until everyone switches to the new NgModule syntax using UniversalModule. The benefits of the new API allows me to provide server-only-components in any other part of the component tree rather than only being limited to the parent of the root component tree

  11. GrandSchtroumpf commented on Aug 17, 2016

    @GrandSchtroumpf

    @gdi2290 : Do you have any idea when the new version of Angular universal supporting rc5 would be released ?

  12. PatrickJS commented on Aug 18, 2016

    @PatrickJS
    ContributorAuthor

    I'm shooting for Friday

  13. geoffreak commented on Aug 19, 2016

    @geoffreak

    How's the Friday release looking?

  14. 22 remaining items

  15. PatrickJS commented on Sep 14, 2016

    @PatrickJS
    ContributorAuthor

    AoT support will be in the next release which has a small breaking change (remove main function for ngModule reference) and will be released as 2.0.0 the changes are on my laptop I just need to push it up and cut a release

  16. bryan commented on Sep 15, 2016

    @bryan

    angular2 is out of rc!

  17. PatrickJS commented on Sep 15, 2016

    @PatrickJS
    ContributorAuthor

    yup, the next release will use the 2.0.0 release

  18. kuldeepkeshwar commented on Sep 15, 2016

    @kuldeepkeshwar

    how soon can we expect support for 2.0.0 release ?

  19. MarkPieszak commented on Sep 15, 2016

    @MarkPieszak
    Contributor

    Think Pat said he'll make another push to npm in a few hours?

  20. PatrickJS commented on Sep 15, 2016

    @PatrickJS
    ContributorAuthor

    ya sorry not tonight as I originally planned. I'm getting a weird typescript error that i need to dive into to figure out why it's giving me the error

    update: Universal 2.0.x released. ts error fixed

  21. acthomas06 commented on Sep 16, 2016

    @acthomas06

    I did notice that your main.node and main.browser files in angular-universal-starter are completely identical. Maybe start there @gdi2290 :)

  22. PatrickJS commented on Sep 16, 2016

    @PatrickJS
    ContributorAuthor

    Universal 2.0.x was released on npm. The rest of the items on the list will be released as patches

  23. GrandSchtroumpf commented on Sep 16, 2016

    @GrandSchtroumpf

    The starter for Node and the examples in the documentation are not exactly the same (especially for the main.node as mentioned acthomas06) is one way better than the other ?

  24. PatrickJS commented on Sep 16, 2016

    @PatrickJS
    ContributorAuthor

    the starter is the best example. the examples in this repo are mostly for stress testing different scenarios etc

  25. thrallala commented on Sep 28, 2016

    @thrallala

    Hi @gdi2290, i see you've checked aot compilation, but i can't get it to work. From what i can gather, all libraries that i use in my project should have an index.metadata.json which is generated by the compiler-cli(ngc compiler). I've tried aot-compiling the universal project myself, but there are a bunch of "Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function" errors. Basically all functions used inside an "@NgModule" need to be exported and referenced. I'll maybe take a look this weekend if i may and i'm right about my assumptions, i just wanted to let everyone searching for this issue know and thanks for all the great work you're putting in!

  26. PatrickJS commented on Sep 28, 2016

    @PatrickJS
    ContributorAuthor

    we're missing our metadata.json file

  27. angular-automatic-lock-bot commented on Sep 4, 2019

    @angular-automatic-lock-bot

    This issue has been automatically locked due to inactivity.
    Please file a new issue if you are encountering a similar or related problem.

    Read more about our automatic conversation locking policy.

    This action has been performed automatically by a bot.

  28. locked and limited conversation to collaborators on Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions