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.

ideas to leverage server environment to provide a better "developer experience" #45

Closed
@PatrickJS

Description

@PatrickJS

Angular 2 now is able to run on the server so what's the next step?
We can now take advantage of the benefits of having this control over the client's environment. We can create a small server layer that uses any of the underlying Node Frameworks such as ExpressJS, Hapi.js, or Koa.js. Doing so would be a great way for, normally client only developers, to be introduced to the backend.

Having full control over the client's environment allows us to dramatically improve the developer experience with features such as:

  • TypeScript inline script tags
  • ES6 features such as and SystemJS
  • allow users to write a component DSL (such as JSX, RiotJS, or jsBlocks)
  • better control over testing/development/production environments
  • better logging
  • live app configuration
  • default jwt setup
  • asset pipeline
  • inject ES6 polyfills
  • inject RxJS as Observable
  • can be front-end agnostic
  • removing unnecessary Angular imports for each file (like Rails)

prior art
https://github.com/yahoo/fluxible
https://muut.com/riotjs
https://github.com/astoilkov/jsblocks
https://github.com/linnovate/mean
https://github.com/meteor/meteor
https://github.com/rails/rails
https://github.com/django/django
https://github.com/playframework/playframework
https://github.com/elierotenberg/react-nexus
https://github.com/facebook/relay

the Universal app is <app> while the Server app is the html document itself that we can call an <html> component.

<html>
  <head>
    <title>Fullstack Angular 2</title>
    <meta></meta>
  </head>
  <body>
    <app></app>
    <!-- app-scripts -->
  </body>
</html>

currently <doctype> needs to be injected after the fact

code samples
https://gist.github.com/gdi2290/efa2061467c92243ca58
https://gist.github.com/gdi2290/f07fd579c6ec911d2305
https://gist.github.com/gdi2290/7c2280655dbf50450444

modules:
mincer
RxJS Next
polyfills
bunyan
vantage
webpack
webpack-require
autopolyfiller

related:
ngScripts #72
Environment Service #44

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions